annotate README.md @ 5:fdd022a1bfb1

reworked latch hook reinforcement, now a simple line count
author ark
date 2026-11-16 19:26 +0100
parents 80122df4a6c5
children f2694e49cec1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3
a9b270c1da96 doc update
ark
parents: 0
diff changeset
1 # Hinged box
0
38eca1c6d879 initial
ark
parents:
diff changeset
2
3
a9b270c1da96 doc update
ark
parents: 0
diff changeset
3 A parametric OpenSCAD box with a filament hinge at the back and a hinged
a9b270c1da96 doc update
ark
parents: 0
diff changeset
4 latch at the front. The box is sized by its inner dimensions. The default
a9b270c1da96 doc update
ark
parents: 0
diff changeset
5 of 92 x 92 x 92 mm holds a stack of 90 mm notepad paper standing on edge.
0
38eca1c6d879 initial
ark
parents:
diff changeset
6
38eca1c6d879 initial
ark
parents:
diff changeset
7 See also https://www.wobblyhead.net/projects/hinged_box.html
38eca1c6d879 initial
ark
parents:
diff changeset
8
3
a9b270c1da96 doc update
ark
parents: 0
diff changeset
9 ## Design
a9b270c1da96 doc update
ark
parents: 0
diff changeset
10
a9b270c1da96 doc update
ark
parents: 0
diff changeset
11 The box has three printed parts: body, lid and latch. Three pieces of
a9b270c1da96 doc update
ark
parents: 0
diff changeset
12 filament serve as pins.
a9b270c1da96 doc update
ark
parents: 0
diff changeset
13
a9b270c1da96 doc update
ark
parents: 0
diff changeset
14 The body is the lower part. The inner part of its wall rises above the
a9b270c1da96 doc update
ark
parents: 0
diff changeset
15 seam as a lip, which fits into a recess in the lid and keeps the lid in
a9b270c1da96 doc update
ark
parents: 0
diff changeset
16 place when closed.
a9b270c1da96 doc update
ark
parents: 0
diff changeset
17
a9b270c1da96 doc update
ark
parents: 0
diff changeset
18 Body and lid share a row of hinge knuckles at the back, with the outer
a9b270c1da96 doc update
ark
parents: 0
diff changeset
19 ones on the body. One filament pin runs through all of them.
a9b270c1da96 doc update
ark
parents: 0
diff changeset
20
a9b270c1da96 doc update
ark
parents: 0
diff changeset
21 The latch hangs from two lid knuckles on a second pin. Two body knuckles
a9b270c1da96 doc update
ark
parents: 0
diff changeset
22 below it hold the third piece of filament as a bar. The hook at the
a9b270c1da96 doc update
ark
parents: 0
diff changeset
23 bottom of the latch wraps around this bar, and its tip reaches slightly
5
fdd022a1bfb1 reworked latch hook reinforcement, now a simple line count
ark
parents: 4
diff changeset
24 past it, so the latch snaps over the bar when closed. A grip tab below
fdd022a1bfb1 reworked latch hook reinforcement, now a simple line count
ark
parents: 4
diff changeset
25 the hook gives a finger hold.
3
a9b270c1da96 doc update
ark
parents: 0
diff changeset
26
a9b270c1da96 doc update
ark
parents: 0
diff changeset
27 Wall, floor and knuckle sizes are set in extrusions and layers. The model
a9b270c1da96 doc update
ark
parents: 0
diff changeset
28 converts them with the line width and layer height from the print
a9b270c1da96 doc update
ark
parents: 0
diff changeset
29 settings.
a9b270c1da96 doc update
ark
parents: 0
diff changeset
30
a9b270c1da96 doc update
ark
parents: 0
diff changeset
31 ## Use
a9b270c1da96 doc update
ark
parents: 0
diff changeset
32
a9b270c1da96 doc update
ark
parents: 0
diff changeset
33 Open `main.scad` in OpenSCAD and set the parameters in the Customizer. Two
a9b270c1da96 doc update
ark
parents: 0
diff changeset
34 presets are stored in `main.json`: "cardbox 45" and "calling cards box".
a9b270c1da96 doc update
ark
parents: 0
diff changeset
35
a9b270c1da96 doc update
ark
parents: 0
diff changeset
36 Select the part to export with the `part` setting. For export, the lid is
a9b270c1da96 doc update
ark
parents: 0
diff changeset
37 turned upside down and the latch is laid flat, both ready to print. The
a9b270c1da96 doc update
ark
parents: 0
diff changeset
38 body prints as it stands. All parts use the same parameters, so export
a9b270c1da96 doc update
ark
parents: 0
diff changeset
39 all three without changing anything else.
a9b270c1da96 doc update
ark
parents: 0
diff changeset
40
a9b270c1da96 doc update
ark
parents: 0
diff changeset
41 The console lists the derived sizes: wall thickness, outer size, body and
a9b270c1da96 doc update
ark
parents: 0
diff changeset
42 lid height, pin hole diameter, knuckle length, latch detent and the
a9b270c1da96 doc update
ark
parents: 0
diff changeset
43 clearance of the lid over the paper stack when it opens. The last echo
a9b270c1da96 doc update
ark
parents: 0
diff changeset
44 line is a file name that encodes the main parameters, for example
a9b270c1da96 doc update
ark
parents: 0
diff changeset
45 `hinged_box_w92d92h92b85_lw40lh20`. With a single part selected, the name
a9b270c1da96 doc update
ark
parents: 0
diff changeset
46 includes the part, as in `hinged_box_lid_w92d92h92b85_lw40lh20`.
a9b270c1da96 doc update
ark
parents: 0
diff changeset
47
a9b270c1da96 doc update
ark
parents: 0
diff changeset
48 After printing, push filament through the hinge knuckles, the latch
a9b270c1da96 doc update
ark
parents: 0
diff changeset
49 knuckles and the bar knuckles. The pin holes are the filament diameter
a9b270c1da96 doc update
ark
parents: 0
diff changeset
50 plus clearance on each side.
a9b270c1da96 doc update
ark
parents: 0
diff changeset
51
a9b270c1da96 doc update
ark
parents: 0
diff changeset
52 ## Main parameters
a9b270c1da96 doc update
ark
parents: 0
diff changeset
53
a9b270c1da96 doc update
ark
parents: 0
diff changeset
54 The Customizer comments describe every parameter, including edge radius,
a9b270c1da96 doc update
ark
parents: 0
diff changeset
55 lip size, chamfer and the preview options. The ones below set the box.
a9b270c1da96 doc update
ark
parents: 0
diff changeset
56
a9b270c1da96 doc update
ark
parents: 0
diff changeset
57 `inner_depth`, `inner_width` and `inner_height` give the inner size in mm,
a9b270c1da96 doc update
ark
parents: 0
diff changeset
58 front to back, left to right and floor to lid ceiling. For a paper stack,
a9b270c1da96 doc update
ark
parents: 0
diff changeset
59 `inner_width` is the thickness of the stack.
a9b270c1da96 doc update
ark
parents: 0
diff changeset
60
a9b270c1da96 doc update
ark
parents: 0
diff changeset
61 `body_ratio` is the share of the inner height taken by the body. The lid
a9b270c1da96 doc update
ark
parents: 0
diff changeset
62 needs enough height for the latch knuckles and the lip recess. If the
a9b270c1da96 doc update
ark
parents: 0
diff changeset
63 ratio leaves less, the body is made lower and the console prints a
a9b270c1da96 doc update
ark
parents: 0
diff changeset
64 warning with the ratio actually used.
a9b270c1da96 doc update
ark
parents: 0
diff changeset
65
a9b270c1da96 doc update
ark
parents: 0
diff changeset
66 The preview mockup and the lid sweep check take the paper size from
a9b270c1da96 doc update
ark
parents: 0
diff changeset
67 `paper_depth` and `paper_height`. Nothing else uses them.
a9b270c1da96 doc update
ark
parents: 0
diff changeset
68
a9b270c1da96 doc update
ark
parents: 0
diff changeset
69 Walls are `wall_lines` extrusions thick. Floor and lid top are
a9b270c1da96 doc update
ark
parents: 0
diff changeset
70 `floor_layers` layers.
a9b270c1da96 doc update
ark
parents: 0
diff changeset
71
a9b270c1da96 doc update
ark
parents: 0
diff changeset
72 For the hinge, set `filament_diameter` to the filament used for pins and
a9b270c1da96 doc update
ark
parents: 0
diff changeset
73 bar. `hinge_knuckles` is the number of hinge knuckles, an odd number.
a9b270c1da96 doc update
ark
parents: 0
diff changeset
74
5
fdd022a1bfb1 reworked latch hook reinforcement, now a simple line count
ark
parents: 4
diff changeset
75 `latch_width` is the width of the latch in mm. If it is wider than the
fdd022a1bfb1 reworked latch hook reinforcement, now a simple line count
ark
parents: 4
diff changeset
76 hinge span, the latch is narrowed to the span and the console prints a
fdd022a1bfb1 reworked latch hook reinforcement, now a simple line count
ark
parents: 4
diff changeset
77 warning with the width actually used. The hook tip has to pass
fdd022a1bfb1 reworked latch hook reinforcement, now a simple line count
ark
parents: 4
diff changeset
78 `latch_detent` mm of overlap at the bar. With 0 the latch swings freely.
fdd022a1bfb1 reworked latch hook reinforcement, now a simple line count
ark
parents: 4
diff changeset
79 `latch_hook_lines` sets the hook wall around the bar in extrusions.
3
a9b270c1da96 doc update
ark
parents: 0
diff changeset
80
a9b270c1da96 doc update
ark
parents: 0
diff changeset
81 `line_width` and `layer_height` are the extrusion width and layer height
a9b270c1da96 doc update
ark
parents: 0
diff changeset
82 the walls are built from. `clearance` is the gap between moving parts and
a9b270c1da96 doc update
ark
parents: 0
diff changeset
83 around the pins.
a9b270c1da96 doc update
ark
parents: 0
diff changeset
84
a9b270c1da96 doc update
ark
parents: 0
diff changeset
85 ## Checks
a9b270c1da96 doc update
ark
parents: 0
diff changeset
86
a9b270c1da96 doc update
ark
parents: 0
diff changeset
87 The model stops with an error if the hinge knuckles get too short, the
5
fdd022a1bfb1 reworked latch hook reinforcement, now a simple line count
ark
parents: 4
diff changeset
88 detent is too large for the bar, the chamfer is higher than the floor, or
fdd022a1bfb1 reworked latch hook reinforcement, now a simple line count
ark
parents: 4
diff changeset
89 the inner height leaves no room for the body.