-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbreadboard_mount.scad
More file actions
200 lines (160 loc) · 4.02 KB
/
Copy pathbreadboard_mount.scad
File metadata and controls
200 lines (160 loc) · 4.02 KB
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
center_screw=3.5; // loose
corner_screw=2; // tight
thru_gap=3.5;
zero=0.0001;
stand_tip=1; // extra diameter to add to stands
stand_base=stand_tip+thru_gap;
center_tip=center_screw+stand_tip;
center_base=center_screw+stand_base;
corner_tip=corner_screw+stand_tip;
corner_base=corner_screw+stand_base;
board_gap=0.5;
// https://www.amazon.com/ElectroCookie-Solderable-Breadboard-Electronics-Gold-Plated/dp/B07ZV8FWM4?th=1
board_z=1.6; // vernier
// mini
// board_x=38.1; // manufacturers specs
// board_y=50.8; // manufacturers specs
// corner_x=31.8; // manufacturers specs
// corner_y=44.5; // manufacturers specs
// center_y=40.6; // manufacturers specs
// half
board_y=88.9; // manufacturers specs
board_x=52.1; // manufacturers specs
corner_y=78.7; // manufacturers specs
corner_x=35.6; // manufacturers specs
center_y=73.7; // manufacturers specs
board_corner=(board_y-corner_y)/2;
wall=1;
base=wall;
side=wall; // outer skirt
min_side=side; // under skirt
$fn=90;
total_z=base+thru_gap+board_z;
screw_chamfer=0.5;
pad=0.1;
// these are halved for some reason
//top_chamfer=side*1.5;
bottom_chamfer=0.5;
top_chamfer=0.5;
module dirror_y(y=0) {
children();
translate([0,y])
mirror([0,1])
children();
}
module dirror_x(x=0) {
children();
translate([x,0])
mirror([1,0])
children();
}
module board(extra=0) {
offset(board_corner+extra*2)
offset(-board_corner)
square([board_x,board_y],center=true);
}
module place_center() {
dirror_y()
translate([0,center_y/2])
children();
}
module place_corner() {
dirror_y()
dirror_x()
translate([corner_x/2,corner_y/2])
children();
}
module body() {
difference() {
hull() {
translate([0,0,bottom_chamfer])
linear_extrude(height=total_z-top_chamfer-bottom_chamfer)
board(board_gap+side);
linear_extrude(height=zero)
board(board_gap+side-bottom_chamfer/2);
translate([0,0,total_z-zero])
linear_extrude(height=zero)
board(board_gap+side-top_chamfer/2);
}
translate([0,0,base])
linear_extrude(height=total_z)
board(board_gap);
}
}
module stands() {
place_center()
translate([0,0,base])
cylinder(d2=center_tip,d1=center_base,h=thru_gap);
place_corner()
translate([0,0,base])
cylinder(d2=corner_tip,d1=corner_base,h=thru_gap);
}
module case() {
difference() {
union() {
children();
stands();
}
place_center()
translate([0,0,-pad]) {
cylinder(d=center_screw,h=total_z+pad*2);
cylinder(d1=center_screw+screw_chamfer*2+pad*2,d2=center_screw,h=screw_chamfer+pad);
}
place_corner()
translate([0,0,-pad]) {
cylinder(d=corner_screw,h=total_z+pad*2);
cylinder(d1=corner_screw+screw_chamfer*2+pad*2,d2=corner_screw,h=screw_chamfer+pad);
}
}
}
module min_body() {
difference() {
hull() {
translate([0,0,bottom_chamfer])
linear_extrude(height=base+thru_gap-bottom_chamfer)
board();
linear_extrude(height=zero)
board(-bottom_chamfer/2);
}
translate([0,0,base])
linear_extrude(height=total_z)
board(-min_side);
}
}
module no_skirt_body() {
// must override this
bottom_chamfer=base/4;
hull() {
translate([0,0,bottom_chamfer])
linear_extrude(height=base-bottom_chamfer)
board();
linear_extrude(height=zero)
board(-bottom_chamfer/2);
}
}
// RENDER stl
module no_skirt() {
intersection() {
case()
no_skirt_body();
translate([0,0,-pad])
linear_extrude(height=total_z)
board();
}
}
side_skirt();
// RENDER stl
module under_skirt() {
intersection() {
case()
min_body();
translate([0,0,-pad])
linear_extrude(height=total_z)
board();
}
}
// RENDER stl
module side_skirt() {
case()
body();
}