brokkr_kitbash: cut any mesh at a ray, a cutters kit with floor sockets, one collection Boolean per operation, shared socket types (cut shell-cuts) #28

Merged
eureka merged 6 commits from nibu/shell-cuts into main 2026-12-02 02:52:19 +00:00
Owner

Cut aetheria-release:cut_spec:cut-shell-cuts.r1, base 980ae6a.

What changes

  • brokkr_kitbash.cut: cuts any mesh (a kit part or an armor cage) where a ray meets it. The cut is a placed part of a new kit, cutters (box, cyl, slot, slab), parented to the target under an identity parent inverse. The cutter object owns the recess frame (its matrix_basis) and size (its params); box, cyl and slot carry a floor socket on the bottom of the recess, and machinery attaches there with the ordinary attach. The ray is cast at the target with its Kit Booleans off.
  • One Boolean modifier per operation (Kit Difference, Kit Union, Kit Intersect, above the Bevel), each over a collection of cutters. The modifier per cutter (Kit Boolean <cutter>, operand OBJECT) is deleted. boolean takes any rigid mesh target; apply removes the collections it left without users and keeps the cutter objects.
  • Socket types are shared across kits: parts of two kits mate when both kits declare the type with the same match. core.joint no longer refuses two kits.
  • mesh_object refuses an object in no collection, for every operator at once (finding cut-kit-joints.s2.attach-onto-orphan-and-ends-first-unpinned, part 1); the ends-first order of a set_params report's closures is pinned (part 2).

Proof

  • python -m unittest discover -s surfaces/blender/tests: 475 tests, OK (20 skipped).
  • Blender 5.3 background on Starfire, private user dirs: tests/live/kitbash.py 79 checks, kitbash_assembly.py 118, kitbash_shell.py (new) 47, mesh_polish.py 40, all exit 0.
  • Every mechanical part builds byte-identical arrays and sockets at its defaults against base.
  • Mutants S1 to S9 of the spec and four more each die; the cut report names the test for each.

Cost (Blender 5.3, Starfire, 5 interleaved evaluations, a pod-like shell of 5000 faces with 8 cutters placed by cut): one collection Boolean 1.89 s, a modifier per cutter 12.6 s, one joined cutter 1.81 s; the same faces and volume. Imagination's probe read 2.04, 14.7 and 1.94 s.

Known limits, for the next round

  • cut itself takes a few milliseconds, but Blender evaluates the changed target after each action: a cut costs one Boolean evaluation. Heron's pod with 15 cutters took 113 s through actions against 4.7 s as one joined cutter evaluated once.
  • A slab stands on the surface normal, so a panel break on a stated plane needs setObjectTransform on the cutter afterwards.
  • A floor socket holds one part: three eyes in one visor need three cutters.

Sibling cut kit-roll-aim edits the same lists (classes, brokkr_actions.json, the actions table, ROWS, OwnershipTests, the live row lists); whichever merges second rebases.

🤖 Generated with Claude Code

