# HG changeset patch # User ark # Date 1794853579 -3600 # Node ID fdd022a1bfb15b4b3fca7351606d44ca1117a61b # Parent 80122df4a6c565e6e7a25a35e93fafd3db6279b7 reworked latch hook reinforcement, now a simple line count diff -r 80122df4a6c5 -r fdd022a1bfb1 README.md --- a/README.md Mon Nov 16 11:01:08 2026 +0100 +++ b/README.md Mon Nov 16 19:26:19 2026 +0100 @@ -21,11 +21,8 @@ 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. 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. +past it, so the latch snaps over the bar when closed. A grip tab below +the hook gives a finger hold. 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 @@ -75,11 +72,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. 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. +`latch_width` is the width of the latch in mm. If it is wider than the +hinge span, the latch is narrowed to the span 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. +`latch_hook_lines` sets the hook wall around the bar in extrusions. `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 @@ -88,5 +85,5 @@ ## Checks The model stops with an error if the hinge knuckles get too short, 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. diff -r 80122df4a6c5 -r fdd022a1bfb1 main.json --- a/main.json Mon Nov 16 11:01:08 2026 +0100 +++ b/main.json Mon Nov 16 19:26:19 2026 +0100 @@ -15,6 +15,7 @@ "inner_width": "90", "latch_detent": "0.29999999999999999", "latch_grip": "5", + "latch_hook_lines": "2", "latch_layers": "8", "latch_width": "20", "layer_height": "0.20000000000000001", @@ -45,6 +46,7 @@ "inner_width": "12", "latch_detent": "0.29999999999999999", "latch_grip": "5", + "latch_hook_lines": "2", "latch_layers": "8", "latch_width": "10", "layer_height": "0.20000000000000001", @@ -75,6 +77,7 @@ "inner_width": "18", "latch_detent": "0.29999999999999999", "latch_grip": "3.5", + "latch_hook_lines": "2", "latch_layers": "8", "latch_width": "16", "layer_height": "0.20000000000000001", @@ -105,6 +108,7 @@ "inner_width": "13", "latch_detent": "0.29999999999999999", "latch_grip": "3.5", + "latch_hook_lines": "3", "latch_layers": "8", "latch_width": "12", "layer_height": "0.20000000000000001", diff -r 80122df4a6c5 -r fdd022a1bfb1 main.scad --- a/main.scad Mon Nov 16 11:01:08 2026 +0100 +++ b/main.scad Mon Nov 16 19:26:19 2026 +0100 @@ -61,6 +61,8 @@ latch_detent = .3; // [0:.05:.7] // grip tab length below the hook latch_grip = 5; // [0:.5:20] +// hook wall around the filament bar, in extrusions +latch_hook_lines = 3; // [2:1:8] /* [print settings] */ line_width = .4; // [0:.01:1] @@ -115,7 +117,9 @@ // latch. the flap hangs from lid knuckles and its hook wraps around a // filament bar held by body knuckles straight below the flap axis. -// in the front frame u runs outward from the front face, z up +// in the front frame u runs outward from the front face, z up. +// a latch wider than the hinge span is narrowed to it +latch_w = min(latch_width, hinge_span); latch_x = -out_x/2 - knuckle_u; latch_z = seam_z + knuckle_r + cl; bar_z = seam_z - cl - knuckle_r; @@ -123,7 +127,7 @@ // distance between flap axis and bar axis bar_h = latch_z - bar_z; hook_ri = bar_r + cl; -hook_ro = hook_ri + hinge_lines*lw; +hook_ro = hook_ri + latch_hook_lines*lw; // outer radius of the bar minus radius of the hook tip, both around the // flap axis, for a hook reaching angle b past the bottom of the bar function _detent(b) = @@ -137,8 +141,6 @@ plate_t = latch_layers*lh; plate_u = knuckle_u + knuckle_r + 2*cl; plate_bz = bar_z - hook_ro - latch_grip; -// 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_w/2, latch_slot/2 + knuckle_gap]; @@ -162,12 +164,11 @@ echo(str("WARNING: body_ratio ", body_ratio, " leaves the lid too low, using ", body_ih/inner_height)); echo("body height", seam_z, "mm, lid height", lid_h, "mm, body ratio", body_ih/inner_height); +if (latch_w < latch_width) + echo(str("WARNING: latch_width ", latch_width, " is wider than the hinge span, using ", + latch_w)); 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"); @@ -292,21 +293,14 @@ // 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. 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 + // hook_a degrees up its wall side 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() { - 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]); + 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]); } translate([knuckle_u, bar_z]) circle(r=hook_ri); // open wedge over the top and the wall side of the bar