sortExteriorInteriorRings

pyslm.support.sortExteriorInteriorRings(polyNode, closePolygon=False)

A recursive function that sorts interior and exterior rings or paths from PyClipper (pylcipper.PyPolyNode)` objects.

Parameters:
  • polyNode – The pyclipper.PyPolyNode tree defining the polygons and interior holes

  • closePolygon (Optional[bool]) – If True, the contours passed are closed

Return type:

Tuple[List[ndarray], List[ndarray]]

Returns:

A tuple consisting of exterior and interior rings