convexDecomposePolygonXY MethodStatic
Decompose a polygon with optional holes into an array of convex polygons.
convexDecomposePolygonXY(polygon: MultiLineStringDataVariant, maximize: boolean = true): undefined | GrowableXYZArray[]
@returns array of convex polygons, or undefined if triangulation failed
Parameter | Type | Description |
---|---|---|
polygon | MultiLineStringDataVariant | polygon and hole loops, e.g., as returned by CurveCollection.cloneStroked on a Loop or ParityRegion. All z-coordinates are ignored. |
maximize | boolean | whether to return maximally convex polygons. If false, triangles are returned. |
Returns - undefined | GrowableXYZArray[]
array of convex polygons, or undefined if triangulation failed
Defined in
- curve/RegionOps.ts Line 874
Last Updated: 16 April, 2024
Found something wrong, missing, or unclear on this page?
Raise an issue in our repo.