On Fri, 31 Dec 2021 at 08:23, Stefan BrĂ¼ns stefan.bruens@rwth-aachen.de wrote:
When the last vertex is coincident with the first vertex, the last segment should be suppressed for both END_OPEN and END_CLOSED.
When the last, zero length segment is not omitted d2d_geometry_intersect_self will add invalid segments.
Unfortunately, I don't think that's correct. For an END_OPEN figure, the first and last vertex coinciding doesn't imply that the last segment is a zero-length segment.
Note that if the issue is with some part of d2d_geometry_intersect_self() not handling coinciding vertices well, that issue should be fixed there. Begin and end vertices coinciding isn't the only way that situation can occur; consider for example a trifolium curve (or rose curves more generally) with a shared vertex at the centre.