brokkr_kitbash: roll, aim and reach pose an attached part in place, solved in closed form (cut kit-roll-aim) #29

Merged
eureka merged 3 commits from nibu/kit-roll-aim into main 2026-12-02 03:53:33 +00:00
Owner

Cut kit-roll-aim (aetheria-release:cut_spec:cut-kit-roll-aim.r1), on 980ae6a.

Three actions change an attached part's roll where it hangs, without detaching it:

  • brokkr_kitbash.roll states the roll.
  • brokkr_kitbash.aim solves the roll that turns one of the part's own axes as far toward a world direction as its pin lets it: atan2(B, A).
  • brokkr_kitbash.reach solves the roll that brings one of the part's sockets to a plane: atan2(B, A) ± acos((height - C) / hypot(A, B)), the root nearer the roll it has.

core.roll_terms gives A, B, C (d . p(roll) = A cos + B sin + C). Nothing is scanned. write_connection is now the one writer of a connection (parent, seat, kit_socket, kit_parent_socket, kit_roll); attach's inline write moved into it. Each of the three reports closures as set_params does and never seats one.

Proof

  • python -m unittest discover -s surfaces/blender/tests: 470 tests, OK (20 skipped). New: PoseTests (three), test_the_pose_rows_take_scalars_inside_their_bounds, test_only_write_connection_writes_the_roll (was test_only_attach_writes_the_roll), test_no_roll_is_searched.
  • Blender 5.3 background, private user directories: tests/live/kitbash.py 79 checks, kitbash_assembly.py 119, the new kitbash_pose.py 39; all exit 0, result files committed.
  • Nine mutants applied once each to a scratch copy; each fails a unit test or a live check by name. Bounds follow the margin rule and state both readings.

Timing (Starfire, not committed)

The experiment's Heron and Tarantula (branch nibu/fable-mech-experiments, 13f47e4), built three times each, interleaved, medians of build wall time, with the experiment's helpers and with the same helpers calling roll, aim and reach:

mech experiment as published old helpers on this add-on roll/aim/reach pose calls
Heron 115.4 s 129.0 s 47.6 s 835 detach/attach pairs to 25 roll, 4 aim, 1 reach
Tarantula 260.4 s 286.9 s 71.8 s 2182 pairs to 37 roll, 9 aim, 4 reach

The posed mechs differ by at most 0.38 degrees in any roll and 13 mm in any part's position (the scans stepped 1 degree).

Shared files

Cut shell-cuts edits the same lists (classes, brokkr_actions.json, ROWS, the two live row lists, the docs' action table and its count of operators). Whichever merges second rebases; the overlaps are list entries.

🤖 Generated with Claude Code

Cut `kit-roll-aim` (`aetheria-release:cut_spec:cut-kit-roll-aim.r1`), on 980ae6a. Three actions change an attached part's roll where it hangs, without detaching it: - `brokkr_kitbash.roll` states the roll. - `brokkr_kitbash.aim` solves the roll that turns one of the part's own axes as far toward a world direction as its pin lets it: `atan2(B, A)`. - `brokkr_kitbash.reach` solves the roll that brings one of the part's sockets to a plane: `atan2(B, A) ± acos((height - C) / hypot(A, B))`, the root nearer the roll it has. `core.roll_terms` gives `A`, `B`, `C` (`d . p(roll) = A cos + B sin + C`). Nothing is scanned. `write_connection` is now the one writer of a connection (parent, seat, `kit_socket`, `kit_parent_socket`, `kit_roll`); attach's inline write moved into it. Each of the three reports `closures` as `set_params` does and never seats one. ## Proof - `python -m unittest discover -s surfaces/blender/tests`: 470 tests, OK (20 skipped). New: `PoseTests` (three), `test_the_pose_rows_take_scalars_inside_their_bounds`, `test_only_write_connection_writes_the_roll` (was `test_only_attach_writes_the_roll`), `test_no_roll_is_searched`. - Blender 5.3 background, private user directories: `tests/live/kitbash.py` 79 checks, `kitbash_assembly.py` 119, the new `kitbash_pose.py` 39; all exit 0, result files committed. - Nine mutants applied once each to a scratch copy; each fails a unit test or a live check by name. Bounds follow the margin rule and state both readings. ## Timing (Starfire, not committed) The experiment's Heron and Tarantula (branch `nibu/fable-mech-experiments`, 13f47e4), built three times each, interleaved, medians of build wall time, with the experiment's helpers and with the same helpers calling roll, aim and reach: | mech | experiment as published | old helpers on this add-on | roll/aim/reach | pose calls | | --- | --- | --- | --- | --- | | Heron | 115.4 s | 129.0 s | 47.6 s | 835 detach/attach pairs to 25 roll, 4 aim, 1 reach | | Tarantula | 260.4 s | 286.9 s | 71.8 s | 2182 pairs to 37 roll, 9 aim, 4 reach | The posed mechs differ by at most 0.38 degrees in any roll and 13 mm in any part's position (the scans stepped 1 degree). ## Shared files Cut `shell-cuts` edits the same lists (`classes`, `brokkr_actions.json`, `ROWS`, the two live row lists, the docs' action table and its count of operators). Whichever merges second rebases; the overlaps are list entries. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
write_connection is the one writer of a connection (parent, seat, kit_socket, kit_parent_socket, kit_roll);
attach's inline write moves into it. roll states an attached part's roll where it hangs; aim and reach solve
it from core.roll_terms (d . p = A cos + B sin + C): aim_roll = atan2(B, A), reach_roll = atan2(B, A) +- acos,
the root nearer the current roll. Each reports closures as set_params does and never seats one.

PoseTests pin the solves against core.mate; tests/live/kitbash_pose.py exercises the three operators and their
refusals through run_intent. Cut kit-roll-aim (aetheria-release:cut_spec:cut-kit-roll-aim.r1).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Bounds set from the shipped readings and nine mutants applied once each to a scratch copy (R1 atan2(A, B), R2 the
farther root, R3 roll without the seat, R4 no closures, R5 no aim floor, R6 left-handed roll_terms, R7 attach's
inline write kept, R8 the dot without its hypot, R9 sockets swapped in write_connection): every one fails a
unit test or a live check by name. kitbash, kitbash_assembly and kitbash_pose result files from Blender 5.3.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
eureka force-pushed nibu/kit-roll-aim from b6cbca079a to c788b9d9b6 2026-12-02 02:55:44 +00:00 Compare
AIM_FLOOR 1.5e-9 was set against float64 rounding, but a scene's matrices and an action's fields are float32:
the pin's own direction, as the scene holds it or typed at 6 or 4 decimals, was aimed at and swung the part to
an arbitrary roll. The floor is 1e-3, the geometric mean of the 4 decimal reading (6.2e-5) and a direction
1 degree off the pin (0.0175).

reach takes a height up to REACH_EDGE (1e-5 m, HELD) past the top or bottom of the circle as the top or bottom,
so the range a refusal names (now 6 decimals) can be typed back; a socket on the pin, or a direction along it,
is refused instead of dividing by a zero swing. Half a turn is pinned as 180.

Soul's verdict cut-kit-roll-aim.s1: findings aim-floor-below-float32-noise and
reach-exact-edge-refused-and-unpinned; survivors S6, S7, S8.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
eureka merged commit fa1468a1f5 into main 2026-12-02 03:53:33 +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!29
No description provided.