sortOuterAndHoleLoopsXY MethodStatic

Reverse and reorder loops in the xy-plane for consistency and containment.

sortOuterAndHoleLoopsXY(loops: IndexedReadWriteXYZCollection[]): IndexedReadWriteXYZCollection[][]

@returns array of arrays of polygons that capture the input pointers. In each first level array:

  • The first polygon is an outer loop, oriented counterclockwise.
  • Any subsequent polygons are holes of the outer loop, oriented clockwise.

@see sortOuterAndHoleLoopsXY

Parameter Type Description
loops IndexedReadWriteXYZCollection[] multiple polygons in any order and orientation, z-coordinates ignored

Returns - IndexedReadWriteXYZCollection[][]

array of arrays of polygons that capture the input pointers. In each first level array:

  • The first polygon is an outer loop, oriented counterclockwise.
  • Any subsequent polygons are holes of the outer loop, oriented clockwise.

Defined in

Last Updated: 21 November, 2024