live kitbash_hose: the steps refused at s2 route, seeds named, a port proven too stiff under a wall; docs: a seed refined, what a refusal claims, the pose-only gap's follow-up (cut kit-hose, h3)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-12-02 19:21:34 +01:00
commit dcd06e9af8
4 changed files with 276 additions and 61 deletions

View file

@ -625,8 +625,9 @@ stands the bundle's half width, the clearance and half a voxel's diagonal from e
between neighbouring free voxels keeps the clearance; a 26-connected wavefront finds a shortest way and it is
pulled taut. The legs joined are one polyline, and each corner is rounded by the largest arc its measured room
allows: the arc stands within `radius * (1 - cos(turn / 2))` of its two tangent segments, so with that much room
beyond the clearance measured along them it keeps the clearance. Where two arcs would overlap on a segment both
shrink in proportion. The floor is `bend` outside diameters for the innermost hose (the centre line's is half the
beyond the clearance measured along them it keeps the clearance. Where two arcs would overlap on a segment each
keeps the tangent its bend takes at the floor and they share what the segment has left, in proportion to what each
asked beyond that; the corner at a pin holds the tangent its sharpest roll takes. The floor is `bend` outside diameters for the innermost hose (the centre line's is half the
bundle's spread more). The finished curve is measured once more against every mesh before anything is written.
**Measured, not sampled.** Every line the route trusts (a sight line of the pull, a tangent segment's room, the
@ -643,11 +644,46 @@ has no room for an arc; how much it happened to keep changed with `step`, so a b
floor beyond the clearance, what the arc of a quarter turn at the floor takes (within twice that of a leg's end
the pull asks half the distance from the end instead, since an end stands where it is given). A leg with no way
that roomy (a clamp stands nearer its seat than that, and so does a gap the bundle only just passes) is searched
again without, and the hose is longer where the roomy way goes round. A corner under the floor is refused by what
limits it: the bundle too stiff for the route (the corner's segments are shorter than its tangent at the floor),
an obstacle too near the corner's segments for the arc (both distances named), or two corners that cannot share
the segment between them. The remedies are a lower `bend`, thinner or fewer hoses, waypoints further apart (a
larger `standoff`), or a clamp that leads the hose wide; a different `step` is not one.
again without, and the hose is longer where the roomy way goes round.
**A seed, refined.** The polyline a search gives is a seed. Its vertices stand where the grid's lattice put them,
so whether two corners have the straight between them for both bends follows the lattice too: searched and pulled
with room alone, the first bundle on the knee routed at steps 0.125 and 0.13 and was refused at 0.1275, and the
second was refused at 26 of the 76 steps from 0.0125 to 0.2. Three things take the lattice out of the answer.
- A corner keeps its floor's tangent before a neighbour gets more (above), and the pin's corner holds what its
sharpest roll takes, exactly (`route.sharpest_turn`: the turn's cosine over a range of rolls is a + b cos + c sin).
- A seed that is refused is refined in continuous space (`route.relax`). About each segment too short for its
corners' tangents at the floor (`route.strain`), a vertex the search placed is dropped, moved along each axis and
along its own two segments, or joined by a new one beside a segment's middle; the try that lowers the shortfall
most is kept if `route.measure` proves its changed segments clear with the room a leg is pulled with. The moves
start a floor long and halve when nothing helps, down to 1 mm. Ports, lead ends, clamp straights and the pin
point do not move. The refinement prices straight only: room for an arc is still measured by the fillet after it.
- A route still refused is searched again on two more grid origins (half a step along each axis; then 0.31, 0.67
and 0.13 of a step), and then at half the step on all three, each seed refined the same way. `seed` in the
report is the step and origin that gave the route and whether it was refined.
The cost is in the refusals and in sameness: a route that cannot be made runs up to six seeds, three of them on 8
times the voxels, before it is refused, and the same request at another `step` may take another way round, though
never one that clears less than the clearance or bends under the floor.
A refusal after all that says what was tried, and that this shows no route was found, not that none exists: `the
search found no route: it tried steps 0.02 and 0.01, each on grid origins (0, 0, 0), (0.5, 0.5, 0.5), (0.31, 0.67,
0.13) of a step, and refined each seed in continuous space; this does not show that no route exists. The first
refusal: corner 2 at ...`. The first refusal is the requested step's own seed's, by corner, point or roll, with
what that polyline lacked: straight for a tangent, room for an arc (both distances named), or a segment two corners
cannot share. An end that stands nearer an obstacle than the bundle needs is refused at once: no grid lifts that.
`too stiff` is said only where it is proven (`route.leaves`). For its first pi floors of length a curve that bends
no tighter than the floor stays out of every ball of radius floor that touches its line where it starts, and ahead
of that point, and by then it stands 2 floors away (Schwarz's bound on a chord; Dubins 1957). So where a fitting's
lead ends, the hose must reach the sphere of 2 floors through points that keep the clearance and lie outside those
balls. They are read on voxels of a sixth of the floor with the bound every other measurement uses, and when they
do not join the lead's end to the sphere no route exists at that `bend`: `the bundle is too stiff to leave its
start: from the end of its lead at ... no curve that bends at the floor radius ... or wider keeps ... from what
stands within ... of it`. The proof is tried at both ports when no route was found. It does not look at clamps or
the pin, so a bundle too stiff for the room there gets the search's refusal. The remedies are a lower `bend`,
thinner or fewer hoses, waypoints further apart (a larger `standoff`), or a clamp that leads the hose wide.
**Slack.** `sag` (outside diameters, default 1) lowers the middle of each free span's longest segment along world
-z, by less where the span runs steeply, and never by more than half the room measured along it: both halves then
@ -672,8 +708,8 @@ radius through a bin, the largest that fits at the bin's sharpest turn, and its
for the clearance and the arc's dip more. A bin that falls short is halved and measured again at each half's
middle, down to 0.3 degrees of half width, so a range that is clear costs 9 rolls for 40 degrees and one that
passes near a part costs more only there (`rolls` reports how many were measured). A range that fails is refused
by roll, side and point (`roll 49.22: the hose's child's side reads 0.02653 m from the parts about the pin at
[-0.2107, -0.2043, 0.7271], counting the 0.0005832 m it can move against the other side's through the 0.156 degrees
by roll, side and point (`roll 50.78: the hose's child's side reads 0.0264 m from the parts about the pin at
[-0.2122, -0.2044, 0.7269], counting the 0.0005875 m it can move against the other side's through the 0.156 degrees
either side of it: under the 0.0266 m the bundle needs`); when the sagged route and the taut one both fail the
refusal names both. `worstClearance` is the least reading over the range, each less what its point can move within
its bin. `lengthChange` is the centre line's longest less its shortest over the rolls measured, as each rounds the
@ -682,7 +718,10 @@ bend. Two pins between the ends are refused: end the hose on a part between them
Another hose through the same pin bends with it and belongs to neither side. A route keeps clear of it where it
stands, and across the rolls each hose is measured against the parts of the two sides, not against where the other
hose stood: give two hoses through one pin different standoffs, and their clearance from each other holds at the
pose they were routed at.
pose they were routed at. That is a ruled limit (`aetheria-release:ruling:hose-same-pin-pose-only-now`), and the
check it leaves out has an owner: follow-up `aetheria-release:follow_up:hose-motion-clearance-from-skinning` will pose
each other hose across the range with the skin blend the output mesh uses. Until it lands nothing measures two hoses
through one pin against each other in motion.
**What it writes.** One mesh object, a child of the start's object under identity matrices, with no modifier and
no material: each hose, two ferrule collars at each of its ends, and the clamps, all swept by `core.sweep`.
@ -699,8 +738,10 @@ skin weights are `brokkr_rig`'s.
names no object, no such socket, or a socket of the wrong type; a bundle wider than a port, naming both sizes; a
part that is scaled or that Blender does not evaluate; a pin crossed with no `joint`, a `joint` with no pin, two
pins, a `joint` socket off the pin's axis, the current roll outside `range`; a search box over 524288 voxels,
naming a step that fits; an end nearer an obstacle than the bundle needs; no way through; a corner under the
floor, by what limits it; a curve not proven to keep the clearance, naming the point; a roll that fails.
naming a step that fits; an end nearer an obstacle than the bundle needs; a bundle proven too stiff to leave a
port; and, once every seed has been tried, no route found, with the first seed's refusal: no way through, a corner
under the floor by what its polyline lacked, a curve not proven to keep the clearance at a named point, or a roll
that fails.
**Cost.** Probes in Blender 5.3 on Starfire, medians of 3 interleaved repetitions: a nearest-face query on a tree of
81,920 faces takes 100 to 123 us uncapped and 3.4 us capped at 0.06 m, so every query is capped; on a grid of
@ -710,10 +751,15 @@ fillet and the verification under 2 ms together, 27 rolls 0.056 s and the sweep
knee of `tests/live/kitbash_hose.py` (two struts, two actuators and a plate; two legs of 79,488 and 53,406
voxels at roll 0, timed at roll 10; three hoses, 9 rolls) took 0.80 s a call, median of 3 each after one report
action, where it took 0.50 s when lines were sampled at half a voxel and each leg was searched once: the occupancy
is read to a larger cap and the room, the curve and the rolls are measured to 1 mm near what they pass.
is read to a larger cap and the room, the curve and the rolls are measured to 1 mm near what they pass. With
seeds refined and retried the same call took 0.64 s. Over the 76 steps from 0.0125 to 0.2 on that knee, one call
each with three other Blenders running, the first bundle took 0.53 s at the median and 2.34 s at most, and the
second 0.32 s and 2.56 s; of the second's 76 routes 8 came from a refined seed, 3 from another grid origin and 12
from half the step.
`tests/test_route.py` proves the path without Blender (the half-diagonal rule, a plate between two readings, a leg's
room where it wraps, the fillet's tangency, sharing, room and floor, the sag's bound, the frames against the double
room where it wraps, the fillet's tangency, sharing, room and floor, a corner's floor before its neighbour's share, a
seed refined where the oracle allows, the proof of too stiff, the sharpest turn of a range of rolls, the sag's bound, the frames against the double
reflection method, the rolls and a plate between two of them, the bend at the pin's room), and
`tests/live/kitbash_hose.py` the action in Blender.
@ -751,7 +797,7 @@ vertices overflow.
| `brokkr_kitbash.apply` | `object_name` | Bakes the evaluated mesh into the kit part and clears its modifiers and the collections its Booleans held. Refuses a part with no modifiers, a mesh another object shares and a part Blender does not evaluate. Reports the part, `faces`, `volume`, `nonManifoldEdges` and the `cutters` it no longer refers to. |
| `brokkr_kitbash.ribs` | `object_name` (the cage), `ribs_name`, `planes` (a JSON array of 1 to 64 `{origin, normal}`, up to 16000 characters), `standoff`, `depth`, `thickness`, `step`, `holes`, `posts`, `post_r`, `bridge`, `clearance`, `longerons` (a JSON array of 0 to 16 `{origin, axis, toward}`, up to 8000 characters), `longeron`, `longeron_w`, `longeron_h`, `longeron_t` | Derives ribs, lightening holes, posts and longerons from the cage as it is cut, as one mesh object under it. Refuses before it writes anything, naming the plane or longeron. Reports `object`, `ribs`, `thickness`, `sections: [{plane, chains, pieces, length, open}]`, `posts`, `holes`, `longerons: [{index, stations}]` (trimmed to a receipt, with `longeronsOmitted`), `faces`, `volume` and `nonManifoldEdges`. |
| `brokkr_kitbash.shell` | `object_name`, `sheet` (a JSON object `{rings, closed, mirror, creases, rim, flip}`, up to 32000 characters), `thickness`, `offset`, `levels`, `bevel`, `count_folds` | Makes a faceted, hollow armor shell from a loft of rings with crease runs, or rebuilds a shell's cage in place under its cutters and ribs. Refuses before it writes anything, naming the field and index. Reports `object`, `rebuilt`, `rings`, `points`, `cageFaces`, `creases`, `folded` (with `count_folds`, the number of the evaluated wall's inner faces that fold; else null), `corners`, `subdividedFaces`, `facing`, `thickness`, `offset`, `levels` and `children`. |
| `brokkr_kitbash.hose` | `object_name`, `start`, `end`, `count`, `radius`, `spread`, `clearance`, `bend`, `step`, `sag`, `clamps` (a JSON array of up to 8 `{socket}`), `joint` (empty, or a JSON object `{socket, standoff, range}`) | Routes a bundle of hoses between two sockets around every other mesh, over clamps and through a pin's axis across its roll range; on a hose's name, rebuilds it in place. Reports `length`, `lengthChange`, `clearance`, `radii`, `sag`, `voxels`, `rolls`, `worstRoll`, `faces`, `nonManifoldEdges`. |
| `brokkr_kitbash.hose` | `object_name`, `start`, `end`, `count`, `radius`, `spread`, `clearance`, `bend`, `step`, `sag`, `clamps` (a JSON array of up to 8 `{socket}`), `joint` (empty, or a JSON object `{socket, standoff, range}`) | Routes a bundle of hoses between two sockets around every other mesh, over clamps and through a pin's axis across its roll range; on a hose's name, rebuilds it in place. Reports `length`, `lengthChange`, `clearance`, `radii`, `sag`, `voxels`, `seed`, `rolls`, `worstRoll`, `faces`, `nonManifoldEdges`. |
`params` is `name=value; name=value`; a param left out takes the part's default (`place_part`) or keeps its stored
value (`set_params`). A value outside its bounds is refused with the bounds in the message.