Cut `aetheria-release:cut_spec:cut-shell-cuts.r1`, base 980ae6a. **What changes** - `brokkr_kitbash.cut`: cuts any mesh (a kit part or an armor cage) where a ray meets it. The cut is a placed part of a new kit, `cutters` (`box`, `cyl`, `slot`, `slab`), parented to the target under an identity parent inverse. The cutter object owns the recess frame (its `matrix_basis`) and size (its params); `box`, `cyl` and `slot` carry a `floor` socket on the bottom of the recess, and machinery attaches there with the ordinary `attach`. The ray is cast at the target with its Kit Booleans off. - One Boolean modifier per operation (`Kit Difference`, `Kit Union`, `Kit Intersect`, above the Bevel), each over a collection of cutters. The modifier per cutter (`Kit Boolean <cutter>`, operand OBJECT) is deleted. `boolean` takes any rigid mesh target; `apply` removes the collections it left without users and keeps the cutter objects. - Socket types are shared across kits: parts of two kits mate when both kits declare the type with the same match. `core.joint` no longer refuses two kits. - `mesh_object` refuses an object in no collection, for every operator at once (finding `cut-kit-joints.s2.attach-onto-orphan-and-ends-first-unpinned`, part 1); the ends-first order of a `set_params` report's closures is pinned (part 2). **Proof** - `python -m unittest discover -s surfaces/blender/tests`: 475 tests, OK (20 skipped). - Blender 5.3 background on Starfire, private user dirs: `tests/live/kitbash.py` 79 checks, `kitbash_assembly.py` 118, `kitbash_shell.py` (new) 47, `mesh_polish.py` 40, all exit 0. - Every mechanical part builds byte-identical arrays and sockets at its defaults against base. - Mutants S1 to S9 of the spec and four more each die; the cut report names the test for each. **Cost** (Blender 5.3, Starfire, 5 interleaved evaluations, a pod-like shell of 5000 faces with 8 cutters placed by `cut`): one collection Boolean 1.89 s, a modifier per cutter 12.6 s, one joined cutter 1.81 s; the same faces and volume. Imagination's probe read 2.04, 14.7 and 1.94 s. **Known limits, for the next round** - `cut` itself takes a few milliseconds, but Blender evaluates the changed target after each action: a cut costs one Boolean evaluation. Heron's pod with 15 cutters took 113 s through actions against 4.7 s as one joined cutter evaluated once. - A slab stands on the surface normal, so a panel break on a stated plane needs `setObjectTransform` on the cutter afterwards. - A floor socket holds one part: three eyes in one visor need three cutters. Sibling cut kit-roll-aim edits the same lists (`classes`, `brokkr_actions.json`, the actions table, `ROWS`, `OwnershipTests`, the live row lists); whichever merges second rebases. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
A deleted object a closure still points to stays in the file; attach, set_params,
report, boolean and every polish operator found it by name. The refusal moves from
close into mesh_object, which they all share (finding
cut-kit-joints.s2.attach-onto-orphan-and-ends-first-unpinned, part 1).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The per-cutter modifier (Kit Boolean <cutter>, operand OBJECT) is gone. A target
carries at most Kit Difference, Kit Union and Kit Intersect, each Exact with
self-intersection, each over a collection in no scene; operation_collection is the
one way a cutter comes to cut, and booleans() reads the three collections. boolean
takes any rigid mesh target; apply removes the collections it emptied of users and
leaves the cutter objects.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
core.joint no longer refuses parts of different kits. mate_refusal takes the child
kit's socketTypes and the two kit names: a type the child's kit does not declare
with the parent kit's match is refused naming both kits; then the shared size rule.
One kit reads as before.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
kits/cutters.v0.json: box, cyl, slot and slab, spanning z from -depth to +lift;
box, cyl and slot carry a floor socket (mount) on the bottom of the recess.
core.surface_frame is the cutter's frame at the hit. cut casts at the target with
its Kit Booleans off, places the cutter as a kit part parented to the target under
an identity parent inverse and adds it to the difference collection: the cutter
object owns the recess frame and size, and machinery attaches to its floor with
the ordinary attach.

tests/live/kitbash_shell.py: cut on a cage that is not a kit part, a vent on a
floor, the three Boolean modifiers, the refusals, an object in no collection, and
the ends-first order of a set_params report's closures (finding
cut-kit-joints.s2.attach-onto-orphan-and-ends-first-unpinned, part 2).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A cut costs one Boolean evaluation of its target, because Blender evaluates a
changed target after every action; cut_many places many cutters in one action,
all or none, for one evaluation (Heron's pod: 4.9 s for 13 cutters against 113 s
for 15 cut actions). cut and cut_many place through one function, place_cutters.
axis states a cutter's z in place of the surface normal, so a panel break does
not lean with a sloping roof. A slot carries floor_l and floor_r beside floor.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
eureka merged commit ffb5a788e4 into main 2026-12-02 02:52:19 +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!28
No description provided.