-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwork_shelf.scad
155 lines (130 loc) · 6.06 KB
/
work_shelf.scad
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
////MY work shelf
/////////////////////////////////////////////////////
//////////////////// PARAMETERS ////////////////////
/////////////////////////////////////////////////////
height = 18; //material thickness
ply_h = 2; //ply thickness (for paneling)
ply_l = 600; //ply length (for paneling)
top_shelf_xtra_height = 100;
length = 200; //depth of shelf
w1 = 900; // outside width1
w2 = 600; // outside width2
middle_support_width1=100;
middle_support_width2=50;
num_selves = 2;
shelf_height = 200;
actual_shelf_height = shelf_height - height;
W = 1200; //4 feet sheet, square
/////////////////////////////////////////////////////
/////////////////////// RENDER /////////////////////
/////////////////////////////////////////////////////
//side_support();
//single_shelf();
//complete assembly of the bench
full_assembly();
//square([W, W]); //4 feetx 4 feet square
//uncomment below and render, then export/save as dxf file for routing
//projection(cut=false) dxf_assembly();
/////////////////////////////////////////////////////
/////////////////////// Module /////////////////////
/////////////////////////////////////////////////////
// dxf assembly perfectly fits a 3 feet by 2 feet bench,
// 20 cms deep 2 shelf into a 4 feet x 4 feet
// mdf/ply board
module dxf_assembly() {
union() {
translate( [0, length, 0] ) rotate( [0,0,270] ) single_shelf();
translate( [1.2*length + 0, 1.2*length + length, 0] ) rotate( [0,0,270] ) single_shelf();
translate( [2.4*length + 0, 1.4*length + length, 0] ) side_support();
translate( [3.6*length + 0, 1.4*length + length, 0] ) side_support();
for( i = [0 : 1 : 4] )
translate( [4.8*length + 0, 1.4*length + length + i*1.5*middle_support_width1, 0] ) middle_support(middle_support_width1);
for( i = [0 : 1 : 1] )
translate( [4.8*length + 0, 0*length + 0*length + i*1.2*middle_support_width1, 0] ) middle_support(middle_support_width1);
for( i = [0 : 1 : 2] )
translate( [0, 2.4*length + length + i*1.5*middle_support_width1, 0] ) middle_support(middle_support_width1);
for( i = [0 : 1 : 3] )
translate( [1.2*length, 3.6*length + length + i*1.5*middle_support_width2, 0] ) middle_support(middle_support_width2);
}
}
//assembly of the whole bench
module full_assembly() {
union() {
rotate( [90, 0, 0] ) side_support();
for( i = [ shelf_height : shelf_height : shelf_height*num_selves ] )
{
rotate( [0, 0, 180] ) translate( [-length, -w1, i - height] ) single_shelf();
}
translate( [w1 - 1.5*length, w2 + length/2, 0] ) rotate( [90, 0, 90] ) side_support();
for( n = [0 : 1 : num_selves - 1] )
{
translate( [0,0,n*shelf_height] ) {
for(j = [0 : w1/3 : w1 - 1] )
translate([ height, j, 0 ]) rotate( [90, -90, -90] ) middle_support(middle_support_width1);
for(j = [0 : w2/2 : w2 - 1] )
translate( [w2 - j, w1, 0] ) rotate( [90, -90, 0] ) middle_support(middle_support_width1);
#translate([ length, w1/2, 0 ]) rotate( [90, -90, -90] ) middle_support(middle_support_width2);
#translate([ w2/2, w1 - length + height, 0 ]) rotate( [90, -90, 0] ) middle_support(middle_support_width2);
}
}
#translate( [0, -height, 0] ) rotate( [0,-90,0] ) cube( [ply_l, w1 + height, ply_h] );
#translate( [w2 + height, w1, 0] ) rotate( [0,-90,90] ) cube( [ply_l, w2 + height, ply_h] );
}
}
//a single shelf
module single_shelf(peg = true) {
difference() {
union() {
plank_withNotches(length, height, w1);
translate( [ length, 0 , 0] ) rotate( [ 0, 0, 90] ) plank_withNotches(length, height, w2);
}
if( peg )
{
translate( [ 0, length - 10 , 0] )
for(i = [ 25.4 : 25.4 : 60 ] )
for(j = [ 25.4 : 25.4 : w1 - length] )
translate( [i, j, 0] ) cylinder( r = 25.4 / 8, h = height );
translate( [ -w2 +20 , length - 3*25.4 , 0] )
for(i = [ length : 25.4 : w2 ] )
for(j = [ 25.4 : 25.4 : 60] )
translate( [i, j, 0] ) cylinder( r = 25.4 / 8, h = height );
}
}
}
//partial self
module plank_withNotches(l, h, w) {
union() {
cube( [ l, w, h], false );
//notches
translate( [l/3 - h/2, w - h, 0] ) cube( [h, 2*h, h], false );
translate( [2*l/3 - h/2, w - h, 0] ) cube( [h, 2*h, h], false );
}
}
//side supports of the bench
module side_support(peg = true) {
difference() {
cube( [length, top_shelf_xtra_height + shelf_height*( 1 + num_selves), height] );
for( i = [ shelf_height : shelf_height : shelf_height*num_selves ] )
{
translate( [length/3 - height/2, i - height, 0] ) cube( [height, height, height], false );
translate( [2*length/3 - height/2, i - height, 0] ) cube( [height, height, height], false );
}
if( peg )
{
for(n = [ 0 : 1 : num_selves - 1] )
translate( [0, n*shelf_height, 0] )
for(i = [ 25.4 : 25.4 : length ] )
for(j = [ 25.4 : 25.4 : shelf_height - 30] )
translate( [i, j, 0] ) cylinder( r = 25.4 / 8, h = height );
translate( [0, num_selves*shelf_height, 0] )
for(i = [ 25.4 : 25.4 : length ] )
for(j = [ 25.4 : 25.4 : top_shelf_xtra_height + shelf_height - 30] )
translate( [i, j, 0] ) cylinder( r = 25.4 / 8, h = height );
}
}
}
// Small boards used to distribute the shelves weight
// along the front/back edge
module middle_support(w) {
cube( [actual_shelf_height, w, height ], false );
}