You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like (py)martini creates a mesh with vertices (at least sometimes) in clockwise order, while the Quantized Mesh spec requires counter-clockwise winding order.
e.g. here are the first three 2D vertices, and it looks like they define a clockwise triangle
So I should add an option, probably True by default, that checks the input geometries and flips the order of indices if the triangle is in clockwise winding order.
It looks like it shouldn't actually be too slow to check, though it might be best in Cython... not sure if I can vectorize it easily
You should be able to do this vectorised. Use positions as a lookup table, then you should be able to apply indices, to get triples of coordinates. Then just do the simple algorithm above and flip the order of indices where necessary
It looks like (py)martini creates a mesh with vertices (at least sometimes) in clockwise order, while the Quantized Mesh spec requires counter-clockwise winding order.
e.g. here are the first three 2D vertices, and it looks like they define a clockwise triangle
So I should add an option, probably
True
by default, that checks the input geometries and flips the order ofindices
if the triangle is in clockwise winding order.It looks like it shouldn't actually be too slow to check, though it might be best in Cython... not sure if I can vectorize it easily
This might solve #9 , #11
The text was updated successfully, but these errors were encountered: