diff options
author | Steven <steven.vasilogianis@gmail.com> | 2021-06-21 14:49:23 -0400 |
---|---|---|
committer | Steven <steven.vasilogianis@gmail.com> | 2021-06-21 14:49:23 -0400 |
commit | fad79e3afe571b1f4e1869909b2f0b2cd1165ce3 (patch) | |
tree | b56836db57c8240cd0d0def2ba311de8b0a3336b | |
parent | 480bc6e9640324b55a2b4f6326a0f6f3d897eb6e (diff) |
merge tabs.scad into cubbies.scad
-rw-r--r-- | cubbies.scad | 55 | ||||
-rw-r--r-- | tabs.scad | 39 |
2 files changed, 50 insertions, 44 deletions
diff --git a/cubbies.scad b/cubbies.scad index d8f26ae..accfdef 100644 --- a/cubbies.scad +++ b/cubbies.scad | |||
@@ -1,7 +1,4 @@ | |||
1 | include <tabs.scad>; | 1 | include <BOSL2/std.scad>; // https://github.com/revarbat/BOSL2 |
2 | |||
3 | // https://github.com/revarbat/BOSL2 | ||
4 | include <BOSL2/std.scad>; | ||
5 | include <BOSL2/walls.scad>; | 2 | include <BOSL2/walls.scad>; |
6 | 3 | ||
7 | $fn=20; | 4 | $fn=20; |
@@ -31,7 +28,7 @@ tab_height=thickness; | |||
31 | 28 | ||
32 | if ( part == "bottom" ) { | 29 | if ( part == "bottom" ) { |
33 | rot(90) yrot(90) cubby_bottom(cubby_width, cubby_depth); | 30 | rot(90) yrot(90) cubby_bottom(cubby_width, cubby_depth); |
34 | } else if ( part == "divider" ) { | 31 | } else if ( part == "divider" ) { |
35 | yrot(180+90) cubby_divider(cubby_depth, cubby_divider_height); | 32 | yrot(180+90) cubby_divider(cubby_depth, cubby_divider_height); |
36 | } else if ( part == "male tab line" ) { | 33 | } else if ( part == "male tab line" ) { |
37 | print_tab_line(cubby_width, cubby_depth, cubby_divider_height, male=true); | 34 | print_tab_line(cubby_width, cubby_depth, cubby_divider_height, male=true); |
@@ -194,3 +191,51 @@ module strut_wall(w, h) { | |||
194 | max_bridge=(h+w)/5 | 191 | max_bridge=(h+w)/5 |
195 | ) children(); | 192 | ) children(); |
196 | } | 193 | } |
194 | |||
195 | |||
196 | function tab_spacing (tab_width) = tab_width * 3.5; | ||
197 | |||
198 | module single_tab ( | ||
199 | tab_width=10, | ||
200 | tab_depth=5, | ||
201 | tab_height=5, | ||
202 | male=true, | ||
203 | tolerance=1 | ||
204 | ) { | ||
205 | size=male | ||
206 | ? [tab_width, tab_depth, tab_height] | ||
207 | : [tab_width + tolerance, tab_depth + tolerance, tab_height + tolerance]; | ||
208 | if (male) { | ||
209 | #cuboid(size) children(); | ||
210 | } else { | ||
211 | cuboid(size) children(); | ||
212 | } | ||
213 | } | ||
214 | |||
215 | /* module single_hole ( size_of_yo_hole = 2000mm ) { */ | ||
216 | /* if (male) { */ | ||
217 | /* #cylinder(size_of_yo_hole) children(); */ | ||
218 | /* } else { */ | ||
219 | /* cylinder(size_of_yo_hole) children(); */ | ||
220 | /* } */ | ||
221 | |||
222 | /* } */ | ||
223 | |||
224 | module tab_line ( | ||
225 | distance=100, | ||
226 | tab_width=10, | ||
227 | tab_depth=5, | ||
228 | tab_height=5, | ||
229 | tab_padding=5, | ||
230 | male=true, | ||
231 | tolerance=1, | ||
232 | edge_padding=0, | ||
233 | between=false, | ||
234 | ) { | ||
235 | start = between ? ((tab_padding * 2) + tab_width) : tab_padding; | ||
236 | tab_spacing = (tab_width * 2) + (tab_padding * 2); | ||
237 | shift = (distance - (tab_padding * 2)) / -2; | ||
238 | for ( i = [shift+start:tab_spacing:(shift * -1) - tab_padding] ) { | ||
239 | right(i) #single_tab(tab_width, tab_depth, tab_height, male, tolerance); | ||
240 | } | ||
241 | } | ||
diff --git a/tabs.scad b/tabs.scad deleted file mode 100644 index de14cb1..0000000 --- a/tabs.scad +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | include <BOSL2/std.scad>; | ||
2 | |||
3 | function tab_spacing (tab_width) = tab_width * 3.5; | ||
4 | |||
5 | module single_tab ( | ||
6 | tab_width=10, | ||
7 | tab_depth=5, | ||
8 | tab_height=5, | ||
9 | male=true, | ||
10 | tolerance=1 | ||
11 | ) { | ||
12 | size=male | ||
13 | ? [tab_width, tab_depth, tab_height] | ||
14 | : [tab_width + tolerance, tab_depth + tolerance, tab_height + tolerance]; | ||
15 | if (male) { | ||
16 | #cuboid(size) children(); | ||
17 | } else { | ||
18 | cuboid(size) children(); | ||
19 | } | ||
20 | } | ||
21 | |||
22 | module tab_line ( | ||
23 | distance=100, | ||
24 | tab_width=10, | ||
25 | tab_depth=5, | ||
26 | tab_height=5, | ||
27 | tab_padding=5, | ||
28 | male=true, | ||
29 | tolerance=1, | ||
30 | edge_padding=0, | ||
31 | between=false, | ||
32 | ) { | ||
33 | start = between ? ((tab_padding * 2) + tab_width) : tab_padding; | ||
34 | tab_spacing = (tab_width * 2) + (tab_padding * 2); | ||
35 | shift = (distance - (tab_padding * 2)) / -2; | ||
36 | for ( i = [shift+start:tab_spacing:(shift * -1) - tab_padding] ) { | ||
37 | right(i) #single_tab(tab_width, tab_depth, tab_height, male, tolerance); | ||
38 | } | ||
39 | } | ||