summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven <steven.vasilogianis@gmail.com>2021-05-07 21:57:44 -0400
committerSteven <steven.vasilogianis@gmail.com>2021-05-07 21:57:44 -0400
commitd2c0f052c1bf723eec4dace6d7a8931d32e0a9d1 (patch)
tree970af600de114b238cb1d07150945af0d0fa9de3
parent684e656655095271a85f623ed36cc1458f2e8dd0 (diff)
print single male + female tabs
-rw-r--r--cubbies.scad58
1 files changed, 38 insertions, 20 deletions
diff --git a/cubbies.scad b/cubbies.scad
index d22930a..fada402 100644
--- a/cubbies.scad
+++ b/cubbies.scad
@@ -14,16 +14,14 @@ $fn = 20;
14/* [Cubby dimensions] */ 14/* [Cubby dimensions] */
15 15
16cubby_width = 50; 16cubby_width = 50;
17cubby_depth = 200; 17cubby_depth = 180;
18cubby_divider_height = 500; 18cubby_divider_height = 90;
19 19
20// thickness of both bottom + dividers 20// thickness of both bottom + dividers
21thickness = 5; 21thickness = 5;
22 22
23// thickness of struts 23// thickness of struts
24strut_thickness = 5; 24strut_thickness = 5;
25part = "both"; // [both:Bottom + Divider,bottom::Bottom Only,divider:Divider Only,tabs:Only tabs,view_fit_test:Generate a model to view tab fit (for debugging)]
26//part = "both"; // [first:Cube Only,second:Cylinder Only,both:Cube and Cylinder]
27 25
28// sizes for test fit 26// sizes for test fit
29/* cubby_width = 10; */ 27/* cubby_width = 10; */
@@ -34,27 +32,28 @@ part = "both"; // [both:Bottom + Divider,bottom::Bottom Only,divider:Divider Onl
34tab_width = 10; 32tab_width = 10;
35tab_depth = 5; 33tab_depth = 5;
36tab_height = 5; 34tab_height = 5;
35tab_tolerance = 0.5;
37 36
38tab_tolerance = 2; 37part = "female tab"; // [both:Bottom + Divider,bottom::Bottom Only,divider:Divider Only,male tab line:Line of male tabs,female tab line: Line of female tabs,view_fit_test:Generate a model to view tab fit (for debugging)]
39
40// this paramater not well tested
41 38
42if ( part == "bottom" ) { 39if ( part == "bottom" ) {
43 rot(90) yrot(90) cubby_bottom(cubby_width, cubby_depth); 40 rot(90) yrot(90) cubby_bottom(cubby_width, cubby_depth);
44} else if ( part == "divider" ) { 41 } else if ( part == "divider" ) {
45 yrot(180+90) cubby_divider(cubby_depth, cubby_divider_height); 42 yrot(180+90) cubby_divider(cubby_depth, cubby_divider_height);
46} else if ( part == "tabs" ) { 43} else if ( part == "male tab line" ) {
47 print_tabs(cubby_width, cubby_depth, cubby_divider_height); 44 print_tab_line(cubby_width, cubby_depth, cubby_divider_height, male=true);
45} else if ( part == "female tab line" ) {
46 print_tab_line(cubby_width, cubby_depth, cubby_divider_height, male=false);
47} else if ( part == "male tab" ) {
48 print_single_tab(male=true);
49} else if ( part == "female tab") {
50 print_single_tab(male=false);
48} else if ( part == "view_fit_test") { 51} else if ( part == "view_fit_test") {
49 view_tab_fit(cubby_width, cubby_depth, cubby_divider_height); 52 view_tab_fit(cubby_width, cubby_depth, cubby_divider_height);
50} else if ( part == "both") { 53} else if ( part == "both") {
51 cubby(cubby_width, cubby_depth, cubby_divider_height); 54 cubby(cubby_width, cubby_depth, cubby_divider_height);
52} 55}
53 56
54//cubby(cubby_width, cubby_depth, cubby_divider_height);
55//print_tabs(cubby_width, cubby_depth, cubby_divider_height);
56//view_tab_fit(cubby_width, cubby_depth, cubby_divider_height);
57
58module cubby (w, d, h) { 57module cubby (w, d, h) {
59 position_flat() children(); 58 position_flat() children();
60 59
@@ -67,10 +66,27 @@ module cubby (w, d, h) {
67 } 66 }
68} 67}
69 68
70module print_tabs (w, d, h) { 69module print_tab_line (w, d, h, male=true) {
71 yrot(90) { 70 yrot(90) {
72 left(50) cubby_bottom(10, d); 71 if (male) {
73 rot(180) xrot(90) fwd(75) bottom_half(z=(h / -2 + 5)) cubby_divider(d, h); 72 cubby_bottom(10, d);
73 } else {
74 rot(180) xrot(90) bottom_half(z=(h / -2 + 5)) cubby_divider(d, h);
75 }
76 }
77}
78
79module print_single_tab (male=true) {
80 if (male) {
81 single_tab(tab_width=tab_width, tab_depth=tab_depth, tab_height=tab_height, male=true, tolerance=tab_tolerance)
82 attach(BOTTOM, TOP)
83 single_tab(tab_width=tab_width*1.5, tab_depth=tab_depth*1.5, tab_height=tab_height*1.5, male=true, tolerance=tab_tolerance);
84 } else {
85 difference() {
86 single_tab(tab_width=tab_width*1.5, tab_depth=tab_depth*1.5, tab_height=tab_height*1.5, male=false, tolerance=tab_tolerance);
87 up((tab_width / 8))
88 single_tab(tab_width=tab_width, tab_depth=tab_depth, tab_height=tab_height, male=false, tolerance=tab_tolerance);
89 }
74 } 90 }
75} 91}
76 92
@@ -90,13 +106,14 @@ module view_tab_fit (w, d, h) {
90function tab_spacing (tab_width) = tab_width * 3.5; 106function tab_spacing (tab_width) = tab_width * 3.5;
91 107
92module add_tabs ( length, male=true, between=false ) { 108module add_tabs ( length, male=true, between=false ) {
93 tab_line(length, tab_width=tab_width, tab_depth=tab_depth, tab_height=tab_height, male=male, tolerance=1, edge_padding=5, between=between); 109 tab_line(length, tab_width=tab_width, tab_depth=tab_depth, tab_height=tab_height, male=male, tolerance=tab_tolerance, edge_padding=5, between=between);
94} 110}
95 111
96module cubby_divider (depth, height) { 112module cubby_divider (depth, height) {
97 divider_wall() { 113 divider_wall() {
98 attach(BOTTOM, TOP) zrot(90) tab_bracket(); 114 attach(BOTTOM, TOP) zrot(90) tab_bracket();
99 position(TOP+FRONT+LEFT) screw_tab(); 115 position(TOP+FRONT+LEFT) screw_tab();
116 up(bracket_height() * 2) position(BOTTOM+FRONT+LEFT) screw_tab();
100 } 117 }
101 children(); 118 children();
102 119
@@ -104,10 +121,11 @@ module cubby_divider (depth, height) {
104 strut_wall(depth, height) children(); 121 strut_wall(depth, height) children();
105 } 122 }
106 123
124 function bracket_height () = thickness * 2;
125
107 module tab_bracket () { 126 module tab_bracket () {
108 bracket_height = thickness * 2;
109 difference() { 127 difference() {
110 cuboid([depth,thickness,bracket_height]); 128 cuboid([depth,thickness,bracket_height()]);
111 add_tabs(depth, male=false, between=false); 129 add_tabs(depth, male=false, between=false);
112 add_tabs(depth, male=false, between=true); 130 add_tabs(depth, male=false, between=true);
113 } 131 }