@equinor/videx-3d
    Preparing search index...

    Function snapBoundaryToOutline

    • Snap the boundary (rim) vertices of an indexed mesh onto the nearest point of a set of reference polylines (closed world-X/Z outlines). Used to pull a mesh rim exactly onto a shared outline, so two meshes that meet at an edge (e.g. a surface and the floor it bounds) share one rim curve instead of two independently triangulated (and diverging) ones.

      When getY is provided, each snapped rim vertex's Y is also set to getY(x, z) at its new position, so the rim can be pinned to a shared height as well as X/Z. When omitted, only X/Z are moved and Y is left as-is.

      Parameters

      • geometry: BufferGeometry
      • polylines: Vec2[][]
      • OptionalgetY: (x: number, z: number) => number

      Returns void