Skip to main content

preDedupSegments

Callable


  • Remove duplicate segments by quantized endpoint position + productIndex.


    Parameters

    • segments: TaggedSegment[]
    • optionalstats: { geometryOnlyCount: number }

      Optional diagnostics: geometryOnlyCount receives the count a PRODUCT-BLIND dedup would have kept. The difference against the returned length is the number of cross-product coincident duplicates — segments classified once per product because the dedup key deliberately includes the product (self-occlusion and per-product classify:false exemptions are product-sensitive). The fraction decides whether a geometry-only dedup with per-product fan-out is worth building; it has never been measured on a real model, which is why this hook exists.

      • geometryOnlyCount: number

    Returns TaggedSegment[]