summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven <steven.vasilogianis@gmail.com>2021-10-29 13:02:18 -0400
committerSteven <steven.vasilogianis@gmail.com>2021-10-29 13:02:18 -0400
commit4767a828663c3c4820d21c044ed94d2d15952bcd (patch)
tree1e9b36f602d2a19783ca55efb6bdd8f60bbf37ce
parent08b8e52a56b52c9b073d4d868973d2d8b1e2df43 (diff)
Only print tab tolerance on female part (which has tolerance applied)
-rw-r--r--cubbies.scad41
1 files changed, 15 insertions, 26 deletions
diff --git a/cubbies.scad b/cubbies.scad
index 88740be..40de471 100644
--- a/cubbies.scad
+++ b/cubbies.scad
@@ -3,7 +3,7 @@ include <BOSL2/walls.scad>;
3include <BOSL2/fnliterals.scad>; 3include <BOSL2/fnliterals.scad>;
4include <BOSL2/joiners.scad>; 4include <BOSL2/joiners.scad>;
5 5
6$fn=100; 6$fn=20;
7 7
8part="both"; // [both:Bottom + Side,bottom::Bottom Only,side:Side Only,view_fit:Debugging view to confirm tab fit,male_tabs:Tabs only from bottom,female_tabs:Holes only from side] 8part="both"; // [both:Bottom + Side,bottom::Bottom Only,side:Side Only,view_fit:Debugging view to confirm tab fit,male_tabs:Tabs only from bottom,female_tabs:Holes only from side]
9 9
@@ -35,10 +35,6 @@ screw_tabs=true;
35tab_depth=thickness; 35tab_depth=thickness;
36tab_height=thickness; 36tab_height=thickness;
37 37
38/* text inscribed (when printing tolerances) */
39text_inscription_depth=0.2;
40text_size=thickness * 0.6;
41
42if ( part == "both" ) { 38if ( part == "both" ) {
43 both(); 39 both();
44} else if ( part =="bottom") { 40} else if ( part =="bottom") {
@@ -138,30 +134,23 @@ module strut_wall(w, h) {
138} 134}
139 135
140module male_tabs (w, d) { 136module male_tabs (w, d) {
141 text=str("t=", tab_tolerance); 137 keep=(w / 2) - thickness;
142 text_pos=[(-w / 2) + (thickness * 0.8), 138 left_half(x=-keep) cubby_bottom(cubby_width, cubby_depth);
143 -d / 2 + thickness,
144 (thickness / 2) - text_inscription_depth];
145 difference() {
146 keep=(w / 2) - thickness;
147 left_half(x=-keep) cubby_bottom(cubby_width, cubby_depth);
148 #translate(text_pos) zrot(90)
149 linear_extrude(text_inscription_depth)
150 color("green") text(size=text_size, text);
151 }
152} 139}
153 140
154module female_tabs (d, h) { 141module female_tabs (d, h) {
155 text=str("t=", tab_tolerance); 142 /* text inscribed (when printing tolerances) */
156 text_pos=[-h/2 + (thickness * 0.8), 143 text_inscription_depth=0.6;;
157 -d / 2 + thickness, 144 text_size=thickness * 0.9;
158 (thickness / 2) - text_inscription_depth]; 145 text=str(tab_tolerance);
159 difference() { 146 text_pos=[-h/2 + (thickness * 0.95),
160 xrot(180) left_half(x=(h / -2 + (thickness * 3))) 147 -d / 2 + (thickness / 2),
161 cubby_side(d, h, screw_tabs=false); 148 (thickness / 2)];
162 #translate(text_pos) zrot(90) linear_extrude(text_inscription_depth) 149
163 color("green") text(size=text_size, text); 150 xrot(180) left_half(x=(h / -2 + (thickness * 3)))
164 } 151 cubby_side(d, h, screw_tabs=false);
152 #translate(text_pos) zrot(90) linear_extrude(text_inscription_depth)
153 color("green") text(size=text_size, text, font="Bitstream Vera Sans:style=Bold");
165} 154}
166 155
167module view_tab_fit (w, d, h) { 156module view_tab_fit (w, d, h) {