dxf-viewer
dxf-viewer copied to clipboard
Add missing indices when decomposing faces
Hi again,
we would like to suggest a small change in the decomposition of faces. In some dxf files we experienced minor rendering artifacts because the surfaces were not closed properly.
UI
Before:
After:
Thx
Hi,
This fix does not look valid. What you do is adding third triangle, so ending up with three overlapping triangles (you can check resulting topology with sceneOptions.wireframeMesh option set to true). Instead it should be investigated, how to ensure proper quad decomposition into two triangles. I have already faced similar problems and tried to modify decomposition algorithm to cover all cases, but seems it is still not robust enough for a wild files. DXF does not specify vertices order of a quad, seems it may be completely arbitrary. It would be nice to have a sample file to properly fix this issue.
We did not check the resulting mesh topology, to be honest, because this solution simply works in our use case.
It would be nice to have a sample file to properly fix this issue.
I will see if I can find one that exhibits this behavior if that would help?
I will see if I can find one that exhibits this behavior if that would help?
Yes, that will definitely help to find proper solution.