-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathloom.scad
112 lines (73 loc) · 1.84 KB
/
loom.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
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
weave_x_inches=.25;
weave_x_mm=weave_x_inches*25.4;
block_x=weave_x_mm;
block_y=20;
gap_x=block_x;
gap_y=block_y+block_x;
margin_x=block_x*2;
margin_y=block_y*2/3;
screw_diam=4.5;
square_side=block_y;
loom_width_inches=12;
loom_width_mm=loom_width_inches*25.4;
number_x=floor(loom_width_mm/(block_x+gap_x));
//number_x=20;
number_x_squares=1;
//panel_x=square_side;
//panel_y=2*square_side;
panel_x=(block_x+gap_x)*number_x+gap_x;
projection() {
//lower
difference() {
union() {
cube([panel_x,margin_y,1]);
translate([gap_x,0,0]) {
for ( i = [2:1:number_x-3])
translate([(block_x+gap_x)*i,0,0])
cube([block_x,block_y,2]);
}
}
translate([gap_x,margin_y/2,0])
cylinder(h=5,r=screw_diam/2);
translate([gap_x*2+screw_diam,margin_y/2,0])
cylinder(h=5,r=screw_diam/2);
translate([panel_x-gap_x,margin_y/2,0])
cylinder(h=5,r=screw_diam/2);
translate([panel_x-(gap_x*2+screw_diam),margin_y/2,0])
cylinder(h=5,r=screw_diam/2);
}
//upper
translate([0,gap_y,0])
difference() {
union() {
cube([panel_x,margin_y,1]);
translate([gap_x*2,0,0]) {
for ( i = [1:1:number_x-3])
translate([(block_x+gap_x)*i,0,0])
cube([block_x,block_y,2]);
}
}
translate([gap_x,margin_y/2,0])
cylinder(h=5,r=screw_diam/2);
translate([gap_x*2+screw_diam,margin_y/2,0])
cylinder(h=5,r=screw_diam/2);
translate([panel_x-gap_x,margin_y/2,0])
cylinder(h=5,r=screw_diam/2);
translate([panel_x-(gap_x*2+screw_diam),margin_y/2,0])
cylinder(h=5,r=screw_diam/2);
}
}
translate([0,gap_y*2,0])
difference() {
cube([gap_x*2+screw_diam+gap_x,panel_x,1]);
translate([gap_x,margin_y/2,0])
cylinder(h=5,r=screw_diam/2);
translate([gap_x*2+screw_diam,margin_y/2,0])
cylinder(h=5,r=screw_diam/2);
translate([0,panel_x-margin_y]) {
translate([gap_x,margin_y/2,0])
cylinder(h=5,r=screw_diam/2);
translate([gap_x*2+screw_diam,margin_y/2,0])
cylinder(h=5,r=screw_diam/2);
}
}