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.

@see sortOuterAndHoleLoopsXY

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

Last Updated: 17 December, 2024