ensureClosed MethodStatic

Return a closed polygon, cloning only if necessary.

  • If the first and last points are not identical, call forceClosure on a clone of the polygon and return it.
  • If the first and last points are already identical, just return the input.

ensureClosed(polygon: IndexedXYZCollection | Point3d[], tolerance: numberGeometry.smallMetricDistance): IndexedXYZCollection | Point3d[]

Parameter Type Description
polygon IndexedXYZCollection | Point3d[] input polygon
tolerance number closure distance tolerance

Returns - IndexedXYZCollection | Point3d[]

Defined in

Last Updated: 14 November, 2024