brokkr_kitbash: a part kit as data, the mechanical kit, and four host actions (cut chassis-kit-format) #24

Merged
eureka merged 4 commits from nibu/chassis-kit-format into main 2026-12-01 14:30:47 +00:00

2026-12-01

Meta Vens
mechanical kit: an eight-frustum bell and four-frustum elliptical tank domes
Softens the cone banding on the nozzle and the two-cone tank ends. Params and
sockets are unchanged.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-12-01 15:21:36 +01:00
Meta Vens
brokkr_kitbash: one owner per part (shared mesh, scale), named refusals, materials by shape
Fixes from verdict aetheria-release:verdict:cut-chassis-kit-format.s1.

set_params refuses a mesh datablock another object uses: rebuilding it changed
the linked duplicate while its kit_params stayed. set_params and report refuse
a part whose world transform scales, mirrors or shears: a part's size is its
params and a socket frame is a rotation and an origin.

set_params carries per-face material_index by shape (Built.shape names each
face's shape), so an assignment survives a change of segments or counts.

Kit-side mistakes are KitErrors: an unhashable value where a name belongs, an
integer no float holds, and vertices that overflow are refused by name.

Tests pin the finite check, socket size, bevel sign and the hollow tube's
inner radii (Soul's N4, N8, N9, N10).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-12-01 15:21:36 +01:00
Meta Vens
docs: kitbash.md, the kit format by example, the four actions and a recipe
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-12-01 14:48:03 +01:00
Meta Vens
brokkr_kitbash: a part kit as data, the mechanical kit, and four host actions
core.py (numpy and stdlib, no bpy) owns brokkr.kit.v0: check_kit, load_kit by
name only, resolve_params and parse_params, and build, which turns a part's
tube, box and repeat shapes into closed outward-wound shells with socket frames.
Expressions are parsed with ast and walked against a whitelist; nothing is run.
kits/mechanical.v0.json holds nine parts.

__init__.py is a host add-on beside brokkr_mesh_polish and brokkr_rig with
place_part, set_params, describe and report. A placed part is its kit_kit,
kit_part and kit_params ID properties; the mesh is derived from them and
set_params rebuilds it in the same datablock, so transform, parent, modifiers
and materials stay. Socket frames are derived at each report.

test_kitbash.py runs without Blender; tests/live/kitbash.py proves the rows
through run_intent in a background Blender 5.3, its result committed.

Cut aetheria-release:cut_spec:cut-chassis-kit-format.r1.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-12-01 14:48:03 +01:00