wobblyhead hg > 3dprints > hinged_box
annotate README.md @ 6:f2694e49cec1
added subdivisions; lid hinge overlap fix
| author | ark |
|---|---|
| date | 2026-11-16 21:03 +0100 |
| parents | fdd022a1bfb1 |
| children | ac8f2ecb6c18 |
| rev | line source |
|---|---|
| 3 | 1 # Hinged box |
| 0 | 2 |
| 3 | 3 A parametric OpenSCAD box with a filament hinge at the back and a hinged |
| 4 latch at the front. The box is sized by its inner dimensions. The default | |
| 5 of 92 x 92 x 92 mm holds a stack of 90 mm notepad paper standing on edge. | |
| 0 | 6 |
| 7 See also https://www.wobblyhead.net/projects/hinged_box.html | |
| 8 | |
| 3 | 9 ## Design |
| 10 | |
| 11 The box has three printed parts: body, lid and latch. Three pieces of | |
| 12 filament serve as pins. | |
| 13 | |
| 14 The body is the lower part. The inner part of its wall rises above the | |
| 15 seam as a lip, which fits into a recess in the lid and keeps the lid in | |
| 16 place when closed. | |
| 17 | |
| 18 Body and lid share a row of hinge knuckles at the back, with the outer | |
| 19 ones on the body. One filament pin runs through all of them. | |
| 20 | |
| 21 The latch hangs from two lid knuckles on a second pin. Two body knuckles | |
| 22 below it hold the third piece of filament as a bar. The hook at the | |
| 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 | 26 |
| 27 Wall, floor and knuckle sizes are set in extrusions and layers. The model | |
| 28 converts them with the line width and layer height from the print | |
| 29 settings. | |
| 30 | |
| 31 ## Use | |
| 32 | |
| 33 Open `main.scad` in OpenSCAD and set the parameters in the Customizer. Two | |
| 34 presets are stored in `main.json`: "cardbox 45" and "calling cards box". | |
| 35 | |
| 36 Select the part to export with the `part` setting. For export, the lid is | |
| 37 turned upside down and the latch is laid flat, both ready to print. The | |
| 38 body prints as it stands. All parts use the same parameters, so export | |
| 39 all three without changing anything else. | |
| 40 | |
| 41 The console lists the derived sizes: wall thickness, outer size, body and | |
| 42 lid height, pin hole diameter, knuckle length, latch detent and the | |
| 6 | 43 clearance of the lid over the content when it opens. The last echo |
| 3 | 44 line is a file name that encodes the main parameters, for example |
| 45 `hinged_box_w92d92h92b85_lw40lh20`. With a single part selected, the name | |
| 6 | 46 includes the part, as in `hinged_box_lid_w92d92h92b85_lw40lh20`. A box |
| 47 with more than one cell adds the column and row count, as in | |
| 48 `hinged_box_c3r2_w92d92h92b85_lw40lh20`. | |
| 3 | 49 |
| 50 After printing, push filament through the hinge knuckles, the latch | |
| 51 knuckles and the bar knuckles. The pin holes are the filament diameter | |
| 52 plus clearance on each side. | |
| 53 | |
| 54 ## Main parameters | |
| 55 | |
| 56 The Customizer comments describe every parameter, including edge radius, | |
| 57 lip size, chamfer and the preview options. The ones below set the box. | |
| 58 | |
| 59 `inner_depth`, `inner_width` and `inner_height` give the inner size in mm, | |
| 60 front to back, left to right and floor to lid ceiling. For a paper stack, | |
| 61 `inner_width` is the thickness of the stack. | |
| 62 | |
| 6 | 63 `columns` and `rows` divide the body into cells, columns left to right and |
| 64 rows front to back as seen from the top front. `inner_width` and | |
| 65 `inner_depth` are then the size of one cell, and the box grows by the | |
| 66 cells and the divider walls between them. The dividers are | |
| 67 `divider_lines` extrusions thick and reach from the floor to the top of | |
| 68 the lip. The preview mockup puts the content in each cell, and the lid | |
| 69 sweep check uses the front row. | |
| 70 | |
| 71 `content_depth`, `content_width` and `content_height` give the size of | |
| 72 what goes into one cell, such as a paper stack. The preview mockup shows | |
| 73 it with `preview_content`, and the lid sweep check uses depth and height. | |
| 74 Nothing else uses them. A size larger than the cell or the inner height | |
| 75 is reduced to fit, and the console prints a warning with the size | |
| 76 actually used. | |
| 77 | |
| 3 | 78 `body_ratio` is the share of the inner height taken by the body. The lid |
| 79 needs enough height for the latch knuckles and the lip recess. If the | |
| 80 ratio leaves less, the body is made lower and the console prints a | |
| 81 warning with the ratio actually used. | |
| 82 | |
| 83 Walls are `wall_lines` extrusions thick. Floor and lid top are | |
| 84 `floor_layers` layers. | |
| 85 | |
| 86 For the hinge, set `filament_diameter` to the filament used for pins and | |
| 87 bar. `hinge_knuckles` is the number of hinge knuckles, an odd number. | |
| 88 | |
|
5
fdd022a1bfb1
reworked latch hook reinforcement, now a simple line count
ark
parents:
4
diff
changeset
|
89 `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
|
90 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
|
91 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
|
92 `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
|
93 `latch_hook_lines` sets the hook wall around the bar in extrusions. |
| 3 | 94 |
| 95 `line_width` and `layer_height` are the extrusion width and layer height | |
| 96 the walls are built from. `clearance` is the gap between moving parts and | |
| 97 around the pins. | |
| 98 | |
| 99 ## Checks | |
| 100 | |
| 101 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
|
102 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
|
103 the inner height leaves no room for the body. |
