sortOuterAndHoleLoopsXY MethodStatic
Reverse and reorder loops in the xy-plane for consistency and containment.
sortOuterAndHoleLoopsXY(loops: IndexedXYZCollection | Loop[]): AnyRegion
@returns a region that captures the input pointers. This region is a:
- Loopif there is exactly one input loop. It is oriented counterclockwise.
- ParityRegionif input consists of exactly one outer loop with at least one hole loop. Its first child is an outer loop oriented counterclockwise; all subsequent children are holes oriented clockwise.
- UnionRegionif any other input configuration. Its children are individually ordered/oriented as in the above cases.
| Parameter | Type | Description | 
|---|---|---|
| loops | IndexedXYZCollection | Loop[] | multiple loops in any order and orientation, z-coordinates ignored | 
Returns - AnyRegion
a region that captures the input pointers. This region is a:
- Loopif there is exactly one input loop. It is oriented counterclockwise.
- ParityRegionif input consists of exactly one outer loop with at least one hole loop. Its first child is an outer loop oriented counterclockwise; all subsequent children are holes oriented clockwise.
- UnionRegionif any other input configuration. Its children are individually ordered/oriented as in the above cases.
Defined in
- curve/RegionOps.ts Line 649
Last Updated: 24 June, 2025
Found something wrong, missing, or unclear on this page? Raise an issue in our repo.