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
- geometry3d/PolygonOps.ts Line 1306
Last Updated: 21 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.