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 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 1085
Last Updated: 30 October, 2025
Found something wrong, missing, or unclear on this page? Raise an issue in our repo.