wobblyhead hg > 3dprints > hinged_box
view README.md @ 3:a9b270c1da96
doc update
| author | ark |
|---|---|
| date | 2026-11-07 03:17 +0100 |
| parents | 38eca1c6d879 |
| children | 80122df4a6c5 |
line wrap: on
line source
# Hinged box A parametric OpenSCAD box with a filament hinge at the back and a hinged latch at the front. The box is sized by its inner dimensions. The default of 92 x 92 x 92 mm holds a stack of 90 mm notepad paper standing on edge. See also https://www.wobblyhead.net/projects/hinged_box.html ## Design The box has three printed parts: body, lid and latch. Three pieces of filament serve as pins. The body is the lower part. The inner part of its wall rises above the seam as a lip, which fits into a recess in the lid and keeps the lid in place when closed. Body and lid share a row of hinge knuckles at the back, with the outer ones on the body. One filament pin runs through all of them. 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. 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 settings. ## Use Open `main.scad` in OpenSCAD and set the parameters in the Customizer. Two presets are stored in `main.json`: "cardbox 45" and "calling cards box". Select the part to export with the `part` setting. For export, the lid is turned upside down and the latch is laid flat, both ready to print. The body prints as it stands. All parts use the same parameters, so export all three without changing anything else. The console lists the derived sizes: wall thickness, outer size, body and lid height, pin hole diameter, knuckle length, latch detent and the clearance of the lid over the paper stack when it opens. The last echo line is a file name that encodes the main parameters, for example `hinged_box_w92d92h92b85_lw40lh20`. With a single part selected, the name includes the part, as in `hinged_box_lid_w92d92h92b85_lw40lh20`. After printing, push filament through the hinge knuckles, the latch knuckles and the bar knuckles. The pin holes are the filament diameter plus clearance on each side. ## Main parameters The Customizer comments describe every parameter, including edge radius, lip size, chamfer and the preview options. The ones below set the box. `inner_depth`, `inner_width` and `inner_height` give the inner size in mm, front to back, left to right and floor to lid ceiling. For a paper stack, `inner_width` is the thickness of the stack. `body_ratio` is the share of the inner height taken by the body. The lid needs enough height for the latch knuckles and the lip recess. If the ratio leaves less, the body is made lower and the console prints a warning with the ratio actually used. The preview mockup and the lid sweep check take the paper size from `paper_depth` and `paper_height`. Nothing else uses them. Walls are `wall_lines` extrusions thick. Floor and lid top are `floor_layers` layers. 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. `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 around the pins. ## 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.
