constructAllXYRegionLoops MethodStatic
Find all xy-areas bounded by the unstructured, possibly intersecting curves.
- For best results, input curves should be parallel to the xy-plane, as z-coordinates are ignored.
- A common use case of this method is to assemble the bounding "exterior" loop (or loops) containing the input curves.
- This method does not add bridge edges to connect outer loops to inner loops. Each disconnected loop, regardless of its containment, is returned as its own SignedLoops object. Pre-process with regionBooleanXY to add bridge edges so that constructAllXYRegionLoops will return outer and inner loops in the same SignedLoops object.
constructAllXYRegionLoops(curvesAndRegions: AnyCurve | AnyCurve[], tolerance: numberGeometry.smallMetricDistance): SignedLoops[]
@returns array of SignedLoops, each entry of which describes the faces in a single connected component:
positiveAreaLoops
contains "interior" loops, including holes in ParityRegion input. These loops have positive area and counterclockwise orientation.negativeAreaLoops
contains (probably just one) "exterior" loop which is ordered clockwise.slivers
contains sliver loops that have zero area, such as appear between coincident curves.edges
contains a LoopCurveLoopCurve object for each component edge, collecting both loops adjacent to the edge and a constituent curve in each.
Parameter | Type | Description |
---|---|---|
curvesAndRegions | AnyCurve | AnyCurve[] | Any collection of curves. Each Loop/ParityRegion/UnionRegion contributes its curve primitives. |
tolerance | number | optional distance tolerance for coincidence |
Returns - SignedLoops[]
array of SignedLoops, each entry of which describes the faces in a single connected component:
positiveAreaLoops
contains "interior" loops, including holes in ParityRegion input. These loops have positive area and counterclockwise orientation.negativeAreaLoops
contains (probably just one) "exterior" loop which is ordered clockwise.slivers
contains sliver loops that have zero area, such as appear between coincident curves.edges
contains a LoopCurveLoopCurve object for each component edge, collecting both loops adjacent to the edge and a constituent curve in each.
Defined in
- curve/RegionOps.ts Line 681
Last Updated: 14 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.