convexDecomposePolygonXY MethodStatic
Decompose a polygon with optional holes into an array of convex polygons.
convexDecomposePolygonXY(polygon: MultiLineStringDataVariant, maximize: booleantrue): 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 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 875
Last Updated: 23 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.