Experimental
The host mesh.
The face carrying the inner loop. Must have at least one inner loop.
A half-edge on the inner loop that
outlines the inscribed sub-region. Its .face must equal
hostFace (sanity check).
Signed translation distance. Positive bumps the inscribed face outward (along the host's outward surface normal for a curved host, or the inscribed face's Newell normal for a planar host); negative bumps inward.
{ translatedFace } — the inscribed face after its
vertices have been translated by distance. Callers wanting
the new outer-loop vertices can query
mesh.getFaceVertices(translatedFace).
G3 — kernel-native sub-thickness bump of an inscribed sub-region on a host face.
Companion to
carveSubRegionThroughHost(the Boolean-substrate through-cut). When the user wants to offset an inscribed window by a distance LESS than the host's wall thickness, the result shouldn't punch through — it should produce a step / bump / recess. That's a kernel-native operation: translate the inscribed face's vertices, build side strips between the original and translated positions, leave everything else alone.The inscribed face is identified via
innerLoopHalfEdge.twin.face— every inner loop onhostFacehas a corresponding inscribed face on the other side of the inner-loop boundary (it's that inscribed face's outer loop). The user's gesture conceptually targets the inscribed face; the kernel API takes the inner-loop half-edge for symmetry withcarveSubRegionThroughHost.Implementation — planar vs. curved dispatch (ADR-026 Phase 2 a/a-curved)
Both paths delegate to
mesh.extrudeFace(inscribedFace, distance)to build the TOPOLOGY (pillar vertices, side-strip authoring, top/bottom cap relinking). They differ only in the final vertex GEOMETRY:Planar host (faceted-prism wall —
isEffectivelyPlanar(host, hostFace)).extrudeFace's single Newell-method normal IS the host's local normal at every inner-loop vertex (a planar inscribed loop has a constant normal), so the delegated result is already geometrically exact. The fast-path returns it untouched — this is the original G3 behavior, preserved verbatim and un-regressed.Genuinely-curved host (ruled surface with non-line rails — e.g. a monogon-cylinder side face). The true surface normal varies per vertex along the inner loop, so a single Newell normal produces a flat-wedge sweep instead of a curvature-following one. This path (a-curved) computes each inscribed-loop vertex's host
(u, v)viahost.projectPointToRuledUV(the inverse ruled parameterization, which already resolves the G2 monogon self-loop ambiguity), asksRuledSurface.normalAt(host, hostFace, u, v)for the per-vertex outward surface normal there, and then repositions each translated (top) vertex tobasePosition + distance · n̂_vertex. The side strips are ruled surfaces between the original inner loop and the per-vertex offset loop (the topologyextrudeFacealready built; only the endpoint positions move). The result follows the host's curvature: bumping a small inscribed rectangle outward on a small-radius cylinder lands the offset boundary on the expected larger-radius cylinder, not on a flat plane.Why post-reposition rather than a bespoke extrude. For a window-sized inscription the inner-loop edges are
LineCurvechords (ADR-026 §1 chord-line accuracy), soextrudeFace's top loop carries no arc / Bezier curves to re-derive — the side faces' ruled descriptors derive their geometry purely from the (now per-vertex repositioned) endpoint vertices, so moving the top vertices is sufficient and keeps the mesh watertight + valid. The per-vertex(u, v)is read from the HOST's rails, which the bump never mutates, so the projection is captured before the delegated extrude migrates the inscribed face.