-
Notifications
You must be signed in to change notification settings - Fork 7
/
B015_Polygonal_Bracket.scad
137 lines (130 loc) · 4.69 KB
/
B015_Polygonal_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
$fn=32;
//
// Meccano constants
//
inch=25.4;
axle_d=0.168*inch; // size for standard round Meccano axle
triaxle_round_d=0.172*inch; // sized to fit a standard Meccano triaxle rod
triaxle_flats_d=3.76; // ... YMMV
hole_d=0.171*inch;
//
// B015 bracket: the "elephant leg" bracket.
//
// V1.0 April 14, 2018 WH - the quick and dirty version
//
module B015_bracket() {
//
// bracket parameters
//
minor_hole_spacing=0.250*inch;
major_hole_interval=2;
major_hole_spacing=minor_hole_spacing*major_hole_interval;
//
width=0.5025*inch;
depth=0.246*inch;
hole_surround_d=0.326*inch;
border_w=0.050*inch;
inset_depth=0.080*inch;
inner_ridge_w=0.2365*inch;
line_w=0.046*inch;
segment1_holes=6;
segment2_holes=6;
segment3_holes=3;
bend1_angle=45;
bend2_angle=45;
// create the form of the bracket. this is used to create the
// inner cutout, the inner rampart and the actual outer form
module B015_form(end_r,form_width,form_depth) {
union() {
hull() {
cylinder(h=form_depth,r=end_r);
translate([0,-form_width/2,0])
cube([segment1_holes*minor_hole_spacing,form_width,form_depth]);
translate([segment1_holes*minor_hole_spacing,0,0])
cylinder(h=form_depth,r=form_width/2);
}
translate([segment1_holes*minor_hole_spacing,0,0])
rotate(bend1_angle)
union() {
hull() {
cylinder(h=form_depth,r=form_width/2);
translate([segment2_holes*minor_hole_spacing,0,0])
cylinder(h=form_depth,r=form_width/2);
}
translate([segment2_holes*minor_hole_spacing,0,0])
rotate(bend2_angle)
hull() {
cylinder(h=form_depth,r=form_width/2);
translate([0,-form_width/2,0])
cube([(segment3_holes-1)*minor_hole_spacing,form_width,form_depth]);
translate([(segment3_holes-1)*minor_hole_spacing,0,0])
cylinder(h=form_depth,r=end_r);
}
}
}
}
// remove the holes (spaced 1/4")
// or add hole surround (spaced 1/2")
module B015_holes(hole_r,spacing_multiplier) {
for( x=[0:spacing_multiplier:segment1_holes] ) {
translate([x*minor_hole_spacing,0,0])
cylinder(h=depth,r=hole_r);
}
translate([segment1_holes*minor_hole_spacing,0,0])
rotate(bend1_angle)
union() {
for( xy=[0:spacing_multiplier:segment2_holes] ) {
translate([xy*minor_hole_spacing,0,0])
cylinder(h=depth,r=hole_r);
}
translate([segment2_holes*minor_hole_spacing,0,0])
rotate(bend2_angle)
for( y=[0:spacing_multiplier:segment3_holes-1] ) {
translate([y*minor_hole_spacing,0,0])
cylinder(h=depth,r=hole_r);
}
}
}
// create the lines on the major (1/2" spaced) hole
module B015_lines(line_x,line_y,line_z) {
for( x=[major_hole_interval:major_hole_interval:segment1_holes-major_hole_interval] ) {
translate([x*minor_hole_spacing,0,line_z/2])
cube([line_x,line_y,line_z],center=true);
}
translate([segment1_holes*minor_hole_spacing,0,line_z/2])
rotate(bend1_angle/2)
cube([line_x,line_y,line_z],center=true);
translate([segment1_holes*minor_hole_spacing,0,0])
rotate(bend1_angle)
union() {
for( xy=[major_hole_interval:major_hole_interval:segment2_holes-major_hole_interval] ) {
translate([xy*minor_hole_spacing,0,line_z/2])
cube([line_x,line_y,line_z],center=true);
}
translate([segment2_holes*minor_hole_spacing,0,line_z/2])
rotate(bend2_angle/2)
cube([line_x,line_y,line_z],center=true);
translate([segment2_holes*minor_hole_spacing,0,0])
rotate(bend2_angle)
for( y=[major_hole_interval:major_hole_interval:(segment3_holes)-major_hole_interval] ) {
translate([y*minor_hole_spacing,0,line_z/2])
cube([line_x,line_y,line_z],center=true);
}
}
}
difference() {
union() {
difference() { // create the outer border
B015_form(hole_surround_d/2,width,depth);
B015_form(hole_surround_d/2-border_w,width-2*border_w,depth);
}
translate([0,0,inset_depth]) // add in the mid layer
B015_form(hole_surround_d/2,width,depth-2*inset_depth);
B015_lines(line_w,width,depth,major_hole_interval); // lines on major holes
B015_form(inner_ridge_w/2,inner_ridge_w,depth); // inner bit
B015_holes(hole_surround_d/2,major_hole_interval); // major hole surrounds
}
B015_holes(hole_d/2,1); // remove all the holes
}
}
B015_bracket();