brokkr_kitbash.ram: Signed signs by the generalized winding number; the piece split and the rays are cut
Inside is where the winding number of the part's triangles about the point is 0.5 or more (Jacobson, Kavan and Sorkine-Hornung 2013), the plain sum in numpy. Overlapping solids, welded or not, wind by their count; a nonconvex prism winds whole; an open cube reads inside up to its hole's plane. _pieces, RAYS, the rays parameter and the ray fixture's points are gone; ram_rays.json is ram_plates.json and keeps the overlapping bars. Live ram_knee: 20 checks, search 34.5 s (the parity oracle beside it 34.5 s). Closes cut-kit-ram-lows.s1 signed-trusts-closed-and-unwelded and rays-three-pinned-by-no-check. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
parent
c4ac06c2dd
commit
404849a30e
7 changed files with 200 additions and 153 deletions
|
|
@ -1030,17 +1030,20 @@ Bore 0.042, range 0..-125. The kinematic rows are tests/test_ram.py's. The clear
|
|||
test generates (thigh with its front plate, shin with caps and armour, the bracket that carries R, the horn that
|
||||
carries `c`, twin link plates stacked 5 mm apart at x 0.31..0.345 and 0.35..0.385, pins through the knee's width,
|
||||
collars at the eye and a base clevis whose foot runs 0.01 into the thigh; 12 parts) and the package's signed BVH
|
||||
oracle, `ram.Signed(shells, cap)`: the nearest face for the depth, the crossing parity of three rays, by majority,
|
||||
for the side. One ray that runs through an edge or a vertex miscounts and signs a sample inside a plate it stands
|
||||
clear of. `tests/fixtures/ram_rays.json` holds the ray count: the rocker plates as the joint library builds them
|
||||
and 14 points beside their bars, each on the first ray short of an edge or a vertex. One ray signs all 14
|
||||
inside; three sign none. Three rays are not a proof: of 146 such points one ray missigned, two rays missigned 16.
|
||||
Two rays, or a second and third along x and y, read those 14 as three do: the fixture holds the count above one.
|
||||
A mesh is read piece by piece: `Signed` splits it into the pieces its faces join, each closed, and a point is
|
||||
inside the part where it is inside any piece. The joint library's plates are one mesh of four bars, a side's two
|
||||
overlapping about the pivot; parity over the whole mesh reads the overlap as outside (1,906 of 38,448 grid
|
||||
points inside the bars, the direction the proof between samples cannot bear), and piece by piece none of them
|
||||
reads outside, which the live check holds.
|
||||
oracle, `ram.Signed(shells, cap)`: the nearest face for the depth, the generalized winding number for the side
|
||||
(Jacobson, Kavan and Sorkine-Hornung 2013). `ram.winding` sums the signed solid angle of every triangle of the part
|
||||
about the point, over 4 pi: about a closed mesh the whole number of times the surface wraps the point, 0 outside, 1
|
||||
inside, 2 where two solids overlap. A point is inside the part at 0.5 or more. The joint library's plates are one
|
||||
mesh of four bars, a side's two overlapping about the pivot (`tests/fixtures/ram_plates.json`, with 29 points
|
||||
inside them, 13 inside two bars): each reads inside, as does the overlap of two boxes welded at a corner and a
|
||||
staircase prism a line crosses six times. Faces are wound counterclockwise seen from outside; a mesh wound inside
|
||||
out reads outside everywhere. An open mesh is answered, not refused: the number is the closed mesh's less the
|
||||
missing faces' share of the sphere about the point, so a cube with a face open reads inside up to the hole's plane
|
||||
(0.5009 at 0.001 under the centre of a unit face) and the sign turns on that plane with no face there. The gate's
|
||||
proof between samples assumes a distance changes by no more than the way between two points, which holds across a
|
||||
face and not across a hole: a part with a hole the axis may reach is closed before it is given. The depth is to the
|
||||
nearest face of any of the part's meshes, one buried inside another included, so inside two overlapping solids a
|
||||
point may read shallower than its depth below their union.
|
||||
|
||||
| drive | reading |
|
||||
| --- | --- |
|
||||
|
|
@ -1055,8 +1058,10 @@ Cost on Starfire, Python 3.13, 100 repetitions paired and interleaved: one candi
|
|||
49 steps took 0.79 ms median on the bell crank; its clearance against the analytic parts (50 pairs) took 42 ms
|
||||
(5th to 95th percentile 38 to 57) over 97,875 points, of which 23,520 are the samples and the rest the halving in
|
||||
zones (the own plates, stated with no slack, to the floor); the samples alone took 11 ms. A search without a world ran 1.6 to 1.8 ms a candidate over 3,456, so `limit`
|
||||
(20,000) is 30 to 40 s. On the meshes the bell crank's 60 pairs at 49 steps took 1.95 to 2.12 s capped (two runs), in a
|
||||
Python loop of BVH queries with three rays a sample, and the 13,824-candidate search with its 22 worlds 43 s (one run).
|
||||
(20,000) is 30 to 40 s. On the meshes the bell crank's 60 pairs at 49 steps took 0.80 to 1.00 s capped (two runs), the
|
||||
winding number as the plain sum over a part's 124 to 408 triangles in numpy (single precision over double offsets,
|
||||
blocks of 32,768 pairs) and the depth a Python loop of BVH queries, and the 13,824-candidate search with its 22
|
||||
worlds 34.5 and 38.5 s (two runs). With the angles in double precision the search took 47.7 to 47.9 s (three runs).
|
||||
|
||||
## The actions
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue