Experimental
The host mesh. Mutated in place on success (bump: side strips + translated face; through-cut: replaced topology).
The face carrying the inner loop that outlines the inscribed sub-region.
A half-edge on the host's inner loop;
.face must equal hostFace. Its twin bounds the inscribed
face (the offset target).
Signed offset distance (see sign convention).
A discriminated result reporting which path ran:
{ path: 'bump', translatedFace } or
{ path: 'through-cut', carved } (carved is false only
when the composer's WASM bridge wasn't ready — the host is
left untouched and the caller may retry). The measured
wallDepth is included for callers that want to surface it.
ADR-026 Phase 2(b) — the one unified sub-region offset operation. Automatically dispatches an offset of an inscribed sub-region to either the kernel-native sub-thickness bump (extrudeFaceSubRegionBump) or the composer-substrate through-cut (carveSubRegionThroughHost), by measuring how far the sub-region can sweep inward before it crosses the host's opposite wall.
This collapses the two Phase 2 entry points into the single user-facing operation ADR-026 §Status sub-phase (b) describes: "automatic distance-vs-thickness dispatch — picking bump vs through-cut based on inscribed-radius wall depth."
Dispatch rule
Let
wallDepth = measureSubRegionWallDepth(...).depth(the inward distance to the first opposite face;+Infinitywhen none).distance >= 0) → always bump. An outward sweep moves into open air; there is no opposite wall in the outward direction to cross, so the kernel-native curvature-following sweep is always correct. The measuredwallDepth(the geometry's inward depth) is not consulted for outward gestures — the dispatch is direction-aware, so a deep outward push past the far wall's distance still bumps.distance < 0):|distance| < wallDepth · (1 − {@link WALL_DEPTH_REL_TOL})→ bump (a recess that does not reach the far wall — exact, curvature-following).|distance| >= wallDepth · (1 − {@link WALL_DEPTH_REL_TOL})→ through-cut (the window punches through; the back wall gains an inner loop per ADR-006, so the host's hole countHincrements).The boundary
|distance| == wallDepthresolves to the through-cut (see WALL_DEPTH_REL_TOL) — the safe side, since a bump exactly to the far wall would leave a degenerate zero-thickness sliver.Sign convention
Matches extrudeFaceSubRegionBump and ADR-014:
distance > 0bumps the inscribed face outward (along the host outward normal);distance < 0pushes it inward. The through-cut is reached only by an inward gesture; itscarveSubRegionThroughHostdepthis derived from-|distance|over the inscribed face's outer-loop corners (CCW from outside), which extends the carve prism inward.Through-cut substrate note
The window is healed out of its wall first (healInscribedFace) and the cutter's two caps are placed in open air (
OffsetPlan.cutterSpanInAir): it starts a margin above the window and, when the push ends on the far wall, runs a margin past it. A cap lying in a host face's plane, or a cutter wall running along the window's own edges, is where the composer left a zero-thickness floor (exact depth, axis-aligned) or a zero-volume second shell (any frame that is not axis-aligned). A window the heal declines (it carries a hole, or other geometry is attached to its corners) is carved with its loop in place and the flush start, as before. Verified: the result is a single closed shell of genus 1 (one tunnel) —V − E + F − H = 0,validateMeshclean.