blob: 407ab09f9b0cf17801bb45d0079b5e59dadf9e95 (
plain)
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
|
nut_h = 3;
nut_d = 4.15;
nut_r = nut_d / 2;
nut_d_tol = 0.5;
module nut() {
cylinder(d=nut_d,h=nut_h);
}
module nut_tolerance_test() {
steps = 3;
step_width = 0.1;
for(i = [-steps : steps]) {
tol = nut_d_tol + i * step_width;
translate([i*5*nut_d,0,0])
difference() {
cube([5*nut_d, 5*nut_d, 2*nut_h]);
translate([2.5*nut_d,2.5*nut_d,0]) {
union() {
cylinder(d=nut_d,h=2*nut_h,$fn=50);
translate([0,0,nut_h])
cylinder(d=nut_d_tol+nut_d,h=nut_h,$fn=50);
}
}
}
}
}
nut_tolerance_test();
|