diff options
author | Steven <steven.vasilogianis@gmail.com> | 2021-11-24 19:20:14 -0500 |
---|---|---|
committer | Steven <steven.vasilogianis@gmail.com> | 2021-11-24 19:20:14 -0500 |
commit | 326fcca81664553acf23de590d81e03edca1501f (patch) | |
tree | b5ebaab3a4e3820950de5a1201bb8d759727550e | |
parent | 0639b070b57c7110232a64b6779e435f277e1df9 (diff) |
formatting
-rw-r--r-- | cubbies.scad | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/cubbies.scad b/cubbies.scad index 0970c8d..26bcc22 100644 --- a/cubbies.scad +++ b/cubbies.scad | |||
@@ -79,13 +79,13 @@ module cubby_bottom (width, depth) { | |||
79 | let (_=assert_cubby_depth()); | 79 | let (_=assert_cubby_depth()); |
80 | 80 | ||
81 | rot(90) yrot(90) color("blue") bottom_wall() yrot(90) down(tab_height / 2) { | 81 | rot(90) yrot(90) color("blue") bottom_wall() yrot(90) down(tab_height / 2) { |
82 | move_dist=width / 2 + (tab_depth / 2); | 82 | move_dist=(width / 2) + (tab_depth / 2); |
83 | fwd(move_dist) | 83 | fwd(move_dist) |
84 | alternating_tabs(false, "male", depth, tab_width, | 84 | alternating_tabs(false, "male", depth, tab_width, |
85 | tab_depth, tab_height, tab_padding, tab_tolerance); | 85 | tab_depth, tab_height, tab_padding, tab_tolerance); |
86 | back(move_dist) | 86 | back(move_dist) |
87 | alternating_tabs(true, "male", depth, tab_width, | 87 | alternating_tabs(true, "male", depth, tab_width, |
88 | tab_depth, tab_height, tab_padding, tab_tolerance); | 88 | tab_depth, tab_height, tab_padding, tab_tolerance); |
89 | } | 89 | } |
90 | children(); | 90 | children(); |
91 | module bottom_wall () { | 91 | module bottom_wall () { |
@@ -169,7 +169,7 @@ module female_tabs (d, h) { | |||
169 | 169 | ||
170 | xrot(180) left_half(x=(h / -2 + (thickness * 3))) | 170 | xrot(180) left_half(x=(h / -2 + (thickness * 3))) |
171 | cubby_side(d, h, screw_tabs=false); | 171 | cubby_side(d, h, screw_tabs=false); |
172 | #translate(text_pos) zrot(90) linear_extrude(text_inscription_depth) | 172 | translate(text_pos) zrot(90) linear_extrude(text_inscription_depth) |
173 | color("green") text(size=text_size, text, font="Bitstream Vera Sans:style=Bold"); | 173 | color("green") text(size=text_size, text, font="Bitstream Vera Sans:style=Bold"); |
174 | } | 174 | } |
175 | 175 | ||
@@ -188,7 +188,8 @@ module view_tab_fit (w, d, h) { | |||
188 | yrot(180) up(h) position_fit_test(left=false); | 188 | yrot(180) up(h) position_fit_test(left=false); |
189 | } | 189 | } |
190 | 190 | ||
191 | module alternating_tabs ( first, gender, length, tab_width, tab_depth, tab_height, tab_padding, tolerance ) { | 191 | module alternating_tabs (first, gender, length, tab_width, tab_depth, |
192 | tab_height, tab_padding, tolerance) { | ||
192 | dist=length - (tab_padding * 2); | 193 | dist=length - (tab_padding * 2); |
193 | total_tabs=dist / (tab_width + tab_padding + tolerance); | 194 | total_tabs=dist / (tab_width + tab_padding + tolerance); |
194 | half_tabs=total_tabs / 2; | 195 | half_tabs=total_tabs / 2; |
@@ -197,8 +198,8 @@ module alternating_tabs ( first, gender, length, tab_width, tab_depth, tab_heigh | |||
197 | start = first ? tab_padding : (tab_padding * 2) + tab_width; | 198 | start = first ? tab_padding : (tab_padding * 2) + tab_width; |
198 | spacing = (tab_width + tab_padding) * 2; | 199 | spacing = (tab_width + tab_padding) * 2; |
199 | xcopies(spacing, tab_qty, dist, sp=((dist / -2) + start)) | 200 | xcopies(spacing, tab_qty, dist, sp=((dist / -2) + start)) |
200 | #dovetail(gender, angle=0, slide=add_tol(tab_depth), | 201 | dovetail(gender, angle=0, slide=add_tol(tab_depth), |
201 | width=add_tol(tab_width), height=add_tol(tab_height)); | 202 | width=add_tol(tab_width), height=add_tol(tab_height)); |
202 | 203 | ||
203 | function add_tol (x) = gender == "male" ? x : x + tolerance; | 204 | function add_tol (x) = gender == "male" ? x : x + tolerance; |
204 | } | 205 | } |