Commonplace kernel API
    Preparing search index...

    Interface HalfEdge

    A directed half of an undirected edge. Twinned half-edges form the full edge; next chains form face/boundary loops.

    2025-Q4

    stable

    interface HalfEdge {
        attachedToEdgeId?: string;
        crease?: CreaseMark;
        curve: EdgeCurve;
        curvedFold?: CurvedFoldRecord;
        curveForward?: boolean;
        face: Face | null;
        foldSteps?: number[];
        hidden?: true;
        id: string;
        isSoft?: boolean;
        lineage?: EntityLineage;
        next: HalfEdge | null;
        paramTrim?: ParametricTrimCurve;
        prev: HalfEdge | null;
        radialNext: HalfEdge | null;
        rotationNext: HalfEdge | null;
        tags?: TagSet;
        tol?: number;
        twin: HalfEdge | null;
        vertex: Vertex;
    }
    Index
    attachedToEdgeId?: string

    A sheet's edge drawn along an edge of a solid (decision 2026-10-14, ADR-034 amendment; SheetOnSharedEdge.ts): the id of the solid's half-edge running the same way along that edge when the sheet closed. Saved omit-when-absent, carried by undo/redo, re-pointed by a copy that copies that edge too and dropped otherwise. Nothing reads it yet: it is the record ADR-110's load migration uses to join exactly those sheets whose recorded edge still coincides with their own. It may name a half-edge that no longer exists.

    crease?: CreaseMark

    ADR-123 D2 — a crease's mountain / valley mark (CreaseMark.ts): intent, never geometry; the viewport draws it. Origami O1c: foldSteps is its angle after each fold step (parseFoldSteps). Both on both halves, saved omit-when-absent; an edit that retires the edge drops them.

    curve: EdgeCurve
    curvedFold?: CurvedFoldRecord

    ADR-123 D10 (C4b) — on each piece of a folded curved crease, the sheet's exact flat state (CurvedFoldRecord.ts), which Fold Curved Crease's fold back to flat reads. Both halves, saved omit-when-absent; an edit that retires the edge drops it.

    curveForward?: boolean

    Curve-sense: a self-loop's stored walking sense (SelfLoopSense.ts); saved omit-when-absent (C4).

    face: Face | null
    foldSteps?: number[]
    hidden?: true

    Hide and Show (ADR-128 D3, per entity): set by Hide selection, cleared by Show all. Both halves carry it. Only ever a literal true, saved omit-when-absent. Hidden means not drawn, picked, snapped to or reached by bulk verbs; the kernel never reads it, so a hidden edge still bounds its faces. Read through KernelVisibility.ts, which also hides an edge whose every face is hidden.

    id: string
    isSoft?: boolean
    lineage?: EntityLineage

    Authoring provenance. Stamped by the modeling tools' commit path: the authoring camera (a drawing-plane Camera id, or 'world'), the authoring operation id, and — when the edge was traced along construction / projected geometry — the tracedFrom source ids. Both halves of a twinned pair carry the same record. Absent on untraced / pre-Phase-5 edges (absence ≡ no recorded provenance). Serialized omit-when-absent by HalfEdgeMeshIO, so SnapshotCommand undo/redo and save/load carry it for free. Data substrate only (ADR-010): the kernel never reads it.

    next: HalfEdge | null
    paramTrim?: ParametricTrimCurve

    ADR-006 addendum (built 2026-10-18, "Sew and trim" part 2) — this half-edge's run along its face's surface, in that surface's own (u, v): the curve its 3D curve is the image of, within paramTrim.tolerance. Only on a half-edge of a trimmed-patch face (a .3dm import's trimmed NURBS face); the twin carries its own. The 3D curve stays the authority: a consumer reads the trim only while its ends map onto this half-edge's vertices, and an edit that changes the curve drops it (splitEdge cuts it in two). Saved omit-when-absent; validator rule 27(e). See ParametricTrim.ts.

    prev: HalfEdge | null
    radialNext: HalfEdge | null

    ADR-110 — the radial ring: the faces around this half-edge's edge.

    An edge is one or more USES; a use is a twin pair (h, h.twin), each half with a face or a free side. Where three or more faces meet on an edge, it has more than one use, and radialNext links the face-bearing half-edges of every use in the order their faces are met turning about the edge (ADR-110 D1/D2).

    null means the edge has ONE use, which is every edge until ADR-110 phase 4: the ring is then implicit (twin when both halves have a face, h alone when only h has one, no ring on a free half). Read it through RadialRing.radialNextOf, which supplies that default. A free half-edge (face === null) is in no ring and stores null even on an edge with more than one use. Saved only where non-null (ADR-110 D9); validator rule 29 checks a stored ring.

    rotationNext: HalfEdge | null

    ADR-109 — the vertex ring, stored apart from the face loops.

    The next OUTGOING half-edge from this half-edge's origin vertex (twin.vertex), in ring order. The order is the one the threaded loops give today: h.rotationNext === h.twin.next, so walking h, h.rotationNext, h.rotationNext.rotationNext, … visits a vertex's outgoing half-edges in the same sequence as the classic h → h.twin.next walk (clockwise in the ADR-053 sector sort's counter-clockwise final order: each step goes to the PREVIOUS entry of that order).

    Since phase 4 a wire (no face on either side: a slit or bridge inside a face, a line through a solid, a free wire) is in the ring and in no .next chain, so the ring and the threading differ by exactly those wires; validator rule 25 checks the rest agree. null when the ring has no successor.

    tags?: TagSet

    ADR-128 D2 — the tags this edge carries (TagSet.ts): interned, absent when untagged, the same set on both halves. Saved omit-when-absent; no kernel operation reads it to decide geometry.

    tol?: number

    ADR-126 D2: the edge's tolerance, on both halves; absent means exact. See EntityTolerance.ts.

    twin: HalfEdge | null
    vertex: Vertex