segments method

SegmentList segments(
  1. RegionPolygon poly
)

Implementation

SegmentList segments(RegionPolygon poly) {
  var i = new Intersecter(true);

  for (var region in poly.regions) {
    i.addRegion(region);
  }

  var result = i.calculate(inverted: poly.inverted);
  result.inverted = poly.inverted;

  return result;
}