mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-12 15:52:52 +00:00
Follows #6614. When a closed subpath's refit in two and in three parts is still lines that enclose no area, for example an S curve closed by a straight edge whose cut points all lie on that edge, Simplify now splits each segment in 2, 4, 8 and so on (up to 1,024 pieces, 65,536 in all) until every piece is within the tolerance of the line between its ends and those lines enclose an area. With Convert to Straight Lines those lines are the result; without it the subpath stays as it is. A subpath whose points are all in line keeps the refit's lines, so its extra anchors are still removed. Lines count as enclosing no area when every point is within 1e-6 pt of one line.