gwlucastrig / Tinfour

Delaunay and Constrained Delaunay Triangulations in Java, providing high-performance utilities for modeling surfaces with support for Lidar LAS files, Digital Elevation Models (DEM), finite element analysis, path planning, natural neighbor interpolation, and other applications of Triangulated Irregular Networks (TIN)
Apache License 2.0
158 stars 34 forks source link

IncrementalTIN: infinite loop in processConstraint #35

Closed jandam closed 6 years ago

jandam commented 6 years ago

https://github.com/gwlucastrig/Tinfour/blob/cfd50eb7c63061b02598375695f47c83d51f98cd/src/main/java/tinfour/standard/IncrementalTin.java#L2035

Above line is adding alternate vertices (Vertex@6135, Vertex@6131) to cvList and incrementing nSegments. More info/sample will follow

82 = {Vertex@6135} " 0: x=24.03662014933414, y=-55.7899709286193, z=-25.385998" 83 = {Vertex@6131} " 0: x=23.708504632432934, y=-55.53547969058978, z=-25.625874" 84 = {Vertex@6135} " 0: x=24.03662014933414, y=-55.7899709286193, z=-25.385998" 85 = {Vertex@6131} " 0: x=23.708504632432934, y=-55.53547969058978, z=-25.625874" 86 = {Vertex@6135} " 0: x=24.03662014933414, y=-55.7899709286193, z=-25.385998" 87 = {Vertex@6131} " 0: x=23.708504632432934, y=-55.53547969058978, z=-25.625874"

jandam commented 6 years ago

I think that segment is (near) collinear to e0 but segment and e0 have no common part.

Sample: Segment seg0 = new Vertex(0.0, 0.0); seg1 = new Vertex(1.0, 0.0);

E0 e00 = new Vertex(2.0, 0.0); e01 = new Vertex(3.0, 0.0);

gwlucastrig commented 6 years ago

I am not absolutely sure, but I believe that this issue was fixed with various improvements to the internal computation logic that have been implemented over the last 6 months. At this time, I do not have a specific test. So I am closing this item. Please let me know if you encounter further problems and open a new issue if you do.

I am closing this issue.