Skip to content

Cut polygon with multiLine

Compare
Choose a tag to compare
@alexbol99 alexbol99 released this 29 Mar 15:30
· 37 commits to master since this release
565ae09

What's Changed

  • Cut polygon with multiline by @alexbol99 in #163
    Cut polygon with multiline using method polygon.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
image

Issue fixed

Full Changelog: v1.4.8...v1.5.0