screws.scad
2.95 KB
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
module screw6x50() {
color("#ccc") translate([0,0,0]) {
cylinder(d=0.58,h=5, $fn=10);
translate([0,0,-screwhead]) {
cylinder(d=1.2,h=screwhead,$fn=6);
}
}
}
module nut() {
color("#aaa") cylinder(d=1.2,h=nutheight,$fn=6);
}
module shim() {
color("#eee") cylinder(d=shimdiameter,h=shimheight);
}
module shimSpring(locked) {
if ( locked == 1 ) {
color("#0f0") cylinder(d=shimdiameter,h=locked+0.5);
} else {
color("#f00") cylinder(d=shimdiameter,h=locked+0.5);
}
}
module removableshimblock() {
/* shimblockHeight; */
/* color("#eee") cylinder(d=1.3,h=0.1); */
}
module cornerscrew( z, upside=false ) {
translate([0,0,0]) screw6x50();
shim();
if ( upside == true ) {
translate([ 0, 0, shimheight + strength ]) shim();
/************ GRATE ************/
translate([ 0, 0, shimheight + strength + shimheight ]) nut();
translate([ 0, 0, shimheight + strength + shimheight + 1.26]) nut();
translate([ 0, 0, shimheight + strength + shimheight + 1.26 + nutheight]) shim();
/************ NEXT BOX ************/
translate([ 0, 0, shimheight + strength + shimheight + 1.26 + nutheight + shimheight+2*strength + 0.1 + shimblockHeight ]) nut();
translate([ 0, 0, shimheight + strength + shimheight + 1.26 + nutheight + shimheight+2*strength + 0.1 + shimblockHeight + nutheight]) nut();
} else {
translate([ 0, 0, shimheight +strength]) nut();
/************ NEXT BOX ************/
translate([ 0, 0, shimheight + strength*2 + 0.1 + shimblockHeight ]) nut();
/************ GRATE ************/
translate([ 0, 0, shimheight + 2.6 + shimblockHeight ]) rotate([0,0,rands(0,90,1)[0]]) nut();
translate([ 0, 0, shimheight + 2.6 + shimblockHeight + nutheight]) rotate([0,0,rands(0,90,1)[0]])nut();
/* #translate([ 0, 0, 0.4 + shimheight + strength + locked + 1]) nut(); */
/* translate([ 0, 0, 0.70 + shimheight + strength +locked + 1]) shim(); */
/* translate([ 0, 0, 0.70 + strength+0.2 ]) shim(); */
/* /\* translate([ 0, 0, 0.4 + shimblockHeight ]) nut(); *\/ */
/* /\* translate([ 0, 0, 2.71 + shimblockHeight ]) nut(); *\/ */
/* translate([ 0, 0, 0.70 + strength*2 +0.1 +0.2 ]) shim(); */
/* translate([ 0, 0, -0.30 + strength*2 + 0.1 + 1.3+locked ]) nut(); */
/* /\* translate([ 0, 0, 2 ]) shim(); *\/ */
/* /\* translate([ 0, 0, 1.7 ]) nut(); *\/ */
}
}
module cornerscrews(z) {
translate([2.4
, 0.8
, z - 2.66
])
cornerscrew(z,upside=true);
translate([0.8
, 2.4
, recess + strength + shimheight
])
rotate([180,0,0]) {
cornerscrew(z,upside=false);
}
}
module screws(x,y,z) {
cornerscrews(22);
mirror([0,1,0]) translate([0,-y,0]) cornerscrews(22);
mirror([1,0,0]) translate([-x,0,0]) cornerscrews(22);
mirror([1,0,0]) translate([-x,y,0]) mirror([0,1,0]) cornerscrews(22);
}