wobblyhead hg > 3dprints > hinged_box
changeset 4:80122df4a6c5
reinforced latch hook
| author | ark |
|---|---|
| date | 2026-11-16 11:01 +0100 |
| parents | a9b270c1da96 |
| children | fdd022a1bfb1 |
| files | README.md main.json main.scad |
| diffstat | 3 files changed, 97 insertions(+), 20 deletions(-) [+] |
line wrap: on
line diff
--- a/README.md Sat Nov 07 03:17:57 2026 +0100 +++ b/README.md Mon Nov 16 11:01:08 2026 +0100 @@ -21,8 +21,11 @@ The latch hangs from two lid knuckles on a second pin. Two body knuckles below it hold the third piece of filament as a bar. The hook at the bottom of the latch wraps around this bar, and its tip reaches slightly -past it, so the latch snaps over the bar when closed. A grip tab below -the hook gives a finger hold. +past it, so the latch snaps over the bar when closed. The back of the +hook is filled with a sloped web down to the latch plate, shaped like the +webs under the knuckles. A grip tab below the hook gives a finger hold. +If the grip tab is too short for the full web, the web ends two +extrusions before the edge of the tab. Wall, floor and knuckle sizes are set in extrusions and layers. The model converts them with the line width and layer height from the print @@ -72,8 +75,11 @@ For the hinge, set `filament_diameter` to the filament used for pins and bar. `hinge_knuckles` is the number of hinge knuckles, an odd number. -`latch_width` is the width of the latch in mm. The hook tip has to pass -`latch_detent` mm of overlap at the bar. With 0 the latch swings freely. +`latch_width` is the width of the latch in mm. It is limited to the +straight part of the box front, between the rounded edges. A wider value +is narrowed to fit, and the console prints a warning with the width +actually used. The hook tip has to pass `latch_detent` mm of overlap at +the bar. With 0 the latch swings freely. `line_width` and `layer_height` are the extrusion width and layer height the walls are built from. `clearance` is the gap between moving parts and @@ -82,6 +88,5 @@ ## Checks The model stops with an error if the hinge knuckles get too short, the -latch is wider than the box front, the detent is too large for the bar, -the chamfer is higher than the floor, or the inner height leaves no room -for the body. +detent is too large for the bar, the chamfer is higher than the floor, +or the inner height leaves no room for the body.
--- a/main.json Sat Nov 07 03:17:57 2026 +0100 +++ b/main.json Mon Nov 16 11:01:08 2026 +0100 @@ -60,6 +60,66 @@ "preview_lid_angle": "8", "preview_paper": "true", "wall_lines": "3" + }, + "contract bridge cards": { + "body_ratio": "0.90000000000000002", + "chamfer_layers": "3", + "clearance": "0.10000000000000001", + "edge_radius": "2", + "filament_diameter": "1.8500000000000001", + "floor_layers": "6", + "hinge_knuckles": "5", + "hinge_lines": "2", + "inner_depth": "58", + "inner_height": "89", + "inner_width": "18", + "latch_detent": "0.29999999999999999", + "latch_grip": "3.5", + "latch_layers": "8", + "latch_width": "16", + "layer_height": "0.20000000000000001", + "line_width": "0.40000000000000002", + "lip_layers": "4", + "lip_lines": "2", + "paper_depth": "57", + "paper_height": "88", + "part": "all", + "preview_cut": "false", + "preview_hardware": "true", + "preview_latch_angle": "45", + "preview_lid_angle": "30", + "preview_paper": "true", + "wall_lines": "3" + }, + "uno cards": { + "body_ratio": "0.92000000000000004", + "chamfer_layers": "3", + "clearance": "0.10000000000000001", + "edge_radius": "2", + "filament_diameter": "1.8500000000000001", + "floor_layers": "6", + "hinge_knuckles": "5", + "hinge_lines": "2", + "inner_depth": "64", + "inner_height": "102", + "inner_width": "13", + "latch_detent": "0.29999999999999999", + "latch_grip": "3.5", + "latch_layers": "8", + "latch_width": "12", + "layer_height": "0.20000000000000001", + "line_width": "0.40000000000000002", + "lip_layers": "4", + "lip_lines": "2", + "paper_depth": "62", + "paper_height": "100", + "part": "all", + "preview_cut": "false", + "preview_hardware": "true", + "preview_latch_angle": "45", + "preview_lid_angle": "30", + "preview_paper": "true", + "wall_lines": "3" } } }
--- 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(); }
