3d-printing/lib/label-decorations/README.md
Felipe M. e13e743d9d
Add battery symbol and switch box label preset to "PILAS"
Add sym_battery to the shared label decoration library: an upright cell
with a solid terminal nub and "+"/"-" marks in the hollow body. Register
it in symbol_shape and add it to the customizer dropdowns of both the bin
label and the box label.

Switch the gridfinity-box-label customizer defaults to a centered "PILAS"
text flanked by two battery symbols, replacing the M2-M5 screw preset.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018WMwnWKAqyrQveSoyi6o93
2026-09-09 22:31:46 +02:00

65 lines
3.5 KiB
Markdown

# Label Decorations
Shared symbol shapes and rendering primitives for [`gridfinity-bin-label`](../../gridfinity-bin-label/) and [`gridfinity-box-label`](../../gridfinity-box-label/). Adding a new icon shape to [`label-decorations.scad`](label-decorations.scad) makes it available to both labels at once.
## Usage
```scad
use <../lib/label-decorations/label-decorations.scad>
// 2D symbol centered at origin, fitting within a circle of diameter d
symbol_shape("hex_rounded", d = 7, stroke = 1);
// Extruded text or symbol positioned within a label
label_text(text_str, x, y, z, size, font, style, align, extrude_h);
label_symbol(name, x, y, z, size, stroke, extrude_h);
```
## Symbol Catalogue
Top-down screw head views (showing what the head looks like from above):
| Symbol | Value | Description |
|:---:|---|---|
| <img src="symbols/hex_rounded.png" width="48"> | `hex_rounded` | Hex socket cap screw (round head with hex socket) |
| <img src="symbols/hex_flat.png" width="48"> | `hex_flat` | Hex bolt head (flat hexagonal head) |
| <img src="symbols/phillips.png" width="48"> | `phillips` | Phillips cross drive |
| <img src="symbols/slotted.png" width="48"> | `slotted` | Slotted (single-slot) drive |
| <img src="symbols/torx.png" width="48"> | `torx` | Torx (six-pointed star) drive |
| <img src="symbols/square.png" width="48"> | `square` | Square (Robertson) drive |
| <img src="symbols/pozidriv.png" width="48"> | `pozidriv` | Pozidriv (Phillips + diagonal cross) drive |
Drive-bit shapes (just the drive symbol, without a surrounding head circle — visually lighter and pairs well with text):
| Symbol | Value | Description |
|:---:|---|---|
| <img src="symbols/bit_phillips.png" width="48"> | `bit_phillips` | Phillips cross |
| <img src="symbols/bit_slotted.png" width="48"> | `bit_slotted` | Slotted bar |
| <img src="symbols/bit_hex.png" width="48"> | `bit_hex` | Hex (Allen) |
| <img src="symbols/bit_torx.png" width="48"> | `bit_torx` | Torx star |
| <img src="symbols/bit_square.png" width="48"> | `bit_square` | Square (Robertson) |
| <img src="symbols/bit_pozidriv.png" width="48"> | `bit_pozidriv` | Pozidriv (Phillips + diagonal cross) |
Side-profile screw silhouettes (showing the screw from the side, head + threaded shaft):
| Symbol | Value | Description |
|:---:|---|---|
| <img src="symbols/side_cap.png" width="48"> | `side_cap` | Hex socket cap screw — cylindrical head |
| <img src="symbols/side_flat.png" width="48"> | `side_flat` | Countersunk flat head |
| <img src="symbols/side_pan.png" width="48"> | `side_pan` | Pan head (rounded dome with skirt) |
| <img src="symbols/side_button.png" width="48"> | `side_button` | Button head (low rounded dome) |
| <img src="symbols/side_hex.png" width="48"> | `side_hex` | Hex bolt with chamfered head |
Other:
| Symbol | Value | Description |
|:---:|---|---|
| <img src="symbols/washer.png" width="48"> | `washer` | Washer (top-down annular ring) |
| <img src="symbols/nut.png" width="48"> | `nut` | Hex nut (top-down hex with large thread hole) |
| <img src="symbols/printer.png" width="48"> | `printer` | 3D printer silhouette (frame, print bed, gantry, nozzle) |
| <img src="symbols/magnet.png" width="48"> | `magnet` | Horseshoe magnet (U-shape with pole tips) |
| <img src="symbols/battery.png" width="48"> | `battery` | Battery cell (upright body with terminal nub and +/- marks) |
## Regenerating Thumbnails
The symbol thumbnails in [`symbols/`](symbols/) are produced from [`symbols/render.scad`](symbols/render.scad). See the comments at the top of that file for the `openscad` invocation.