Details
-
Technical task
-
Resolution: Fixed
-
P2: Important
-
None
-
None
Description
We currently do not support shapes that have self-intersecting pieces, for instance if two line segments intersect. However, there is nothing preventing shapes from doing this, so we need a graceful way of dealing with it. The current approach is that the user has to set simplified on the shape. One improvement could be to automatically rewind and do simplified on the shape when an error case is found.
However, there may be shapes where there are self-intersections as a matter of accident, because a designer has dragged control points around until it looks okay. It's possible we could deal with these by splitting into subpaths, removing smaller pieces of geometry, or even splitting intersecting elements at a common point.
There is no clear answer, so finding out what can be done is part of this task.
The ideal solution would be to calculate the intersection points, and then split into separate sub-paths. This is conceptually straightforward, but the naïve implementation will probably be too expensive, so we will need a more advanced algorithm.