-
Notifications
You must be signed in to change notification settings - Fork 0
/
02-holder.scad
71 lines (64 loc) 路 1.55 KB
/
02-holder.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
67
68
69
70
71
// Philipps Hue Dimmer Switch wall mount
// Authors:
// - Jonas "frdmn" Friedmann <j@frd.mn>
// - Marian "rnarian" Friedmann <hi@marianfriedmann.de>
// Licence: MIT License (MIT)
$fn = 30;
HOLDER_HEIGHT=2;
CLIP_HEIGHT=5;
// Holder brackt that keeps the dimmer switch in place
module holder(){
// Function to draw an retangle with rounded corners
module rounded_square(d,r) {
minkowski() {
translate([r,r]) square([d[0]-2*r, d[1]-2*r]);
circle(r);
}
}
difference(){
linear_extrude(height=HOLDER_HEIGHT){
rounded_square([46.6,46],5);
}
translate([5.5,5.5,0]){
linear_extrude(height=HOLDER_HEIGHT){
rounded_square([35.6,46], 2);
}
}
}
}
// Clips to keep the holder in the base plate
module clip(){
difference(){
cylinder(h=CLIP_HEIGHT,d=2.5);
translate([-2,-0.25,2.5]){
cube([4,0.5,3]);
}
}
}
// Draw holder
holder();
// Draw each of the clips
translate([1.5+2.5/2,1.5+2.5/2,0]){
// Bottom ones
clip();
translate([18.05+2.5,0,0]){
clip();
translate([18.05+2.5,0,0]){
clip();
// Right (horitonally) ones
translate([0,17.75+2.5,0]){
clip();
translate([0,17.75+2.5,0]){
clip();
}
}
}
}
// Left (horitonally) ones
translate([0,17.75+2.5,0]){
clip();
translate([0,17.75+2.5,0]){
clip();
}
}
}