luft/mesh-variation-plan.lisp
Discover and prove the complete local contraction plan for one cohort.
Only a three-distinct-point collinear collapse can create the long-edge / two-short-edge mismatch. Count that exact local edge neighborhood, not every edge in the otherwise closed witness.
Match the reference reduction's later-edge tie preference, though a collinear interior point gives the long edge a strict maximum.
A guard-owned collapse can require a repair child in an output mesh. Mark candidates whose surviving long edge occurs on an output-owned source triangle as well as candidates created by output collapses.
Prove that the selected contractions account for the entire mismatch before changing any triangles. A new failure mode must become explicit rather than rendering another hairline crack.
(field owner-witnesses output-witnesses output-set realize-set
live-triangle-counts-by-owner packing contract-t-junctions-p)((site-width) field &body body)Execute BODY with an inline SITE-WIDTH lookup over FIELD. The representation is unpacked once around an entire planning or emission stage, keeping the scalar triangle loop independent of the policy compiler without paying structure-access or generic-call costs per vertex.
(packing lx ly lz rx ry rz)Return one bounded-box key and the directed local endpoints of an edge. PACKING supplies only the anchor's horizontal frame. The low 24 key bits are the two undirected 12-bit endpoint coordinates inside their shared eighth-cell anchor. This codec is shared by open-sheet boundary assembly and by local variable-bevel…
(point)(point)(point)Test whether two compatible scalars are equal.
((tax tay taz tbx tby tbz tcx tcy tcz)
site-width ax ay az bx by bz cx cy cz
&body body)(ax ay az bx by bz cx cy cz)Logical conjunction of tests and raw truth values.
Logical disjunction of tests and raw truth values.
(left right)Test whether one compatible scalar is greater than another.
((mesh kind stock ambient mask
ax ay az bx by bz cx cy cz)
&body body)Iterate MESH's packed triangles with scalar coordinates and no callback. This is the dense-loop counterpart to %MAP-SURFACE-MESH-TRIANGLE-RECORDS. The latter deliberately materializes convenient point and normal lists for cold transformations and inspection; performance-sensitive compilers should keep the packed…
The maximum of compatible quantities.
Multiplication and scalar scaling.
(packing key)Test whether one compatible scalar is less than another.
(packing spatial-edges)Return the bounded preimage of SPATIAL-EDGES under variable bevel motion. A width-one endpoint moves by at most three ticks per axis. Componentwise edge minima therefore move by at most three ticks, so each transformed edge has at most two possible source anchors per axis and eight in total. The filter may admit…
(filter ax ay az bx by bz cx cy cz)Logical negation of one test or raw truth value.
A transition plan is the small, owner-independent result of inspecting the complete witness closure. Emission consumes it without rediscovering collapse neighborhoods or weakening the canonical owner boundary.