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: number = Geometry.smallMetricDistance): IndexedXYZCollection | Point3d[]
| Parameter | Type | Description |
|---|---|---|
| polygon | IndexedXYZCollection | Point3d[] | input polygon |
| tolerance | number | closure distance tolerance |
Returns - IndexedXYZCollection | Point3d[]
Defined in
- geometry3d/PolygonOps.ts Line 1485
Last Updated: 29 October, 2025
Found something wrong, missing, or unclear on this page? Raise an issue in our repo.