IFClite TypeScript API
    Preparing search index...

    Class ClashIntersectionSolidJs

    The overlap solid of one clashing pair, or the reason there is none.

    Index
    degenerateReason: string

    "" when isSolid, otherwise one of:

    • "malformed-operand" — any of FOUR malformations, all rejected before the boolean runs, because computing on them would silently drop the offending triangle (or worse) rather than report the true operand:
      1. positionsA/positionsB is not a flat [x, y, z, …] triple (length not a multiple of 3);
      2. indicesA/indicesB has a length that is not a multiple of 3, so it does not describe whole triangles;
      3. indicesA/indicesB references a vertex past the end of its own operand's positions;
      4. a position is non-finite (NaN or infinity). This one is worth calling out to callers: a NaN coordinate is caught by neither length check, and left alone it can be absorbed into a normal-looking answer or corrupt a face enough to report a genuinely overlapping pair as "no-overlap". So if you are debugging an unexpected "no-overlap", check your inputs for NaN — it surfaces here, not there.
    • "empty-operand" — an operand had no triangles.
    • "no-overlap" — the exact intersection is empty. Covers a disjoint pair AND a touching pair, including any graze below the kernel's 2^-16 m ≈ 15.26 µm snap grid (both faces snap flush).
    • "below-kernel-resolution" — the pair overlaps, but too shallowly for the kernel to resolve as a solid rather than a coplanar contact. See thicknessM / requiredM.
    • "budget-exhausted" — the escalation budget tripped; the arrangement is partial and nothing about it is trustworthy.
    indices: Uint32Array

    Triangle indices into positions / 3.

    isSolid: boolean

    True when a trustworthy overlap solid was produced. When false, every geometry getter is empty and degenerateReason says why.

    positions: Float64Array

    World-space vertex positions, flat [x, y, z, …], f64.

    f64 rather than the f32 the rest of the mesh pipeline uses because the caller reports this solid's volume: the f32 round-trip costs ~1e-7 relative, a thousand times the exactness the kernel actually delivers. Downcast to f32 at the GPU upload if the renderer wants it.

    requiredM: number

    For "below-kernel-resolution": the depth this pair would have needed for the kernel to resolve a solid, in metres. 0 otherwise. Grows with distance from the world origin, as the kernel's own tolerance does.

    thicknessM: number

    For "below-kernel-resolution": the overlap's measured thinnest extent, in metres. 0 otherwise. Useful to tell the user how shallow the clash is even though no solid can be drawn.

    triangleCount: number

    Triangle count of the solid; 0 when degenerate.

    volumeM3: number

    Enclosed volume in m³. 0 when not a solid — check isSolid first; "no measurable overlap" and "an overlap of zero" are different claims.

    • Returns void

    • Returns void