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:
Loop
if there is exactly one input loop. It is oriented counterclockwise.ParityRegion
if 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.UnionRegion
if 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:
Loop
if there is exactly one input loop. It is oriented counterclockwise.ParityRegion
if 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.UnionRegion
if any other input configuration. Its children are individually ordered/oriented as in the above cases.
Defined in
- curve/RegionOps.ts Line 649
Last Updated: 21 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.