ADR-026 Phase 2(b) — measure the available INWARD wall depth at an
inscribed sub-region: how far the sub-region's bump can sweep before it
would cross the opposite wall of the host solid.
Measurement
The inscribed face is innerLoopHalfEdge.twin.face (the same
derivation extrudeFaceSubRegionBump uses). Its outer-loop
vertices are the window corners; their centroid is the ray origin.
The outward surface normal at that centroid is derived from the
host's geometry:
Curved host (!isEffectivelyPlanar(host, hostFace)): the
per-vertex–averaged RuledSurface.normalAt(host, hostFace, u, v)
over the inscribed corners' host (u, v) projections — a
representative outward normal of the curved patch under the
window. (The bump itself follows the true per-vertex field;
for the scalar depth a single representative direction is the
right granularity — wall depth is one number.)
Planar / faceted host: the inscribed outer loop's Newell
normal, which points outward for the CCW-from-outside winding
ADR-006 gives inscribed loops. This is exact for a faceted wall
(the inscribed face is coplanar with the host quad).
The inward direction is the negated outward normal. A ray is
cast from the centroid (nudged a hair inward to clear the origin
face) along the inward normal and tested against every host face
except the inscribed face and the host wall face the loop sits on
(those are co-located with the origin and would self-hit). The
nearest hit distance is the wall depth.
Assumptions & ambiguity handling
Nearest opposite hit wins. A non-convex host whose inward ray
pierces several faces is handled by taking the first (nearest)
hit — the wall whose crossing first turns the bump into a
through-cut. This is the conservative, correct choice for the
dispatch decision (cross the nearest wall ⇒ through-cut).
No opposite face ⇒ +Infinity. An open sheet (the inward ray
escapes the solid), or a measurement-frame degeneracy, yields no
hit. The dispatcher reads +Infinity as "an inward bump can never
cross a wall here" and routes to the bump. This is safe: a bump that
doesn't cross a wall is exactly what the kernel-native sweep handles.
(Note: the depth is always measured along the INWARD normal — it is
a geometric fact independent of the gesture's sign. The outward case
is handled by the dispatcher's direction check, not by the depth.)
Representative-normal granularity. The depth is one scalar along
one representative inward direction. For strongly-curved hosts where
the wall depth varies across the window, this is the depth at the
window's centroid — the dispatch point. A window that grazes a wall
at one corner but not its centroid is out of scope (it would need a
per-corner depth field); the single-scalar dispatch matches the
single-scalar distance the operation takes.
ADR-026 Phase 2(b) — measure the available INWARD wall depth at an inscribed sub-region: how far the sub-region's bump can sweep before it would cross the opposite wall of the host solid.
Measurement
innerLoopHalfEdge.twin.face(the same derivation extrudeFaceSubRegionBump uses). Its outer-loop vertices are the window corners; their centroid is the ray origin.!isEffectivelyPlanar(host, hostFace)): the per-vertex–averagedRuledSurface.normalAt(host, hostFace, u, v)over the inscribed corners' host(u, v)projections — a representative outward normal of the curved patch under the window. (The bump itself follows the true per-vertex field; for the scalar depth a single representative direction is the right granularity — wall depth is one number.)Assumptions & ambiguity handling
+Infinity. An open sheet (the inward ray escapes the solid), or a measurement-frame degeneracy, yields no hit. The dispatcher reads+Infinityas "an inward bump can never cross a wall here" and routes to the bump. This is safe: a bump that doesn't cross a wall is exactly what the kernel-native sweep handles. (Note: the depth is always measured along the INWARD normal — it is a geometric fact independent of the gesture's sign. The outward case is handled by the dispatcher's direction check, not by the depth.)distancethe operation takes.