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
Owner

Cut aetheria-release:cut_spec:cut-chassis-kit-format.r1, base 88a3806.

brokkr_kitbash is a host add-on beside brokkr_mesh_polish and brokkr_rig: parametric machine parts from a kit, with socket frames. It is the machinery vocabulary for a ship's fixed chassis (ruling ship-detail-chassis-slots-gear, layer 1).

What lands

  • surfaces/blender/brokkr_kitbash/core.py (numpy and stdlib, no bpy): the one owner of brokkr.kit.v0. check_kit, load_kit (a name, never a path), resolve_params, parse_params, build. Shapes are tube, box and repeat; every numeric field is a number or an expression parsed with ast and walked against a whitelist. Nothing is run.
  • kits/mechanical.v0.json: nozzle, tank, ribbed_cylinder, strut, actuator, pipe_fitting, radiator_stack, vent, plate; socket types flange, mount, pivot.
  • __init__.py and brokkr_actions.json: place_part, set_params, describe, report. A placed part is its kit_kit, kit_part, kit_params ID properties; the mesh is derived and rebuilt in place.
  • docs/kitbash.md, tests/test_kitbash.py (20 tests, no Blender), tests/live/kitbash.py with its committed result (52 checks, Blender 5.3 background).

Nothing in brokkr_bridge, brokkr_mesh_polish, brokkr_rig or tools/ changes. Mating sockets, booleans and apply are the follow-up chassis-kit-assembly.

Verification

  • python -m unittest discover -s surfaces/blender/tests: 444 tests OK (20 skipped as on main).
  • tests/live/kitbash.py in a background Blender 5.3 with private user directories: exit 0, 52 checks.
  • The ten named mutants each kill a test (M1 to M9 unit, M10 live).

Notes for review

  • The kit goes past the spec's part list where the look needed it: bolts as 6-sided tubes, gimbal lugs, tie rods, weld bands, a five-frustum bell. Params and sockets are the spec's.
  • A tube with exactly one inner radius at 0 is refused (a hollow tube closing to a point would have zero-length edges).
  • M1's stated witness abs(a) is still refused by the two-argument rule once the name check is gone; the test uses pow(a,b).
  • 2220 lines added against an estimate of 1850; 362 of them are the committed live result.

🤖 Generated with Claude Code

Cut `aetheria-release:cut_spec:cut-chassis-kit-format.r1`, base 88a3806. `brokkr_kitbash` is a host add-on beside `brokkr_mesh_polish` and `brokkr_rig`: parametric machine parts from a kit, with socket frames. It is the machinery vocabulary for a ship's fixed chassis (ruling `ship-detail-chassis-slots-gear`, layer 1). ## What lands - `surfaces/blender/brokkr_kitbash/core.py` (numpy and stdlib, no bpy): the one owner of `brokkr.kit.v0`. `check_kit`, `load_kit` (a name, never a path), `resolve_params`, `parse_params`, `build`. Shapes are `tube`, `box` and `repeat`; every numeric field is a number or an expression parsed with `ast` and walked against a whitelist. Nothing is run. - `kits/mechanical.v0.json`: nozzle, tank, ribbed_cylinder, strut, actuator, pipe_fitting, radiator_stack, vent, plate; socket types flange, mount, pivot. - `__init__.py` and `brokkr_actions.json`: `place_part`, `set_params`, `describe`, `report`. A placed part is its `kit_kit`, `kit_part`, `kit_params` ID properties; the mesh is derived and rebuilt in place. - `docs/kitbash.md`, `tests/test_kitbash.py` (20 tests, no Blender), `tests/live/kitbash.py` with its committed result (52 checks, Blender 5.3 background). Nothing in `brokkr_bridge`, `brokkr_mesh_polish`, `brokkr_rig` or `tools/` changes. Mating sockets, booleans and apply are the follow-up `chassis-kit-assembly`. ## Verification - `python -m unittest discover -s surfaces/blender/tests`: 444 tests OK (20 skipped as on main). - `tests/live/kitbash.py` in a background Blender 5.3 with private user directories: exit 0, 52 checks. - The ten named mutants each kill a test (M1 to M9 unit, M10 live). ## Notes for review - The kit goes past the spec's part list where the look needed it: bolts as 6-sided tubes, gimbal lugs, tie rods, weld bands, a five-frustum bell. Params and sockets are the spec's. - A tube with exactly one inner radius at 0 is refused (a hollow tube closing to a point would have zero-length edges). - M1's stated witness `abs(a)` is still refused by the two-argument rule once the name check is gone; the test uses `pow(a,b)`. - 2220 lines added against an estimate of 1850; 362 of them are the committed live result. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
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>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
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>
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>
eureka merged commit 57c453f0ab into main 2026-12-01 14:30:47 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
GameCult/Brokkr!24
No description provided.