# HG changeset patch # User ark # Date 1794965711 -3600 # Node ID 7bef1d0cb914e6670d5d8d9597eb7d544765ab06 # Parent a7a1b12fd6bfc13bd381988a18d7ec211e5f33ad updated defaults, added render shell script diff -r a7a1b12fd6bf -r 7bef1d0cb914 README.md --- a/README.md Tue Nov 17 12:53:33 2026 +0100 +++ b/README.md Wed Nov 18 02:35:11 2026 +0100 @@ -48,8 +48,8 @@ ## 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". +Open `main.scad` in OpenSCAD and set the parameters in the Customizer. +Several presets are stored in `main.json`. Select the part to export with the `part` setting. For export, the lid is turned upside down, and the latch is laid flat or stood on its side as @@ -61,17 +61,19 @@ lid height, pin hole diameter, knuckle length, latch detent and the clearance of the lid over the content 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`. The -latch name adds its style: `plate`, `plate-middle` or `block`, as in -`hinged_box_latch_block_w92d92h92b85_lw40lh20`. A box with more than one -cell adds the column and row count, as in -`hinged_box_c3r2_w92d92h92b85_lw40lh20`. A latch middle share other than -.33 adds `lm` and the share in percent after the body ratio, as in -`hinged_box_w92d92h92b85lm50_lw40lh20`. A latch layout other than a +`hinged_box_w920d920h920b85_lw40lh20`. The inner sizes are given in +tenths of a millimetre. With a single part selected, the name includes +the part, as in `hinged_box_lid_w920d920h920b85_lw40lh20`. The latch +name adds its style: `plate`, `plate-middle` or `block`, as in +`hinged_box_latch_block_w920d920h920b85_lw40lh20`. A box with more than +one cell adds the column and row count, as in +`hinged_box_c3r2_w920d920h920b85_lw40lh20`. A latch middle share other +than .33 adds `lm` and the share in percent after the body ratio, as in +`hinged_box_w920d920h920b85lm50_lw40lh20`. A latch layout other than a front latch with the back hinge adds `l` and the latched sides, from -front, back, left and right, as in `hinged_box_lfblr_w92d92h92b85_lw40lh20` -for a removable lid latched on all four sides. +front, back, left and right, as in +`hinged_box_lfblr_w920d920h920b85_lw40lh20` for a removable lid latched +on all four sides. After printing, push filament through the hinge knuckles, and the latch and bar knuckles of each latched side. The pin holes are the filament diff -r a7a1b12fd6bf -r 7bef1d0cb914 main.json --- a/main.json Tue Nov 17 12:53:33 2026 +0100 +++ b/main.json Wed Nov 18 02:35:11 2026 +0100 @@ -1,7 +1,7 @@ { "fileFormatVersion": "1", "parameterSets": { - "cardbox 45": { + "gametiles 45x45": { "body_ratio": "0.89000000000000001", "chamfer_layers": "3", "clearance": "0.10000000000000001", @@ -33,7 +33,7 @@ "preview_lid_open": "0", "wall_lines": "4" }, - "calling cards box": { + "calling cards": { "body_ratio": "0.98999999999999999", "chamfer_layers": "3", "clearance": "0.10000000000000001", @@ -49,20 +49,22 @@ "inner_height": "86", "inner_width": "12", "latch_detent": "0.29999999999999999", - "latch_grip": "5", + "latch_grip": "3.5", "latch_hook_lines": "2", "latch_layers": "8", + "latch_plate_full": "false", + "latch_style": "block", "latch_width": "10", "layer_height": "0.20000000000000001", "line_width": "0.40000000000000002", "lip_layers": "4", "lip_lines": "2", "part": "all", - "preview_content": "true", + "preview_content": "false", "preview_cut": "false", - "preview_hardware": "true", - "preview_latch_angle": "55", - "preview_lid_open": "4", + "preview_hardware": "false", + "preview_latch_angle": "0", + "preview_lid_open": "0", "wall_lines": "3" }, "contract bridge cards": { @@ -129,7 +131,7 @@ "preview_lid_open": "17", "wall_lines": "3" }, - "18650x10 battery box": { + "batteries 18650x10": { "body_ratio": "0.90000000000000002", "chamfer_layers": "3", "clearance": "0.10000000000000001", @@ -150,6 +152,7 @@ "latch_grip": "5", "latch_hook_lines": "3", "latch_layers": "8", + "latch_style": "block", "latch_width": "30", "layer_height": "0.20000000000000001", "line_width": "0.40000000000000002", @@ -163,6 +166,132 @@ "preview_lid_open": "25", "rows": "2", "wall_lines": "4" + }, + "memo block": { + "back_side": "hinge", + "body_ratio": "0.84999999999999998", + "chamfer_layers": "3", + "clearance": "0.10000000000000001", + "columns": "1", + "content_depth": "90", + "content_height": "90", + "content_width": "90", + "divider_lines": "2", + "edge_radius": "2", + "filament_diameter": "1.8500000000000001", + "floor_layers": "6", + "hinge_knuckles": "5", + "hinge_lines": "3", + "inner_depth": "92", + "inner_height": "92", + "inner_width": "92", + "latch_detent": "0.29999999999999999", + "latch_front": "true", + "latch_grip": "5", + "latch_hook_lines": "3", + "latch_layers": "8", + "latch_left": "false", + "latch_middle_ratio": "0.33000000000000002", + "latch_plate_full": "false", + "latch_right": "false", + "latch_style": "plate", + "latch_width": "20", + "layer_height": "0.20000000000000001", + "line_width": "0.40000000000000002", + "lip_layers": "4", + "lip_lines": "2", + "part": "all", + "preview_content": "false", + "preview_cut": "false", + "preview_hardware": "false", + "preview_latch_angle": "0", + "preview_lid_open": "0", + "rows": "1", + "wall_lines": "4" + }, + "batteries AAx16": { + "back_side": "latch", + "body_ratio": "0.70000000000000007", + "chamfer_layers": "3", + "clearance": "0.10000000000000001", + "columns": "4", + "content_depth": "14.4", + "content_height": "50.5", + "content_width": "14.4", + "divider_lines": "2", + "edge_radius": "7", + "filament_diameter": "1.8500000000000001", + "floor_layers": "6", + "hinge_knuckles": "5", + "hinge_lines": "3", + "inner_depth": "14.800000000000001", + "inner_height": "52", + "inner_width": "14.800000000000001", + "latch_detent": "0.29999999999999999", + "latch_front": "true", + "latch_grip": "5", + "latch_hook_lines": "3", + "latch_layers": "8", + "latch_left": "true", + "latch_middle_ratio": "0.33000000000000002", + "latch_plate_full": "true", + "latch_right": "true", + "latch_style": "block", + "latch_width": "30", + "layer_height": "0.20000000000000001", + "line_width": "0.40000000000000002", + "lip_layers": "3", + "lip_lines": "2", + "part": "all", + "preview_content": "false", + "preview_cut": "false", + "preview_hardware": "true", + "preview_latch_angle": "45", + "preview_lid_open": "50", + "rows": "4", + "wall_lines": "3" + }, + "batteries AAAx16": { + "back_side": "latch", + "body_ratio": "0.70000000000000007", + "chamfer_layers": "3", + "clearance": "0.10000000000000001", + "columns": "4", + "content_depth": "10.5", + "content_height": "44.5", + "content_width": "10.5", + "divider_lines": "2", + "edge_radius": "5", + "filament_diameter": "1.8500000000000001", + "floor_layers": "6", + "hinge_knuckles": "5", + "hinge_lines": "3", + "inner_depth": "11.0", + "inner_height": "46", + "inner_width": "11.0", + "latch_detent": "0.29999999999999999", + "latch_front": "true", + "latch_grip": "5", + "latch_hook_lines": "3", + "latch_layers": "8", + "latch_left": "false", + "latch_middle_ratio": "0.33000000000000002", + "latch_plate_full": "true", + "latch_right": "false", + "latch_style": "block", + "latch_width": "30", + "layer_height": "0.20000000000000001", + "line_width": "0.40000000000000002", + "lip_layers": "3", + "lip_lines": "2", + "part": "all", + "preview_content": "false", + "preview_cut": "false", + "preview_hardware": "true", + "preview_latch_angle": "45", + "preview_lid_open": "69", + "rows": "4", + "wall_lines": "3" } } } diff -r a7a1b12fd6bf -r 7bef1d0cb914 main.scad --- a/main.scad Tue Nov 17 12:53:33 2026 +0100 +++ b/main.scad Wed Nov 18 02:35:11 2026 +0100 @@ -102,6 +102,8 @@ epsilon = .001; $fn = $preview ? 60 : 180; +// parts to export for printing, read by render_openscad.sh +printable_parts = "body lid latch"; lw = line_width; lh = layer_height; @@ -609,7 +611,7 @@ // latched sides, only when they differ from the front latch and back hinge side_on == [true, false, false, false] ? "" : str("l", _join([for (i = latch_sides) "fblr"[i]]), "_"), - "w", inner_width, "d", inner_depth, "h", inner_height, + "w", round(10*inner_width), "d", round(10*inner_depth), "h", round(10*inner_height), "b", round(100*body_ih/inner_height), // latch middle share, only when it differs from the default round(100*latch_ratio) == 33 ? "" : str("lm", round(100*latch_ratio)), diff -r a7a1b12fd6bf -r 7bef1d0cb914 render.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/render.sh Wed Nov 18 02:35:11 2026 +0100 @@ -0,0 +1,121 @@ +#!/bin/sh +USAGE="$0 [-o