polygonClip Method
Clip a polygon to the planes of the clip sets, returning new polygon boundaries.
- The output polygons may lie next to each other, or be disconnected.
- For a convex input polygon, the output polygon(s) are also convex.
- For non-convex input, the output polygon(s) may have double-back edges along plane intersections. This is still a valid clip in a parity sense (overlapping regions cancel).
- This method differs from appendPolygonClip by clipping the same input polygon with each ConvexClipPlaneSet in the instance, and returning only the inside pieces.
polygonClip(input: Point3d[] | GrowableXYZArray, output: GrowableXYZArray[], work?: GrowableXYZArray, planeToSkip?: ClipPlane, tolerance: numberGeometry.smallMetricDistance): void
@see appendPolygonClip
Parameter | Type | Description |
---|---|---|
input | Point3d[] | GrowableXYZArray | polygon, usually convex. Unchanged. |
output | GrowableXYZArray[] | output polygon |
work | GrowableXYZArray | optional work array. |
planeToSkip | ClipPlane | if this plane is found in the convex set, it is NOT applied. This is useful when caller knows the polygon lies in one of the instance planes. |
tolerance | number | distance tolerance for "on plane" decision. Default value is smallMetricDistance. |
Returns - void
Defined in
Last Updated: 07 October, 2025
Found something wrong, missing, or unclear on this page? Raise an issue in our repo.