Commonplace kernel API
    Preparing search index...

    Type Alias SurfaceDefExperimental

    SurfaceDef:
        | {
            kind: "plane";
            normal: Point3;
            origin: Point3;
            uAxis: Point3;
            vAxis: Point3;
        }
        | { axis: Point3; kind: "cylinder"; origin: Point3; radius: number }
        | { apex: Point3; axis: Point3; halfAngle: number; kind: "cone" }
        | { center: Point3; kind: "sphere"; radius: number }
        | {
            axis: Point3;
            center: Point3;
            kind: "torus";
            majorRadius: number;
            minorRadius: number;
        }
        | { kind: "ruled"; railA: CurveDef; railB: CurveDef }
        | {
            controls: Point3[];
            countU: number;
            countV: number;
            degreeU: number;
            degreeV: number;
            kind: "nurbs";
            knotsU: number[];
            knotsV: number[];
            weights: number[];
        }
        | { kind: "other"; surface: string }

    A face's surface, as plain values: what the face lies on, untrimmed.

    • plane: through origin with unit normal on the face's front side. uAxis, vAxis are the frame facePointAt reads a face stored as a plane in (origin + u·uAxis + v·vAxis, faceDomain's space: 'plane'). A flat face stored on rails (space: 'uv': a ruled face or a trimmed region whose rails lie in one plane) keeps its rails' (u, v); its points lie on this plane.
    • cylinder: the right circular cylinder of radius about the line through origin along unit axis.
    • cone: the right circular cone with its apex at apex, opening along unit axis with half-angle halfAngle (radians).
    • sphere, torus: a piece of one; a torus turns about unit axis through center, its tube's center circle of majorRadius, the tube of minorRadius.
    • ruled: S(u, v) = (1 − v)·A(u) + v·B(u) over [0, 1]², the rails A (railA) and B (railB) on their own parameter, a ruling the segment from A(u) to B(u). The face's (u, v) (faceDomain, facePointAt) is this one.
    • nurbs: a NURBS surface, its countU × countV control net row-major (controls[i * countV + j], i along u), with weights and clamped knot vectors. The face's (u, v) is the knots' parameter.
    • other: a surface the kernel evaluates exactly but has no definition here to hand out (a tangent developable, a wall's offset that is no rail pair, a ruled surface on rails that are curves on other surfaces). Read it with facePointAt and faceNormalAt. surface is the face's surface kind.

    A face that is a plane, cylinder, cone, sphere or torus is reported as one whatever the kernel stores it as (a cylinder wall is stored as two circular rails), recognized to rounding, never approximated.

    2026-Q4

    experimental — stable-by target: 2027-Q2