-
Notifications
You must be signed in to change notification settings - Fork 0
/
EnclosurePost_Straight_v1.scad
44 lines (38 loc) · 1.36 KB
/
EnclosurePost_Straight_v1.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
module roundedBox(w=10, h=10, d=10, r=2){
translate([-(w-2*r)/2,-(h-2*r)/2,0]) {
minkowski(){
cylinder(r,r,r);
cube([w-2*r, h-2*r, d-r]);
}
}
}
module baseplate(baseWidth=20, holeSpacing=6, baseThickness=5, roundRadius=2){
difference(){
roundedBox(baseWidth,holeSpacing+baseWidth,baseThickness,roundRadius);
union(){
translate([0,holeSpacing/2,-2]) cylinder(baseThickness*2,clearanceHole/2,clearanceHole/2);
translate([0,-holeSpacing/2,-2]) cylinder(baseThickness*2,clearanceHole/2,clearanceHole/2);
}
}
}
$fn = 50;
// ----- Parameters (all in mm) -----
holeSpacing = 25; // standard metric Thorlabs optical table
clearanceHole = 6.6; // for M6 screws
baseWidth = 20;
baseThickness = 5;
pilarThickness = 12;
pilarHeight = 100;
roundRadius = 1; // smoothes the angles
boardThickness = 4.76; // thickness of the cardboard/plastic board to be used
slotDepth = 8;
difference(){
union(){
baseplate(baseWidth, holeSpacing, baseThickness, roundRadius);
roundedBox(baseWidth,pilarThickness,pilarHeight, roundRadius);
}
union(){
translate([baseWidth/2,0,-2]) roundedBox(2*slotDepth, boardThickness+0.5,pilarHeight+4,roundRadius);
translate([-baseWidth/2,0,-2]) roundedBox(2*slotDepth, boardThickness+0.5,pilarHeight+4,roundRadius);
}
}