-
Notifications
You must be signed in to change notification settings - Fork 0
/
aqara-fp2-monut-45-degree.scad
66 lines (55 loc) · 1.24 KB
/
aqara-fp2-monut-45-degree.scad
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
// Copyright (C) 2024, Vishal Verma
// SPDX-License-Identifier: GPL-2.0-only
// Mount for the Aqara Presence Sensor FP2
// Use on an electrical box faceplate or similar
// This angles the sensor at 45 degrees.
$fn=200;
id = 49.05;
wall = 4;
ht = 11.2;
cube_y = 20;
cube_x = 10;
cube_z = 10;
screw_d = 3.9;
head_d = 10;
head_h = 9;
module shroud()
{
cylinder(d = id + wall, h = ht + wall);
}
module mount()
{
translate([(id + wall)/2 - cube_x + 1, -cube_y / 2, 0])
rotate([0, 45, 0])
cube([cube_x, cube_y, cube_z]);
}
module hole()
{
translate([0, 0, wall])
cylinder(d = id, h = ht + 4);
}
module screw_hole()
{
translate([(id + wall)/2 - cube_x + 1, -cube_y / 2, 0])
rotate([0, 45, 0])
translate([-3, cube_y / 2, cube_z / 2])
rotate([0, 90, 0])
cylinder(d = screw_d, h = cube_x + 4);
}
module screw_cavity()
{
translate([(id + wall)/2 - cube_x + 1, -cube_y / 2, 0])
rotate([0, 45, 0])
translate([-6, cube_y / 2, cube_z / 2])
rotate([0, 90, 0])
cylinder(d = head_d, h = head_h);
}
difference() {
union() {
shroud();
mount();
}
hole();
screw_hole();
screw_cavity();
}