nical / lyon

2D graphics rendering on the GPU in rust using path tessellation.
Other
2.36k stars 145 forks source link

Fill tessellation failure in 0.15.3 #529

Closed scoopr closed 4 years ago

scoopr commented 4 years ago

I'm tesselating a svg file that I simply pass from usvg to lyon fill tesselator. The svg file can be found at [0], I used CNTR_RG_03M_2016_4326.svg which used to work with 0.14, (but CNTR_RG_01M_2016_4326.svg did not).

The error is simply Internal(IncorrectActiveEdgeOrder(3)), the node id seems to be "MX" (Mexico).

I'm unable to discern if this is bad data or numerical issue or simply a bug in the tessellator.

[0] https://ec.europa.eu/eurostat/cache/GISCO/distribution/v1/countries-2016.html

nical commented 4 years ago

Thanks for the report, unless the input data contains broken floats like NaNs or inifinity, and has fewer than u32::MAX vertices, it should definitely be considered as a bug in the tessellator which is the case here. I was able to reproduce this and reduce it to a small testcase. I'll look into it soon.

nical commented 4 years ago

Fix published in lyon_tessellatio 0.15.5 lyon 0.15.5.

scoopr commented 4 years ago

Excellent, thank you! It works! :)