diff options
author | Steven <steven.vasilogianis@gmail.com> | 2021-04-18 17:01:51 -0400 |
---|---|---|
committer | Steven <steven.vasilogianis@gmail.com> | 2021-04-18 17:01:51 -0400 |
commit | 4d4f285400f96ca15db349887a2a7faede1d08a3 (patch) | |
tree | 26c011afd3d6292b77216d01b401fa94ad66c433 | |
parent | b56a49ec6cad0ef87cd4fbb2e54ee83ab9877251 (diff) |
Put mortises for dividers onto their own cub
-rw-r--r-- | cubbies.scad | 90 |
1 files changed, 43 insertions, 47 deletions
diff --git a/cubbies.scad b/cubbies.scad index c863d47..06aaa62 100644 --- a/cubbies.scad +++ b/cubbies.scad | |||
@@ -1,8 +1,8 @@ | |||
1 | include <BOSL2/std.scad> | 1 | include <BOSL2/std.scad> |
2 | include <BOSL2/walls.scad> | 2 | include <BOSL2/walls.scad> |
3 | include <BOSL2/distributors.scad> | ||
4 | include <BOSL2/joiners.scad> | 3 | include <BOSL2/joiners.scad> |
5 | 4 | ||
5 | |||
6 | wall_thickness = 5; | 6 | wall_thickness = 5; |
7 | bottom_thickness = 5; | 7 | bottom_thickness = 5; |
8 | strut_thickness = 5; | 8 | strut_thickness = 5; |
@@ -11,27 +11,19 @@ border_thickness = 5; | |||
11 | dovetail_depth = border_thickness; | 11 | dovetail_depth = border_thickness; |
12 | dovetail_height = 3; | 12 | dovetail_height = 3; |
13 | dovetail_width = 3; | 13 | dovetail_width = 3; |
14 | 14 | dovetail_spacing = 20; | |
15 | dovetail_from_edge = 10; | ||
15 | dovetail_tolerance = 0.75; | 16 | dovetail_tolerance = 0.75; |
17 | |||
16 | dovetail_tolerance2 = dovetail_tolerance * 2; | 18 | dovetail_tolerance2 = dovetail_tolerance * 2; |
17 | 19 | ||
20 | |||
18 | module cubby (width, depth, divider_height) { | 21 | module cubby (width, depth, divider_height) { |
19 | bottom(width, depth); | 22 | back(-100) xrot(180) bottom(width, depth); |
20 | left(6) side(width, depth, divider_height); | 23 | //lbottom(width, depth); |
24 | left(5) side(width, depth, divider_height); | ||
21 | } | 25 | } |
22 | 26 | ||
23 | /* module cubby_joints (depth) { */ | ||
24 | /* joint_offset = 10; */ | ||
25 | /* joint_distance = 20; */ | ||
26 | |||
27 | /* for ( i = 0; i < depth - joint_offset; i += joint_distance ) { */ | ||
28 | /* ; */ | ||
29 | /* } */ | ||
30 | /* } */ | ||
31 | |||
32 | dovetail_spacing = 20; | ||
33 | dovetail_from_edge = 10; | ||
34 | |||
35 | module bottom(width, depth) { | 27 | module bottom(width, depth) { |
36 | tenon_positions = [ [5, TOP], [-5, BOTTOM] ]; | 28 | tenon_positions = [ [5, TOP], [-5, BOTTOM] ]; |
37 | 29 | ||
@@ -43,12 +35,13 @@ module bottom(width, depth) { | |||
43 | strut=strut_thickness, | 35 | strut=strut_thickness, |
44 | anchor=BOTTOM+BACK+RIGHT) { | 36 | anchor=BOTTOM+BACK+RIGHT) { |
45 | for ( pos = tenon_positions) { | 37 | for ( pos = tenon_positions) { |
46 | back(pos[0]) { | 38 | attach(pos[1]) { |
47 | attach(pos[1]) { | 39 | back(pos[0]) { |
48 | ycopies(20, ceil((depth / 25) + 1)) { | 40 | ycopies(dovetail_spacing, calculate_dovetails(depth)) { |
49 | color("blue") cuboid([dovetail_height,dovetail_width, dovetail_depth], anchor=BOTTOM+BACK+CENTER); | 41 | color("blue") cuboid( |
50 | /* dovetail("male", */ | 42 | [dovetail_height, dovetail_width, dovetail_depth], |
51 | /* slide=4, width=dovetail_width, taper=0, height=dovetail_height); */ | 43 | anchor=BOTTOM+BACK+CENTER |
44 | ); | ||
52 | } | 45 | } |
53 | } | 46 | } |
54 | } | 47 | } |
@@ -58,53 +51,56 @@ module bottom(width, depth) { | |||
58 | } | 51 | } |
59 | 52 | ||
60 | module side(width, depth, divider_height) { | 53 | module side(width, depth, divider_height) { |
54 | mortise_beam_height = dovetail_height + 5; | ||
61 | mortise_positions = [5, -5]; | 55 | mortise_positions = [5, -5]; |
56 | |||
62 | diff("remove") { | 57 | diff("remove") { |
63 | bottom_half() sparse_strut( | 58 | sparse_strut( |
64 | h=divider_height, | 59 | h=divider_height - mortise_beam_height, |
65 | l=depth, | 60 | l=depth, |
66 | thick=border_thickness, | 61 | thick=border_thickness, |
67 | maxang=45, | 62 | maxang=45, |
68 | strut=strut_thickness, | 63 | strut=strut_thickness, |
69 | anchor=BOTTOM+BACK+RIGHT | 64 | anchor=BOTTOM+BACK+RIGHT |
70 | ) { | 65 | ) { |
71 | back(dovetail_tolerance) | 66 | attach (BOTTOM) { |
72 | up(6) | 67 | cuboid([border_thickness,depth,mortise_beam_height]); |
73 | attach(BOTTOM) { | 68 | } |
69 | |||
70 | back(dovetail_tolerance) up(2) attach(BOTTOM) { | ||
74 | for ( pos = mortise_positions ) { | 71 | for ( pos = mortise_positions ) { |
75 | back(pos) { | 72 | back(pos) { |
76 | ycopies(20, ceil((depth / 25) + 1)) { | 73 | ycopies(dovetail_spacing, calculate_dovetails(depth)) { |
77 | color("green") | 74 | color("green") #cuboid( |
78 | cuboid( | ||
79 | [dovetail_depth + dovetail_tolerance2, | 75 | [dovetail_depth + dovetail_tolerance2, |
80 | dovetail_height + dovetail_tolerance2, | 76 | dovetail_height + dovetail_tolerance2, |
81 | dovetail_width + dovetail_tolerance2], | 77 | dovetail_width + dovetail_tolerance2], |
82 | $tags="remove", | 78 | $tags="remove", |
83 | anchor=BOTTOM+BACK+CENTER | 79 | anchor=BOTTOM+BACK+CENTER |
84 | ); | 80 | ); |
85 | /* color("red") dovetail( */ | ||
86 | /* "female", */ | ||
87 | /* slide=4, */ | ||
88 | /* width=dovetail_width, */ | ||
89 | /* height=dovetail_height, */ | ||
90 | /* extra=dovetail_tolerance2, */ | ||
91 | /* taper=0, */ | ||
92 | /* $tags="removeOff"); */ | ||
93 | } | 81 | } |
94 | } | 82 | } |
95 | } | 83 | } |
96 | } | 84 | } |
97 | } | 85 | } |
98 | |||
99 | } | 86 | } |
100 | } | 87 | } |
101 | 88 | ||
102 | //cubby(20, 80, 50); | 89 | function calculate_dovetails (depth) = |
103 | cubby(50, 190, 150); | 90 | 1 + ceil((depth - (dovetail_from_edge * 2)) / (dovetail_spacing + dovetail_width)); |
104 | 91 | ||
105 | 92 | ||
106 | /* left(-100) diff("remove") */ | 93 | cubby(10, 100, 50); |
107 | /* cuboid([50,30,10]){ */ | 94 | //cubby(50, 190, 150); |
108 | /* attach(BACK) dovetail("male", slide=10, width=15, height=8); */ | 95 | |
109 | /* attach(FRONT) dovetail("female", slide=10, width=15, height=8, $tags="remove"); */ | 96 | |
110 | /* } */ | 97 | |
98 | /* diff("remove") { */ | ||
99 | /* cuboid([50,30,10]) { */ | ||
100 | /* position(TOP+BACK) { */ | ||
101 | /* xcopies(10,5) { */ | ||
102 | /* dovetail("female", slide=10, width=7, taper=0, height=4, $tags="remove",anchor=BOTTOM+FRONT,spin=180); */ | ||
103 | /* } */ | ||
104 | /* } */ | ||
105 | /* } */ | ||
106 | /* } */ | ||