jbuckmccready / CavalierContours

2D polyline library for offsetting, combining, etc.
MIT License
427 stars 79 forks source link

ASSERT -> v1 must not be ontop of v2 #37

Closed kadircanik closed 3 years ago

kadircanik commented 3 years ago

Following polyline is giving assert;

Path P; P.addVertex(30.123475382979791, -17.00000, 0.00000); P.addVertex(42.000000000000000, -17.00000, 0.00000); P.addVertex(42.000000000000000, 17.00000, 0.00000); P.addVertex(30.123475382979798, 17.00000, -0.093311550024413187); P.addVertex(30.500000000000000, 15.00000, 0.00000); P.addVertex(30.500000000000000, -15.00000, -0.093311550024413409); parallelOffset(P, -2.0);

jbuckmccready commented 3 years ago

Interesting specific edge case you found, thanks for reporting the issue. I committed a fix: https://github.com/jbuckmccready/CavalierContours/commit/ad10845e7d65e7efc150bd521100f537f4e555bb

kadircanik commented 3 years ago

Thank you