alexbol99 / flatten-js

Javascript library for 2d geometry
MIT License
535 stars 56 forks source link

Intersection between a line and a multiline #183

Open stanch opened 2 weeks ago

stanch commented 2 weeks ago

I have a multiline with two segments and an arc (potentially, more complex in the future) and would like to intersect it with a line. This is, of course, a matter of intersecting the line with each edge one by one (and removing duplicates that result from parts of the multiline overlapping).

There are already methods for intersecting a line with each shape that can go into a multiline, so it feels like an omission that Line’s intersect method does not support multilines.