Skip to content

Commit 0ec2678

Browse files
committed
[3d] Add new Threaded Insert NutHardware 4.3mm diameter
1 parent 7525d29 commit 0ec2678

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

3d/hm-case-43.scad

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ MouseEarHeight = 0;
2121
// Corner leg height (mm) - 0 to disable
2222
MouseLegHeight = 0; //body_chamfer_height/2;
2323
// Screw hardware
24-
NutHardware = 0; // [0:Captive Nut,1:Injection Threaded Insert]
24+
NutHardware = 0; // [0:Captive Nut,1:5mm Injection Threaded Insert,2:Threaded Insert]
2525

2626
/* [Hidden] */
2727
// External corner radius on the body (mm)
@@ -223,18 +223,22 @@ module nuttrap() {
223223
[nut_d/2+ww_w-nut_ingress_off+0.4+e, nut_ingress+0.8],
224224
[0,nut_ingress]]);
225225
}
226-
} else if (NutHardware == 1) { // Inection molding threaded insert
226+
} else if (NutHardware == 1 || NutHardware == 2) { // Threaded inserts
227+
// 5mm injected molding threaded insert (M3 x 5.4 x 5.2 tall)
228+
// 5.0mm dia 5mm tall, with 5.6mm alignment area at top 1.2mm tall
229+
// Threaded insert (M3 x 4.6 x 5.7 tall)
230+
// 4.3mm dia 5.5mm tall, with 4.8mm alignment area at top 1.2mm tall
231+
nhd = [[5.0, 5.0, 5.6], [4.3, 5.5, 4.8]][NutHardware-1];
227232
translate([0,0,h_b+wall_t-(h_b-screw_l+2)])
228233
difference() {
229-
// 5.0mm dia 5mm tall, with 5.6mm alignment area at top 1.2mm tall
230234
union() {
231-
cylinder((h_b-screw_l)+2, d=5.0+2*wall, $fn=24);
232-
cylinder(1.2-e, d1=5.6+2*wall, d2=5.0+2*wall, $fn=24);
233-
translate([(5.0+2*wall)/-2, -nut_ingress/2-d_off, 0])
234-
cube([5.0+2*wall, nut_ingress/2+d_off, (h_b-screw_l)+2]);
235+
cylinder((h_b-screw_l)+2, d=nhd[0]+2*wall, $fn=24);
236+
cylinder(1.2-e, d1=nhd[2]+2*wall, d2=nhd[0]+2*wall, $fn=24);
237+
translate([(nhd[0]+2*wall)/-2, -nut_ingress/2-d_off, 0])
238+
cube([nhd[0]+2*wall, nut_ingress/2+d_off, (h_b-screw_l)+2]);
235239
}
236-
cylinder(5+1.2, d=5.0, $fn=24);
237-
translate([0,0,-e]) cylinder(1.2, d1=5.6, d2=5.0, $fn=24); // alignment helper
240+
cylinder(nhd[1]+1.2, d=nhd[0], $fn=24);
241+
translate([0,0,-e]) cylinder(1.2, d1=nhd[2], d2=nhd[0], $fn=24); // alignment helper
238242
}
239243
}
240244
}
@@ -670,7 +674,7 @@ module cube_bchamfer(dim, r, top=0, bottom=0, $fn=$fn) {
670674
}
671675

672676
module fillet(radius, height=100, $fn=$fn) {
673-
if (radius > 0) {
677+
if (radius != undef && radius > 0) {
674678
//this creates acutal fillet
675679
translate([-radius, -radius, -height / 2 - 0.02]) difference() {
676680
cube([radius * 2, radius * 2, height + 0.04]);

0 commit comments

Comments
 (0)