a20ca0ca32087b97c76819be88091b7caf4da85c
This commit replaces the solution in revision 44534. It is recalled that a degenerate triangle is a triangle such that 1) A and B are in the same position in the 3D space; or 2) the distance between point P and line segment AB is zero. Unlike the previous solution, the present fix is capable of any mesh topology involving any number of degenerate triangles. Degenerated triangles are removed in two steps. First, degenerate triangles in the second form are transformed into the first form by moving P to the position of either A or B that is closer to P. This modification affects all triangles sharing the vertex P. Then, all degenerate triangles in the first form are removed by just ignoring them. Obviously, the present solution has a disadvantage that resulting strokes may appear incorrect. This drawback is justified by the fact that the present solution is robust and easy to implement. Users are expected to fix incorrect strokes (if any) by manual removal of degenerate triangles from mesh data.
Description
No description provided
Languages
C++
78%
Python
14.9%
C
2.9%
GLSL
1.9%
CMake
1.2%
Other
0.9%