-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path3-piece-corner-bracket.scad
214 lines (201 loc) · 7.55 KB
/
3-piece-corner-bracket.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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
use <vslot.scad>;
testPiece = false;
xExtrusionWidthSections = 2;
xExtrusionDepthSections = 1;
xExtrusionLength = 60;
xEndClosed = true;
yExtrusionWidthSections = 2;
yExtrusionDepthSections = 1;
yExtrusionLength = 60;
yEndClosed = true;
zExtrusionWidthSections = 2;
zExtrusionDepthSections = 1;
zExtrusionLength = 90;
zEndClosed = false;
xyPlaneOffset = 20;
oversize = 0.3;
lengthHoleSpacing=20;
wallWidth=7;
screwHeight=5;
largeHoleIndent=wallWidth-screwHeight+1;
vslotIndentHeight=1;
sectionWidth=20;
if (testPiece) {
difference() {
linear_extrude(height=zExtrusionLength)
square([
sectionWidth*zExtrusionWidthSections+wallWidth*2,
sectionWidth*zExtrusionDepthSections+wallWidth*2
]);
translate([wallWidth, wallWidth, 0]) {
linear_extrude(height=zExtrusionLength)
VSlot2dProfile(
sectionCountWidth=zExtrusionWidthSections,
sectionCountDepth=zExtrusionDepthSections,
indentHeight=vslotIndentHeight,
oversize=oversize
);
};
negativeSpaceHoles(
extrusionLength=zExtrusionLength,
fullIndentHeight=wallWidth+vslotIndentHeight,
firstIndentOffset=wallWidth,
widthSections=zExtrusionWidthSections,
lengthHoleSpacing=lengthHoleSpacing
);
};
}
else {
ThreeCornerVslot(
sectionWidth = sectionWidth,
wallWidth = wallWidth,
vslotIndentHeight = vslotIndentHeight,
xExtrusionWidthSections = xExtrusionWidthSections,
xExtrusionDepthSections = xExtrusionDepthSections,
xExtrusionLength = xExtrusionLength,
xEndClosed = xEndClosed,
yExtrusionWidthSections = yExtrusionWidthSections,
yExtrusionDepthSections = yExtrusionDepthSections,
yExtrusionLength = yExtrusionLength,
yEndClosed = yEndClosed,
zExtrusionWidthSections = zExtrusionWidthSections,
zExtrusionDepthSections = zExtrusionDepthSections,
zExtrusionLength = zExtrusionLength,
zEndClosed = zEndClosed,
oversize = oversize,
lengthHoleSpacing = lengthHoleSpacing,
xyPlaneOffset = xyPlaneOffset
);
}
module ThreeCornerVslot(
sectionWidth = 20,
wallWidth = 5,
vslotIndentHeight = 1,
xExtrusionWidthSections = 2,
xExtrusionDepthSections = 1,
xExtrusionLength = 70,
xEndClosed = true,
yExtrusionWidthSections = 2,
yExtrusionDepthSections = 1,
yExtrusionLength = 70,
yEndClosed = true,
zExtrusionWidthSections = 1,
zExtrusionDepthSections = 2,
zExtrusionLength = 70,
zEndClosed = true,
lengthHoleSpacing = 20,
xyPlaneOffset = 20,
oversize = 0.4
)
{
xEndOffset =
xEndClosed
? wallWidth+vslotIndentHeight
: 2*wallWidth + sectionWidth*zExtrusionWidthSections;
yEndOffset =
yEndClosed
? vslotIndentHeight
: wallWidth + sectionWidth*zExtrusionDepthSections;
zEndOffset = zEndClosed ? wallWidth : 0;
difference() {
hull() {
translate ([0,0,-xyPlaneOffset])linear_extrude(height=zExtrusionLength)
square([
sectionWidth*zExtrusionWidthSections+wallWidth*2,
sectionWidth*zExtrusionDepthSections+wallWidth*2
]);
rotate([0,-90,0])
linear_extrude(height=xExtrusionLength)
square([
sectionWidth*xExtrusionWidthSections + 2*wallWidth,
wallWidth
]);
translate([sectionWidth*zExtrusionWidthSections + wallWidth,
sectionWidth*zExtrusionDepthSections + wallWidth,
0
])
rotate([-90,-90,0])
linear_extrude(height=yExtrusionLength)
square([
sectionWidth*yExtrusionWidthSections + 2*wallWidth,
wallWidth
]);
};
translate([wallWidth, wallWidth, zEndOffset-xyPlaneOffset]) {
linear_extrude(height=zExtrusionLength-zEndOffset)
VSlot2dProfile(
sectionCountWidth=zExtrusionWidthSections,
sectionCountDepth=zExtrusionDepthSections,
indentHeight=vslotIndentHeight,
oversize=oversize
);
};
translate([0, 0, -xyPlaneOffset])
negativeSpaceHoles(
extrusionLength=zExtrusionLength+xyPlaneOffset,
largeHoleIndent = largeHoleIndent,
fullIndentHeight=wallWidth+vslotIndentHeight,
firstIndentOffset=wallWidth,
widthSections=zExtrusionWidthSections,
lengthHoleSpacing=lengthHoleSpacing
);
rotate([0,-90,0]) {
translate([wallWidth, wallWidth, -xEndOffset])
linear_extrude(height=xExtrusionLength+xEndOffset)
VSlot2dProfile(
sectionCountWidth=xExtrusionWidthSections,
sectionCountDepth=xExtrusionDepthSections,
indentHeight=vslotIndentHeight,
oversize=oversize
);
negativeSpaceHoles(
extrusionLength=xExtrusionLength,
largeHoleIndent = largeHoleIndent,
fullIndentHeight=wallWidth+vslotIndentHeight,
firstIndentOffset=wallWidth,
widthSections=xExtrusionWidthSections,
lengthHoleSpacing=lengthHoleSpacing
);
};
translate([zExtrusionWidthSections*sectionWidth+wallWidth*2,0,0])
rotate([0,0,90])
translate([0, 0, -xyPlaneOffset])
negativeSpaceHoles(
extrusionLength=zExtrusionLength+xyPlaneOffset,
largeHoleIndent = largeHoleIndent,
fullIndentHeight=wallWidth+vslotIndentHeight,
firstIndentOffset=wallWidth,
widthSections=zExtrusionDepthSections,
lengthHoleSpacing=lengthHoleSpacing
);
translate([
sectionWidth*(zExtrusionWidthSections-yExtrusionDepthSections),
sectionWidth*zExtrusionDepthSections+wallWidth-yEndOffset,
0])
{
rotate([-90,-90,0]) {
translate([wallWidth, wallWidth, 0])
linear_extrude(height=yExtrusionLength+yEndOffset)
VSlot2dProfile(
sectionCountWidth=yExtrusionWidthSections,
sectionCountDepth=yExtrusionDepthSections,
indentHeight=vslotIndentHeight,
oversize=oversize
);
};
};
translate([sectionWidth*zExtrusionWidthSections + wallWidth*2,
sectionWidth*zExtrusionDepthSections + wallWidth,
sectionWidth*yExtrusionWidthSections + wallWidth*2
])
rotate([0,90,90])
negativeSpaceHoles(
extrusionLength=yExtrusionLength,
largeHoleIndent = largeHoleIndent,
fullIndentHeight=wallWidth+vslotIndentHeight,
firstIndentOffset=wallWidth,
widthSections=yExtrusionWidthSections,
lengthHoleSpacing=lengthHoleSpacing
);
};
}