Cut polygon with multiLine
What's Changed
- Cut polygon with multiline by @alexbol99 in #163
Cut polygon with multiline using methodpolygon.cut()
:
const { point, segment, Polygon, Multiline } = Flatten;
const poly = new Polygon([
point(20, 20),
point(60, 20),
point(60, 60),
point(20, 60)
]);
const segments = [
segment(20, 20, 40, 40),
segment(40, 40, 50, 40),
segment(50, 40, 60, 60)
];
const m = new Multiline(segments);
const newPoly = poly.cut(m);
See notebook cut-polygon-with-multiline-159
Issue fixed
- Cannot cut polygon with MultiLine #159 by @metehan-coone
- Exported type not found issue #165 by @HawtinZeng
Full Changelog: v1.4.8...v1.5.0