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:
parent
edbd04f1ef
commit
dcd06e9af8
4 changed files with 276 additions and 61 deletions
|
|
@ -784,7 +784,7 @@
|
|||
},
|
||||
{
|
||||
"name": "brokkr_kitbash.hose",
|
||||
"doc": "Route a bundle of hoses between two sockets, around every mesh Blender evaluates in the scene. start and end are 'Object:socket' on a kit part (a hose or flange socket no narrower than the bundle) or 'Object' alone, an empty whose z the hose leaves along. A leg runs between each pair of waypoints (a fitting's lead end, each clamp, the pin point): it is searched on a voxel grid of its ends' box plus 0.25 m (at most 524288 voxels), pulled taut with room for its bends where a way has it, and the whole polyline is rounded, each corner by the largest arc its measured room allows; the innermost hose's bend radius is at least bend outside diameters, and a fitting keeps a straight of 8 radii (a ferrule, then 1.5 outside diameters). The centre line keeps the bundle's half width plus clearance from every other mesh, other hoses included, outside those leads. sag hangs the middle of each free span by that many outside diameters, never by more than half the room measured along the span; a route the sag breaks is made taut instead (sag in the report reads 0). clamps is a JSON array of up to 8 {\"socket\": \"Object:socket\"}, mount sockets in order along the hose: the bundle runs straight over each, along the socket's y, and gets a pad and a strap. A hose may cross one pin (a pivot connection between its ends' parts): joint is then {\"socket\": \"Object:socket\", \"standoff\": metres, \"range\": [lo, hi]}, a socket on that pin's axis whose z runs along it; the hose passes through the point standoff beyond it, so each side's straights move with their own part and only the bend at that point changes. The whole range from lo to hi is measured without posing anything, each side against the other side's parts: a roll every 5 degrees answers for the rolls about it by what a point can move within them, and more are measured between where that falls short; another hose through the same pin is kept clear of where it stands, not across the rolls. Every line is measured so that nothing thinner than a spacing can stand between two readings, whatever the step. The hose is one mesh object, a child of the start's object, and a bake of the scene at the call: after a part moves or rolls, run hose again on its name to rebuild it in place. Where it crosses a pin it is meant to be skinned between the bones on either side; no weights are written. Refuses before it writes anything, naming the leg, corner, point or roll. Reports object, rebuilt, hoses, length, lengthChange (over the range, of the centre line as each roll rounds it), floor, clearance (least beyond the bundle, outside the leads; readings stop at capped), voxels per leg, sag per leg in metres, rolls (how many were measured), worstRoll, worstClearance (least over the range, each reading less what its point can move within its roll's bin), faces, volume, nonManifoldEdges and radii {least, corners}.",
|
||||
"doc": "Route a bundle of hoses between two sockets, around every mesh Blender evaluates in the scene. start and end are 'Object:socket' on a kit part (a hose or flange socket no narrower than the bundle) or 'Object' alone, an empty whose z the hose leaves along. A leg runs between each pair of waypoints (a fitting's lead end, each clamp, the pin point): it is searched on a voxel grid of its ends' box plus 0.25 m (at most 524288 voxels), pulled taut with room for its bends where a way has it, and the whole polyline is rounded, each corner by the largest arc its measured room allows. That polyline is a seed: one refused for want of straight between its corners is refined in continuous space (vertices dropped, moved and added, each change proven clear), and before a route is refused the legs are searched again on two more grid origins and at half the step. The refusal then names the steps and origins tried and the first seed's refusal, and says this shows no route was found, not that none exists; it says the bundle is too stiff only where that is proven at a port. The innermost hose's bend radius is at least bend outside diameters, and a fitting keeps a straight of 8 radii (a ferrule, then 1.5 outside diameters). The centre line keeps the bundle's half width plus clearance from every other mesh, other hoses included, outside those leads. sag hangs the middle of each free span by that many outside diameters, never by more than half the room measured along the span; a route the sag breaks is made taut instead (sag in the report reads 0). clamps is a JSON array of up to 8 {\"socket\": \"Object:socket\"}, mount sockets in order along the hose: the bundle runs straight over each, along the socket's y, and gets a pad and a strap. A hose may cross one pin (a pivot connection between its ends' parts): joint is then {\"socket\": \"Object:socket\", \"standoff\": metres, \"range\": [lo, hi]}, a socket on that pin's axis whose z runs along it; the hose passes through the point standoff beyond it, so each side's straights move with their own part and only the bend at that point changes. The whole range from lo to hi is measured without posing anything, each side against the other side's parts: a roll every 5 degrees answers for the rolls about it by what a point can move within them, and more are measured between where that falls short; another hose through the same pin is kept clear of where it stands, not across the rolls (follow-up aetheria-release:follow_up:hose-motion-clearance-from-skinning owes that check). Every line is measured so that nothing thinner than a spacing can stand between two readings, whatever the step. The hose is one mesh object, a child of the start's object, and a bake of the scene at the call: after a part moves or rolls, run hose again on its name to rebuild it in place. Where it crosses a pin it is meant to be skinned between the bones on either side; no weights are written. Refuses before it writes anything, naming the leg, corner, point or roll. Reports object, rebuilt, hoses, length, lengthChange (over the range, of the centre line as each roll rounds it), floor, clearance (least beyond the bundle, outside the leads; readings stop at capped), voxels per leg, seed {step, offset, refined} (the grid that gave the route, and whether its polyline was refined), sag per leg in metres, rolls (how many were measured), worstRoll, worstClearance (least over the range, each reading less what its point can move within its roll's bin), faces, volume, nonManifoldEdges and radii {least, corners}.",
|
||||
"changesScene": true,
|
||||
"editModeSafe": false,
|
||||
"result": "brokkr_mesh_polish_result",
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -68,10 +68,10 @@ LEAD = 8.0 * RADIUS
|
|||
FLOOR = 4.0 * 2.0 * RADIUS + SPREAD # of the centre line: the innermost hose keeps 4 outside diameters
|
||||
BUNDLE = {"count": COUNT_HOSES, "radius": RADIUS, "clearance": CLEARANCE}
|
||||
# Metres between a hose's surface and the nearest other mesh, read on the hose's own vertices further than the lead
|
||||
# from both its ports (the least is the worst), over every hose this suite makes. Shipped worst 0.032. Least claimed
|
||||
# from both its ports (the least is the worst), over every hose this suite makes. Shipped worst 0.031. Least claimed
|
||||
# mutant 0.0089: H4b (route.verify measures and refuses nothing) accepts the hose past the plate beside a port's
|
||||
# straight, section "verify", and the ring of it nearest the plate reads that; shipped refuses it and makes no hose.
|
||||
# The geometric mean, separation 1.9 each side.
|
||||
# The geometric mean, separation 1.8 and 1.9.
|
||||
CLEAR = 0.017
|
||||
# Metres a clamped hose's ring vertices stand off the radius about its own line over a clamp (the line through the
|
||||
# clamp point along the socket's y, offset across the bundle), over the 24 nearest; 1 when a hose has no 24 vertices
|
||||
|
|
@ -261,8 +261,8 @@ try:
|
|||
check("a rebuild at the same pose reports what the first call did", {**again, "rebuilt": False} == report and len(bpy.data.meshes) == len(state[1]) + 1, again)
|
||||
check("hose-through-range: the range passes and reports the length's change", report["lengthChange"] is not None and report["lengthChange"] >= 0 and report["worstRoll"] is not None, report)
|
||||
refused("a range that swings the shin's hose into the thigh's parts, naming the sagged attempt and the taut one", {**FEED, "joint": json.dumps({**JOINT, "range": [-20, 90]})},
|
||||
"sagged: 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 either side of it: under the 0.0266 m the bundle needs; taut: roll 50.78: the hose's child's side reads 0.0264 m")
|
||||
"sagged: roll 48.59: the hose's child's side reads 0.0269 m from the parts about the pin at [-0.2144, -0.2042, 0.7271], counting the 0.0005933 m it can move against the other side's "
|
||||
"through the 0.156 degrees either side of it: too near the 0.0266 m the bundle needs to prove it of what stands between two readings; taut: roll 50.78: the hose's child's side reads 0.0264 m")
|
||||
receipt, _ = send("brokkr_kitbash.hose", **{**FEED, "joint": json.dumps({**JOINT, "range": [-20, 90]})})
|
||||
check("the refusal names both attempts, each by its roll and its side", "sagged: roll " in str(receipt["message"]) and "; taut: roll " in str(receipt["message"])
|
||||
and str(receipt["message"]).count("the hose's child's side reads") == 2, receipt["message"])
|
||||
|
|
@ -333,11 +333,38 @@ try:
|
|||
for step in (0.0125, 0.03, 0.04): # feasibility does not turn on the step: a leg is searched with room for its bends
|
||||
receipt, _ = send("brokkr_kitbash.hose", **{**FEED, "step": step})
|
||||
check(f"the first hose's route also stands at step {step}, beside the second", receipt["status"] == "accepted", receipt["message"])
|
||||
# bend-room-not-monotone-in-step: a search's polyline is a seed. These are steps whose seeds were refused before
|
||||
# seeds were refined and searched on other grid origins (0.1275 of the first bundle, the rest of the second).
|
||||
seeds = []
|
||||
for base, step in [(FEED, 0.1275)] + [(RETURN, step) for step in (0.0225, 0.04, 0.115, 0.1425, 0.155, 0.2)]:
|
||||
receipt, swept = send("brokkr_kitbash.hose", **{**base, "step": step})
|
||||
ok = receipt["status"] == "accepted"
|
||||
check(f"{base['object_name']} routes at step {step}: no bend under the floor, the clearance kept", ok and swept["radii"]["least"] >= FLOOR * (1 - 1e-6) and swept["clearance"] >= CLEARANCE
|
||||
and swept["worstClearance"] >= CLEARANCE and reading("clear", surface_clearance(bpy.data.objects[base["object_name"]], [frame(ram, "port_cap" if base is FEED else "port_rod")[:3, 3] for ram in (upper, lower)]), least=True) >= CLEAR,
|
||||
[receipt["message"], swept, R["readings"]])
|
||||
seeds.append(swept["seed"] if ok else None)
|
||||
R["reports"]["seeds"] = seeds
|
||||
check("some of those routes come from a refined seed and some from another grid origin, and the report says which",
|
||||
any(seed and seed["refined"] for seed in seeds) and any(seed and seed["offset"] != [0.0, 0.0, 0.0] for seed in seeds), seeds)
|
||||
send("brokkr_kitbash.hose", **FEED)
|
||||
refused("a bundle too stiff for the knee, by what limits its bend", {**FEED, "bend": 16.0}, "under the floor 0.2076: ")
|
||||
send("brokkr_kitbash.hose", **RETURN)
|
||||
refused("a bend the search finds no route for on the knee, by what its first seed lacked", {**FEED, "bend": 16.0}, "under the floor 0.2076: ")
|
||||
rod_ports = [frame(upper, "port_rod")[:3, 3], frame(lower, "port_rod")[:3, 3]]
|
||||
check("hose-behind-armour: the second hose keeps the clearance from the first", reading("clear", surface_clearance(bpy.data.objects["Return"], rod_ports), least=True) >= CLEAR, R["readings"])
|
||||
refused("a pin point another hose already passes", {**RETURN, "object_name": "Third"}, "from an obstacle")
|
||||
section("too stiff")
|
||||
# too stiff is said where it is proven: a wall 0.08 above a port leaves the centre line 0.021 beyond its lead to
|
||||
# turn aside in, and a curve of the floor radius 0.048 cannot; one of 0.012 can, and routes.
|
||||
for name, x in (("Nozzle", 10.0), ("Drain", 10.6)):
|
||||
empty = bpy.data.objects.new(name, None)
|
||||
empty.location = (x, 0.0, 0.0)
|
||||
bpy.context.scene.collection.objects.link(empty)
|
||||
box("Lid", (9.0, -1.0, 0.08), (11.6, 1.0, 0.1))
|
||||
bpy.context.view_layer.update()
|
||||
LOOP = {"object_name": "Loop", "start": "Nozzle", "end": "Drain", "count": 1, "radius": RADIUS, "clearance": CLEARANCE}
|
||||
refused("a bundle proven too stiff to leave its port under a wall", LOOP, "the bundle is too stiff to leave its start: from the end of its lead at [10, 0, 0.048] no curve that bends at the floor radius 0.048 m or wider")
|
||||
receipt, loop = send("brokkr_kitbash.hose", **{**LOOP, "bend": 1.0})
|
||||
check("the same hose at bend 1 routes under the wall", receipt["status"] == "accepted" and loop["radii"]["least"] >= 0.012 * (1 - 1e-6) and loop["clearance"] >= CLEARANCE, [receipt["message"], loop])
|
||||
section("clamps")
|
||||
tank = place("Tank", "tank", "radius=0.22;length=0.9", [3.0, 0.0, 0.0])
|
||||
seats = [place(name, "plate", "width=0.1;height=0.1", [x, 0.0, 1.25], [0.0, 0.0, math.pi / 2]) for name, x in (("SeatA", 3.45), ("SeatB", 4.05))]
|
||||
|
|
|
|||
|
|
@ -137,7 +137,47 @@
|
|||
"detail": null
|
||||
},
|
||||
{
|
||||
"name": "refused, scene unchanged: a bundle too stiff for the knee, by what limits its bend",
|
||||
"name": "Feed routes at step 0.1275: no bend under the floor, the clearance kept",
|
||||
"ok": true,
|
||||
"detail": null
|
||||
},
|
||||
{
|
||||
"name": "Return routes at step 0.0225: no bend under the floor, the clearance kept",
|
||||
"ok": true,
|
||||
"detail": null
|
||||
},
|
||||
{
|
||||
"name": "Return routes at step 0.04: no bend under the floor, the clearance kept",
|
||||
"ok": true,
|
||||
"detail": null
|
||||
},
|
||||
{
|
||||
"name": "Return routes at step 0.115: no bend under the floor, the clearance kept",
|
||||
"ok": true,
|
||||
"detail": null
|
||||
},
|
||||
{
|
||||
"name": "Return routes at step 0.1425: no bend under the floor, the clearance kept",
|
||||
"ok": true,
|
||||
"detail": null
|
||||
},
|
||||
{
|
||||
"name": "Return routes at step 0.155: no bend under the floor, the clearance kept",
|
||||
"ok": true,
|
||||
"detail": null
|
||||
},
|
||||
{
|
||||
"name": "Return routes at step 0.2: no bend under the floor, the clearance kept",
|
||||
"ok": true,
|
||||
"detail": null
|
||||
},
|
||||
{
|
||||
"name": "some of those routes come from a refined seed and some from another grid origin, and the report says which",
|
||||
"ok": true,
|
||||
"detail": null
|
||||
},
|
||||
{
|
||||
"name": "refused, scene unchanged: a bend the search finds no route for on the knee, by what its first seed lacked",
|
||||
"ok": true,
|
||||
"detail": null
|
||||
},
|
||||
|
|
@ -151,6 +191,16 @@
|
|||
"ok": true,
|
||||
"detail": null
|
||||
},
|
||||
{
|
||||
"name": "refused, scene unchanged: a bundle proven too stiff to leave its port under a wall",
|
||||
"ok": true,
|
||||
"detail": null
|
||||
},
|
||||
{
|
||||
"name": "the same hose at bend 1 routes under the wall",
|
||||
"ok": true,
|
||||
"detail": null
|
||||
},
|
||||
{
|
||||
"name": "hose-clamps-ports: a hose runs from the tank's flange over two clamps to the ram's port",
|
||||
"ok": true,
|
||||
|
|
@ -290,17 +340,17 @@
|
|||
"hostErrors": [],
|
||||
"readings": {
|
||||
"clamped": 4.6e-08,
|
||||
"clear": 0.032,
|
||||
"clear": 0.031,
|
||||
"kept": 0.028,
|
||||
"slack": 0.021
|
||||
"slack": 0.017
|
||||
},
|
||||
"reports": {
|
||||
"feed": {
|
||||
"object": "Feed",
|
||||
"rebuilt": false,
|
||||
"hoses": 3,
|
||||
"length": 1.646929,
|
||||
"lengthChange": 0.029095,
|
||||
"length": 1.642855,
|
||||
"lengthChange": 0.034539,
|
||||
"floor": 0.0636,
|
||||
"clearance": 0.024995,
|
||||
"capped": 0.1522,
|
||||
|
|
@ -308,25 +358,34 @@
|
|||
79488,
|
||||
53406
|
||||
],
|
||||
"seed": {
|
||||
"step": 0.02,
|
||||
"offset": [
|
||||
0.0,
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
"refined": false
|
||||
},
|
||||
"sag": [
|
||||
0.001879,
|
||||
0.009076
|
||||
],
|
||||
"rolls": 9,
|
||||
"worstRoll": -20.0,
|
||||
"worstClearance": 0.025029,
|
||||
"worstClearance": 0.025166,
|
||||
"faces": 3378,
|
||||
"volume": 0.000578788,
|
||||
"volume": 0.000577468,
|
||||
"nonManifoldEdges": 0,
|
||||
"radii": {
|
||||
"least": 0.122563,
|
||||
"least": 0.134032,
|
||||
"corners": [
|
||||
0.297307,
|
||||
0.122563,
|
||||
31.156603,
|
||||
0.207446,
|
||||
3.895369,
|
||||
0.129781
|
||||
0.134032,
|
||||
28.760693,
|
||||
0.232497,
|
||||
3.487729,
|
||||
0.140588
|
||||
]
|
||||
}
|
||||
},
|
||||
|
|
@ -334,52 +393,135 @@
|
|||
"object": "Return",
|
||||
"rebuilt": false,
|
||||
"hoses": 3,
|
||||
"length": 1.691847,
|
||||
"lengthChange": 0.024737,
|
||||
"length": 1.679265,
|
||||
"lengthChange": 0.032203,
|
||||
"floor": 0.0636,
|
||||
"clearance": 0.026695,
|
||||
"clearance": 0.026679,
|
||||
"capped": 0.1522,
|
||||
"voxels": [
|
||||
82110,
|
||||
92820
|
||||
],
|
||||
"seed": {
|
||||
"step": 0.02,
|
||||
"offset": [
|
||||
0.0,
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
"refined": false
|
||||
},
|
||||
"sag": [
|
||||
0.008745,
|
||||
0.00844
|
||||
],
|
||||
"rolls": 9,
|
||||
"worstRoll": -20.0,
|
||||
"worstClearance": 0.027636,
|
||||
"faces": 5430,
|
||||
"volume": 0.000593342,
|
||||
"worstClearance": 0.027159,
|
||||
"faces": 5466,
|
||||
"volume": 0.000589265,
|
||||
"nonManifoldEdges": 0,
|
||||
"radii": {
|
||||
"least": 0.070247,
|
||||
"least": 0.082543,
|
||||
"corners": [
|
||||
0.070247,
|
||||
4.795067,
|
||||
0.124489,
|
||||
0.24111,
|
||||
0.07885,
|
||||
10.851944,
|
||||
0.095513
|
||||
0.082543,
|
||||
4.587721,
|
||||
0.136709,
|
||||
0.183407,
|
||||
0.094636,
|
||||
9.943722,
|
||||
0.104249
|
||||
]
|
||||
}
|
||||
},
|
||||
"seeds": [
|
||||
{
|
||||
"step": 0.1275,
|
||||
"offset": [
|
||||
0.0,
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
"refined": false
|
||||
},
|
||||
{
|
||||
"step": 0.0225,
|
||||
"offset": [
|
||||
0.0,
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
"refined": false
|
||||
},
|
||||
{
|
||||
"step": 0.04,
|
||||
"offset": [
|
||||
0.0,
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
"refined": true
|
||||
},
|
||||
{
|
||||
"step": 0.115,
|
||||
"offset": [
|
||||
0.0,
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
"refined": true
|
||||
},
|
||||
{
|
||||
"step": 0.1425,
|
||||
"offset": [
|
||||
0.31,
|
||||
0.67,
|
||||
0.13
|
||||
],
|
||||
"refined": false
|
||||
},
|
||||
{
|
||||
"step": 0.155,
|
||||
"offset": [
|
||||
0.0,
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
"refined": true
|
||||
},
|
||||
{
|
||||
"step": 0.1,
|
||||
"offset": [
|
||||
0.0,
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
"refined": false
|
||||
}
|
||||
],
|
||||
"line": {
|
||||
"object": "Line",
|
||||
"rebuilt": false,
|
||||
"hoses": 3,
|
||||
"length": 2.10125,
|
||||
"length": 2.100069,
|
||||
"lengthChange": null,
|
||||
"floor": 0.0636,
|
||||
"clearance": 0.010962,
|
||||
"clearance": 0.010959,
|
||||
"capped": 0.1522,
|
||||
"voxels": [
|
||||
49815,
|
||||
34992,
|
||||
43011
|
||||
],
|
||||
"seed": {
|
||||
"step": 0.02,
|
||||
"offset": [
|
||||
0.0,
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
"refined": false
|
||||
},
|
||||
"sag": [
|
||||
0.00942,
|
||||
0.012,
|
||||
|
|
@ -389,20 +531,20 @@
|
|||
"worstRoll": null,
|
||||
"worstClearance": null,
|
||||
"faces": 2510,
|
||||
"volume": 0.000777488,
|
||||
"volume": 0.000777105,
|
||||
"nonManifoldEdges": 0,
|
||||
"radii": {
|
||||
"least": 0.091455,
|
||||
"least": 0.100091,
|
||||
"corners": [
|
||||
0.097757,
|
||||
4.439012,
|
||||
0.091455,
|
||||
1.734649,
|
||||
2.898844,
|
||||
1.734649,
|
||||
1.665625,
|
||||
7.39548,
|
||||
10.86245
|
||||
0.109706,
|
||||
4.289628,
|
||||
0.100091,
|
||||
1.739264,
|
||||
2.896538,
|
||||
1.739264,
|
||||
1.672436,
|
||||
7.389576,
|
||||
10.858347
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue