summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven <steven.vasilogianis@gmail.com>2021-05-04 22:28:20 -0400
committerSteven <steven.vasilogianis@gmail.com>2021-05-04 22:28:20 -0400
commit57b9553710f4e0cb30173dacf7881ce3b8b2af9c (patch)
tree5074f60926e8f2ed6f8783f6218544f97f260ab8
parent021e1ece50908d01c054056985f08ab14ad5877d (diff)
added link to bosl2
-rw-r--r--cubbies.scad69
1 files changed, 52 insertions, 17 deletions
diff --git a/cubbies.scad b/cubbies.scad
index a88bf40..9379376 100644
--- a/cubbies.scad
+++ b/cubbies.scad
@@ -1,4 +1,6 @@
1include <tabs.scad>; 1include <tabs.scad>;
2
3// https://github.com/revarbat/BOSL2
2include <BOSL2/std.scad>; 4include <BOSL2/std.scad>;
3include <BOSL2/walls.scad>; 5include <BOSL2/walls.scad>;
4 6
@@ -9,37 +11,70 @@ $fn = 20;
9/* cubby_depth = 180; */ 11/* cubby_depth = 180; */
10/* cubby_divider_height = 90; */ 12/* cubby_divider_height = 90; */
11 13
14/* [Cubby dimensions] */
15
12cubby_width = 80; 16cubby_width = 80;
13cubby_depth = 200; 17cubby_depth = 200;
14cubby_divider_height = 40; 18cubby_separator_height = 40;
19
20// thickness of both bottom + dividers
21thickness = 5;
22
23// thickness of struts
24strut_thickness = 5;
25
26part="both";
15 27
16// sizes for test fit 28// sizes for test fit
17/* cubby_width = 10; */ 29/* cubby_width = 10; */
18/* cubby_depth = 100; */ 30/* cubby_depth = 100; */
19/* cubby_divider_height = 20; */ 31/* cubby_divider_height = 20; */
20 32
21/* outside_strut_thickness = 5; */ 33/* [Tab Dimensions] */
22/* inside_strut_thickness = 5; */
23
24outside_strut_thickness = 5;
25inside_strut_thickness = 5;
26
27tab_width = 10; 34tab_width = 10;
28tab_depth = 5; 35tab_depth = 5;
29tab_height = 5; 36tab_height = 5;
37
30tab_tolerance = 2; 38tab_tolerance = 2;
31 39
40// this paramater not well tested
41
42
43available_parts=[
44 "both", // one bottom and a divider for each side
45 "bottom", // bottom divider only
46 "separator", // separator only
47 "tabs", // generate the smallest possible structures to
48 // print test fits of the tabs
49 "view_fit_test" // print a view to verify that tabs line up
50 // (mostly useful for debugging)
51 ];
52
53if ( part == "bottom" ) {
54 rot(90) yrot(90) cubby_bottom(cubby_width, cubby_depth);
55} else if ( part == "separator" ) {
56 yrot(180+90) cubby_separator(cubby_depth, cubby_separator_height);
57} else if ( part == "tabs" ) {
58 print_tabs(cubby_width, cubby_depth, cubby_separator_height);
59} else if ( part == "view_fit_test") {
60 view_tab_fit(cubby_width, cubby_depth, cubby_separator_height);
61} else if ( part == "both") {
62 cubby(cubby_width, cubby_depth, cubby_separator_height);
63}
64
32//cubby(cubby_width, cubby_depth, cubby_divider_height); 65//cubby(cubby_width, cubby_depth, cubby_divider_height);
33//print_tabs(cubby_width, cubby_depth, cubby_divider_height); 66//print_tabs(cubby_width, cubby_depth, cubby_divider_height);
34view_tab_fit(cubby_width, cubby_depth, cubby_divider_height); 67//view_tab_fit(cubby_width, cubby_depth, cubby_divider_height);
35
36 68
37module cubby (w, d, h) { 69module cubby (w, d, h) {
38 position_flat() children(); 70 position_flat() children();
39 71
40 module position_flat () { 72 module position_flat () {
41 rot(90) yrot(90) cubby_bottom(w, d); 73 rot(90) yrot(90) cubby_bottom(w, d);
42 right(d/2) yrot(180+90) cubby_separator(d, h); 74 yrot(180+90) {
75 up(d/2)cubby_separator(d, h);
76 //up(d/2 + h*2) cubby_separator(d, h);
77 }
43 } 78 }
44} 79}
45 80
@@ -54,7 +89,7 @@ module view_tab_fit (w, d, h) {
54 // position for testing tab fit 89 // position for testing tab fit
55 module position_fit_test (left=true) { 90 module position_fit_test (left=true) {
56 yrot(90) cubby_bottom(w, d); 91 yrot(90) cubby_bottom(w, d);
57 dist = (w / 2) + (outside_strut_thickness / -2) + tab_depth - 2; 92 dist = (w / 2) + (thickness / -2) + tab_depth - 2;
58 fwd(dist * (left ? 1 : -1)) up((h / 2) + 3) zrot(90) cubby_separator(d, h); 93 fwd(dist * (left ? 1 : -1)) up((h / 2) + 3) zrot(90) cubby_separator(d, h);
59 } 94 }
60 95
@@ -66,7 +101,7 @@ module view_tab_fit (w, d, h) {
66function tab_spacing (tab_width) = tab_width * 3.5; 101function tab_spacing (tab_width) = tab_width * 3.5;
67 102
68module add_tabs ( length, male=true, between=false ) { 103module add_tabs ( length, male=true, between=false ) {
69 tabs(length, tab_width=tab_width, tab_depth=tab_depth, tab_height=tab_height, male=male, tolerance=1, edge_padding=5, between=between); 104 tab_line(length, tab_width=tab_width, tab_depth=tab_depth, tab_height=tab_height, male=male, tolerance=1, edge_padding=5, between=between);
70} 105}
71 106
72module cubby_separator (depth, height) { 107module cubby_separator (depth, height) {
@@ -81,9 +116,9 @@ module cubby_separator (depth, height) {
81 } 116 }
82 117
83 module tab_bracket () { 118 module tab_bracket () {
84 bracket_height = outside_strut_thickness * 2; 119 bracket_height = thickness * 2;
85 difference() { 120 difference() {
86 cuboid([depth,outside_strut_thickness,bracket_height]); 121 cuboid([depth,thickness,bracket_height]);
87 add_tabs(depth, male=false, between=false); 122 add_tabs(depth, male=false, between=false);
88 add_tabs(depth, male=false, between=true); 123 add_tabs(depth, male=false, between=true);
89 } 124 }
@@ -94,7 +129,7 @@ module cubby_separator (depth, height) {
94 module screw_tab () { 129 module screw_tab () {
95 tab_width = 15; 130 tab_width = 15;
96 tab_height = 20; 131 tab_height = 20;
97 tab_thickness = outside_strut_thickness; 132 tab_thickness = thickness;
98 difference() { 133 difference() {
99 cuboid([tab_width, tab_thickness,tab_height], anchor=LEFT+TOP); 134 cuboid([tab_width, tab_thickness,tab_height], anchor=LEFT+TOP);
100 right(tab_width * (2 / 3)) zrot(90) yrot(90) { 135 right(tab_width * (2 / 3)) zrot(90) yrot(90) {
@@ -133,8 +168,8 @@ module strut_wall(w, h) {
133 sparse_strut( 168 sparse_strut(
134 l=w, 169 l=w,
135 h=h, 170 h=h,
136 thick=outside_strut_thickness, 171 thick=thickness,
137 maxang=45, 172 maxang=45,
138 strut=inside_strut_thickness 173 strut=strut_thickness
139 ) children(); 174 ) children();
140} 175}