Commonplace kernel API
    Preparing search index...

    Function extrudeFaceSubRegionBump

    • Experimental

      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 on hostFace has 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 with carveSubRegionThroughHost.

      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) via host.projectPointToRuledUV (the inverse ruled parameterization, which already resolves the G2 monogon self-loop ambiguity), asks RuledSurface.normalAt(host, hostFace, u, v) for the per-vertex outward surface normal there, and then repositions each translated (top) vertex to basePosition + distance · n̂_vertex. The side strips are ruled surfaces between the original inner loop and the per-vertex offset loop (the topology extrudeFace already 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 LineCurve chords (ADR-026 §1 chord-line accuracy), so extrudeFace'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.

      Parameters

      • host: HalfEdgeMesh

        The host mesh.

      • hostFace: Face

        The face carrying the inner loop. Must have at least one inner loop.

      • innerLoopHalfEdge: HalfEdge

        A half-edge on the inner loop that outlines the inscribed sub-region. Its .face must equal hostFace (sanity check).

      • distance: number

        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.

      Returns { translatedFace: Face }

      { translatedFace } — the inscribed face after its vertices have been translated by distance. Callers wanting the new outer-loop vertices can query mesh.getFaceVertices(translatedFace).

      If preconditions fail.

      2026-Q2

      experimental — stable-by target: 2027-Q1