brokkr_kitbash: attach, detach, boolean and apply; set_params keeps an assembly seated (cut chassis-kit-assembly) #25

Merged
eureka merged 2 commits from nibu/chassis-kit-assembly into main 2026-12-01 16:01:15 +00:00
Owner

Cut aetheria-release:cut_spec:cut-chassis-kit-assembly.r1, base 57c453f.

brokkr_kitbash gains four host actions (attach, detach, boolean, apply), and set_params and report learn about connections. The kit format, the mechanical kit and the shapes are unchanged.

What lands

  • core.py: FLIP, mate, residual, mate_refusal and joint (numpy only). matrix_basis = S_parent @ Rz(roll) @ FLIP @ inverse(S_child).
  • A connection belongs to the child: obj.parent under an identity parent inverse, plus kit_socket, kit_parent_socket and kit_roll. Nothing else stores it.
  • attach refuses a child that has a parent, a loop, parts of two kits, an unknown socket, sockets that do not mate and an occupied socket, changing nothing.
  • set_params refuses a baked part, checks every connection the part is an end of against its new sockets before it writes, then seats the part and the parts attached to it.
  • report gives connection (parent, socket, parentSocket, roll, residual, holds) and baked. It evaluates no modifier.
  • boolean adds Kit Boolean <cutter> above the Bevel: Exact, self-intersection on, material_mode TRANSFER. apply bakes the evaluated mesh, clears the modifiers and sets kit_baked.
  • docs/kitbash.md: the section "Assembling parts", four table rows, a longer recipe. The line saying mating, booleans and baking are not here is gone.

Verification

  • python -m unittest discover -s surfaces/blender/tests: 454 tests OK (20 skipped as on main); MateTests is new.
  • Blender 5.3 background with private user directories: tests/live/kitbash.py 61 checks, tests/live/kitbash_assembly.py 66 checks, both exit 0; both result files committed.
  • Mutants A1 to A13 and sixteen of my own, each applied once to a scratch copy: all die.

Notes for review

  • Material slots: no Boolean setting alone keeps them exact. TRANSFER stops the empty slot when the part has materials and the cutter has none. A part with no slot still gets one empty slot from any Boolean, so apply drops trailing empty slots it gained. A cutter that has materials brings them under either mode; they are kept, after the part's own.
  • equal sizes get the same 1e-9 relative slack the spec gives fits, so 0.2 against 0.198 is inside 1 percent.
  • detach and a set_params that seats nothing do not update the view layer: a mutant without those calls survived, so they went.
  • 1523 lines added against an estimate of 950; 372 are the committed live result and 446 the live test.

🤖 Generated with Claude Code

Cut `aetheria-release:cut_spec:cut-chassis-kit-assembly.r1`, base 57c453f. `brokkr_kitbash` gains four host actions (`attach`, `detach`, `boolean`, `apply`), and `set_params` and `report` learn about connections. The kit format, the mechanical kit and the shapes are unchanged. ## What lands - `core.py`: `FLIP`, `mate`, `residual`, `mate_refusal` and `joint` (numpy only). `matrix_basis = S_parent @ Rz(roll) @ FLIP @ inverse(S_child)`. - A connection belongs to the child: `obj.parent` under an identity parent inverse, plus `kit_socket`, `kit_parent_socket` and `kit_roll`. Nothing else stores it. - `attach` refuses a child that has a parent, a loop, parts of two kits, an unknown socket, sockets that do not mate and an occupied socket, changing nothing. - `set_params` refuses a baked part, checks every connection the part is an end of against its new sockets before it writes, then seats the part and the parts attached to it. - `report` gives `connection` (`parent`, `socket`, `parentSocket`, `roll`, `residual`, `holds`) and `baked`. It evaluates no modifier. - `boolean` adds `Kit Boolean <cutter>` above the Bevel: Exact, self-intersection on, `material_mode` TRANSFER. `apply` bakes the evaluated mesh, clears the modifiers and sets `kit_baked`. - `docs/kitbash.md`: the section "Assembling parts", four table rows, a longer recipe. The line saying mating, booleans and baking are not here is gone. ## Verification - `python -m unittest discover -s surfaces/blender/tests`: 454 tests OK (20 skipped as on main); `MateTests` is new. - Blender 5.3 background with private user directories: `tests/live/kitbash.py` 61 checks, `tests/live/kitbash_assembly.py` 66 checks, both exit 0; both result files committed. - Mutants A1 to A13 and sixteen of my own, each applied once to a scratch copy: all die. ## Notes for review - Material slots: no Boolean setting alone keeps them exact. TRANSFER stops the empty slot when the part has materials and the cutter has none. A part with no slot still gets one empty slot from any Boolean, so `apply` drops trailing empty slots it gained. A cutter that has materials brings them under either mode; they are kept, after the part's own. - `equal` sizes get the same 1e-9 relative slack the spec gives `fits`, so 0.2 against 0.198 is inside 1 percent. - `detach` and a `set_params` that seats nothing do not update the view layer: a mutant without those calls survived, so they went. - 1523 lines added against an estimate of 950; 372 are the committed live result and 446 the live test. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
A connection belongs to the child: its parent pointer under an identity parent
inverse and kit_socket, kit_parent_socket and kit_roll. core.mate derives its
matrix_basis, core.mate_refusal says what may mate, and reports give the
residual and whether it holds. set_params checks every connection the part is
an end of before it writes, then seats the part and the parts attached to it.
boolean adds an Exact, self-intersecting Boolean above the Bevel; apply bakes
the evaluated mesh and marks the part baked.

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

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
eureka merged commit cd8302fe0e into main 2026-12-01 16:01:15 +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!25
No description provided.