Skip to content

Commit 334ded4

Browse files
committed
Rename box attachments/eyelets to mounting screws
1 parent 7154451 commit 334ded4

File tree

2 files changed

+30
-30
lines changed

2 files changed

+30
-30
lines changed

electronics/project-box/project-box-library.scad

+15-15
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ function vec_add(v, add) = [for (i = v) i + add];
2424

2525
function eyelet_thickness() = $e_thickness * 2;
2626

27-
function attachment_screw_xpos() = $e_thickness + $e_attachment_screw_diameter * 1.125;
27+
function mounting_screw_xpos() = $e_thickness + $e_mounting_screw_diameter * 1.125;
2828

29-
function attachment_screw_eyelet_d() = $e_attachment_screw_diameter * 1.125;
29+
function mounting_screw_eyelet_d() = $e_mounting_screw_diameter * 1.125;
3030

3131
// Public Modules //
3232

@@ -38,9 +38,9 @@ module ebox(
3838
insert_diameter=4.5,
3939
insert_depth=10,
4040
screw_style="flag",
41-
attachment_screw_diameter=4,
42-
attachment_screw_style="flat",
43-
screw_eyelets=true,
41+
mounting_screws=true,
42+
mounting_screw_diameter=4,
43+
mounting_screw_style="flat",
4444
fill_lid=0,
4545
fill_bottom=0,
4646
fill_walls=[0, 0, 0, 0]
@@ -55,9 +55,9 @@ module ebox(
5555
$e_insert_diameter = insert_diameter;
5656
$e_insert_depth = insert_depth;
5757
$e_screw_style = screw_style;
58-
$e_attachment_screw_diameter = attachment_screw_diameter;
59-
$e_attachment_screw_style = attachment_screw_style;
60-
$e_screw_eyelets = screw_eyelets;
58+
$e_mounting_screws = mounting_screws;
59+
$e_mounting_screw_diameter = mounting_screw_diameter;
60+
$e_mounting_screw_style = mounting_screw_style;
6161
$e_fill_lid = fill_lid;
6262
$e_fill_bottom = fill_bottom;
6363
$e_fill_walls = fill_walls;
@@ -203,7 +203,7 @@ module _at_screws() {
203203
module _at_box_screws() {
204204
for (mx = [0, 1])
205205
mirror([mx, 0])
206-
translate([$e_width / 2 + attachment_screw_xpos(), 0])
206+
translate([$e_width / 2 + mounting_screw_xpos(), 0])
207207
children();
208208
}
209209

@@ -271,7 +271,7 @@ module _box_body() {
271271
}
272272

273273
module _box_screw_eyelets() {
274-
eyelet_round = attachment_screw_xpos() * 2;
274+
eyelet_round = mounting_screw_xpos() * 2;
275275
_round_3d()
276276
translate([0, 0, $e_edge_radius])
277277
linear_extrude(height=eyelet_thickness() - $e_edge_radius * 2)
@@ -283,7 +283,7 @@ module _box_screw_eyelets() {
283283
_box_shape();
284284
_at_box_screws()
285285
union() {
286-
d = attachment_screw_eyelet_d();
286+
d = mounting_screw_eyelet_d();
287287
circle(d=d * 2);
288288
translate([-d, 0])
289289
square(d * 2, center=true);
@@ -294,10 +294,10 @@ module _box_screw_eyelets() {
294294
module _box_screws() {
295295
_at_box_screws()
296296
_screw_hole(
297-
d=$e_attachment_screw_diameter,
297+
d=$e_mounting_screw_diameter,
298298
fit=$e_screw_fit,
299299
h=eyelet_thickness() + slop * 2,
300-
style=$e_attachment_screw_style
300+
style=$e_mounting_screw_style
301301
);
302302
}
303303

@@ -331,7 +331,7 @@ module _box() {
331331
difference() {
332332
intersection() {
333333
union() {
334-
if ($e_screw_eyelets)
334+
if ($e_mounting_screws)
335335
_box_screw_eyelets();
336336
_box_body();
337337
}
@@ -343,7 +343,7 @@ module _box() {
343343
_at_screws()
344344
translate([0, 0, ($e_height + $e_thickness) - $e_lid_height - $e_insert_depth])
345345
_screw_hole(d=$e_insert_diameter, fit=$e_screw_fit, h=$e_insert_depth + $e_thickness);
346-
if ($e_screw_eyelets)
346+
if ($e_mounting_screws)
347347
_box_screws();
348348
_box_patterns();
349349
ebox_cutouts();

electronics/project-box/project-box.scad

+15-15
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,21 @@ Thickness = 2.4;
2121
Lid_Height = 3.9;
2222

2323
Screw_Diameter = 3.0;
24+
Screw_Style = "flat"; // [flat: Flat, countersink: Countersink, inset: Inset]
2425
Insert_Diameter = 4.5;
25-
Attachment_Screw_Diameter = 4.0;
2626
Insert_Depth = 10;
2727

28+
/* [Mounting Screws] */
29+
Mounting_Screws = true;
30+
Mounting_Screw_Diameter = 4.0;
31+
Mounting_Screw_Style = "flat"; // [flat: Flat, countersink: Countersink, inset: Inset]
32+
33+
/* [Hexagon Fill Pattern] */
34+
Fill_Bottom = false;
35+
Fill_Lid = false;
36+
// 1 = fill, 0 = no fill
37+
Fill_Walls = [0, 0, 0, 0]; // [0:1:1]
38+
2839
/* [PCB] */
2940
PCB_Mount = true;
3041
PCB_Dimensions = [40, 40];
@@ -33,17 +44,6 @@ PCB_Screw_Diameter = 3.0;
3344
PCB_Insert_Diameter = 4.5;
3445
PCB_Mount_Height = 5;
3546

36-
/* [Features] */
37-
Screw_Eyelets = true;
38-
Screw_Style = "flat"; // [flat: Flat, countersink: Countersink, inset: Inset]
39-
Attachment_Screw_Style = "flat"; // [flat: Flat, countersink: Countersink, inset: Inset]
40-
41-
/* [Hexagon Fill Pattern] */
42-
Fill_Bottom = false;
43-
Fill_Lid = false;
44-
// 1 = fill, 0 = no fill
45-
Fill_Walls = [0, 0, 0, 0]; // [0:1:1]
46-
4747
/* [Advanced Options] */
4848
Screw_Inset = 4;
4949
Corner_Radius = 3; // [0:0.1:5]
@@ -115,9 +115,9 @@ ebox(
115115
insert_diameter=Insert_Diameter,
116116
insert_depth=Insert_Depth,
117117
screw_style=Screw_Style,
118-
attachment_screw_diameter=Attachment_Screw_Diameter,
119-
attachment_screw_style=Attachment_Screw_Style,
120-
screw_eyelets=Screw_Eyelets,
118+
mounting_screws=Mounting_Screws,
119+
mounting_screw_diameter=Mounting_Screw_Diameter,
120+
mounting_screw_style=Mounting_Screw_Style,
121121
fill_lid=Fill_Lid,
122122
fill_bottom=Fill_Bottom,
123123
fill_walls=Fill_Walls

0 commit comments

Comments
 (0)