wobblyhead hg > 3dprints > hinged_box
diff main.scad @ 4:80122df4a6c5
reinforced latch hook
| author | ark |
|---|---|
| date | 2026-11-16 11:01 +0100 |
| parents | e8b0aed6e3d8 |
| children | fdd022a1bfb1 |
line wrap: on
line diff
--- a/main.scad Sat Nov 07 03:17:57 2026 +0100 +++ b/main.scad Mon Nov 16 11:01:08 2026 +0100 @@ -137,13 +137,14 @@ plate_t = latch_layers*lh; plate_u = knuckle_u + knuckle_r + 2*cl; plate_bz = bar_z - hook_ro - latch_grip; -latch_slot = (latch_width - 2*knuckle_gap)/3; +// a latch wider than the hinge span is narrowed to it +latch_w = min(latch_width, hinge_span); +latch_slot = (latch_w - 2*knuckle_gap)/3; // y start of the two outer latch slots -latch_outer_y0 = [-latch_width/2, latch_slot/2 + knuckle_gap]; +latch_outer_y0 = [-latch_w/2, latch_slot/2 + knuckle_gap]; assert(_detent(90) > latch_detent, "latch_detent too large for the filament bar"); assert(knuckle_l > 2*lw, "hinge knuckles too short, reduce hinge_knuckles"); -assert(latch_width <= hinge_span, "latch wider than the box front"); assert(body_ih > 0, "inner height too low for the lid"); assert(chamfer_h <= floor_t, "chamfer higher than the floor"); @@ -163,6 +164,10 @@ echo("body height", seam_z, "mm, lid height", lid_h, "mm, body ratio", body_ih/inner_height); echo("pin hole", pin_d, "mm, knuckle diameter", 2*knuckle_r, "mm"); echo("hinge knuckle length", knuckle_l, "mm"); +if (latch_w < latch_width) + echo(str("WARNING: latch_width ", latch_width, " is wider than the box front, using ", + latch_w)); +echo("latch width", latch_w, "mm"); echo("latch plate outer face", plate_u + plate_t, "mm from the front"); echo("latch hook reaches", hook_a, "degrees past the bar bottom, detent", _detent(hook_a), "mm"); echo("lid sweep clearance over centred paper", sweep_margin, "mm"); @@ -205,12 +210,12 @@ module _latch_pin() { translate([latch_x, 0, latch_z]) rotate([90, 0, 0]) - cylinder(d=pin_d, h=latch_width + 2, center=true); + cylinder(d=pin_d, h=latch_w + 2, center=true); } module _bar_pin() { translate([latch_x, 0, bar_z]) rotate([90, 0, 0]) - cylinder(d=pin_d, h=latch_width + 2, center=true); + cylinder(d=pin_d, h=latch_w + 2, center=true); } module body() { @@ -287,14 +292,21 @@ // in assembly position, closed module latch() { // hook around the bar, from the plate side down under the bar and - // hook_a degrees up its wall side + // hook_a degrees up its wall side. its back is filled with a web down + // to the plate, sloped like the knuckle webs. a web reaching closer + // than 2 extrusions to the grip edge is cut off there, but never above + // the bottom of the hook module _hook() { tip_a = 270 - hook_a; + web_z = bar_z - hook_ro - (plate_u - knuckle_u); + cut_z = min(plate_bz + 2*lw, bar_z - hook_ro); difference() { - hull() { - translate([knuckle_u, bar_z]) circle(r=hook_ro); - translate([knuckle_u, bar_z - hook_ro]) - square([plate_u - knuckle_u + epsilon, hook_ro]); + intersection() { + hull() { + translate([knuckle_u, bar_z]) circle(r=hook_ro); + translate([plate_u, web_z]) square([epsilon, bar_z - web_z]); + } + translate([0, cut_z]) square([plate_u + epsilon, bar_z - cut_z]); } translate([knuckle_u, bar_z]) circle(r=hook_ri); // open wedge over the top and the wall side of the bar @@ -307,7 +319,7 @@ difference() { _front() union() { - _yslab(-latch_width/2, latch_width/2) + _yslab(-latch_w/2, latch_w/2) translate([plate_u, plate_bz]) square([plate_t, latch_z - plate_bz]); _yslab(-latch_slot/2, latch_slot/2) { hull() { @@ -338,12 +350,12 @@ color("steelblue") body(); if (preview_hardware && $preview) { _filament(hinge_x, seam_z, hinge_span); - _filament(latch_x, bar_z, latch_width); + _filament(latch_x, bar_z, latch_w); } translate([hinge_x, 0, seam_z]) rotate([0, preview_lid_angle, 0]) translate([-hinge_x, 0, -seam_z]) { color("lightsteelblue") lid(); - if (preview_hardware && $preview) _filament(latch_x, latch_z, latch_width); + if (preview_hardware && $preview) _filament(latch_x, latch_z, latch_w); translate([latch_x, 0, latch_z]) rotate([0, preview_latch_angle, 0]) translate([-latch_x, 0, -latch_z]) color("orange") latch(); }
