IFClite TypeScript API
    Preparing search index...

    Interface CutSegment

    Raw cut segment before classification

    interface CutSegment {
        color?: [number, number, number, number];
        entityId: number;
        ifcType: string;
        localMaxCoord?: number;
        modelIndex: number;
        p0: Vec3;
        p0_2d: Point2D;
        p1: Vec3;
        p1_2d: Point2D;
    }
    Index
    color?: [number, number, number, number]

    Source sub-mesh RGBA colour (0–1) — the cut triangle's MeshData.color. Carried so the polygon builder can split one entity's cut into per-material loops (material-layer walls/slabs). Absent when the cutter has no colour.

    entityId: number

    Source entity ID

    ifcType: string

    IFC type

    localMaxCoord?: number

    Max |coordinate| of the source triangle's LOCAL vertex positions — i.e. the Float32Array values BEFORE the per-mesh RTC origin was added. This is the quantity that actually bounds float32 rounding noise (quantization happens when the mesh is authored in its local frame, not when a double-precision origin is added afterward), so it must be used instead of p0_2d/p1_2d's world-frame magnitude when sizing a scale-aware weld tolerance — otherwise a small element sitting at a large RTC origin gets a tolerance scaled to its distance from the model origin instead of its own extent (#2622). Absent when the segment wasn't produced by SectionCutter (e.g. hand-built test fixtures), in which case callers fall back to the segment's own 2D coordinate magnitude.

    modelIndex: number

    Model index

    p0: Vec3

    3D start point of cut

    p0_2d: Point2D

    2D projected start point

    p1: Vec3

    3D end point of cut

    p1_2d: Point2D

    2D projected end point