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

Last Updated: 23 November, 2024