Skip to content

Various CGAL fixes & improvements

Mael requested to merge MaelRL/vespa:Vespa-Imps-MaelRL into master

Hi,

I am https://github.com/maelRL/, from CGAL.

Please consider the following merge request.

These changes started from noticing that you were using CGAL::Simple_Cartesian for the CDT2 and Advancing Front Reconstruction modules, whereas these two algorithms should be run with a kernel providing exact predicates such as EPICK. Otherwise, correct (or even valid) results cannot be expected.

Commits should be rather self-explanatory but let me know if you have questions or if something must be changed.

A few points of discussion beneath.

Thanks!

CDT2

For CDT2, there is a bit of an inconsistency in the code, and I am not sure what you want: comments here and there say that overlaps are prohibited, but the default intersection tag (which you use since you don't select it) is CGAL::No_constraint_intersection_requiring_constructions_tag. That particular tag allows overlaps and T-like intersections of constraints. I have made the tag explicit in 4f830183. This aligns with your comments, but maybe you would rather have CGAL::No_constraint_intersection_requiring_constructions_tag, and the comments are to be changed.

Also, just to make sure: you output all the finite faces of the CDT2, which means the convex hull of all your point; is this what you want, or are you rather expecting the region bounded by constraints (something akin to the example: https://doc.cgal.org/latest/Triangulation_2/Triangulation_2_2polygon_triangulation_8cpp-example.html)

Issues

Below are a few (unsolved) issues I encountered trying to use / test the vespa code from source.

My versions are the following OS: Fedora 39 CGAL: 6.0.1 (master branch) VTK: 9.2.6 (from the dnf package manager) Paraview: a previous local build @ 873227f3cba1330d1f2043669403f0c7fd82e7be (not installed) Build type: debug

Using the tests

Running the tests, I get (even with Vespa master) the following output:

X@Y:~/git/vespa/build-debug$ ctest 
Test project X/git/vespa/build-debug
      Start  1: vtkCGALSRCxx-TestSRAdvancingFrontSurfaceReconstruction
 1/20 Test  #1: vtkCGALSRCxx-TestSRAdvancingFrontSurfaceReconstruction ....   Passed    2.06 sec
      Start  2: vtkCGALSRCxx-TestSRPoissonSurfaceReconstructionDelaunay
 2/20 Test  #2: vtkCGALSRCxx-TestSRPoissonSurfaceReconstructionDelaunay ...   Passed    7.62 sec
      Start  3: import_vtkCGALPMP
 3/20 Test  #3: import_vtkCGALPMP .........................................   Passed    0.23 sec
      Start  4: execute_IsotropicRemesher
 4/20 Test  #4: execute_IsotropicRemesher .................................   Passed    0.75 sec
      Start  5: vtkCGALPMPCxx-TestPMPInstance
 5/20 Test  #5: vtkCGALPMPCxx-TestPMPInstance .............................   Passed    0.05 sec
      Start  6: vtkCGALPMPCxx-TestPMPBooleanExecution
 6/20 Test  #6: vtkCGALPMPCxx-TestPMPBooleanExecution .....................***Failed  Error regular expression found in output. Regex=[ERR\|]  0.06 sec
      Start  7: vtkCGALPMPCxx-TestPMPDeformExecution
 7/20 Test  #7: vtkCGALPMPCxx-TestPMPDeformExecution ......................***Failed  Error regular expression found in output. Regex=[ERR\|]  0.06 sec
      Start  8: vtkCGALPMPCxx-TestPMPFairExecution
 8/20 Test  #8: vtkCGALPMPCxx-TestPMPFairExecution ........................***Failed  Error regular expression found in output. Regex=[ERR\|]  0.07 sec
      Start  9: vtkCGALPMPCxx-TestPMPFillExecution
 9/20 Test  #9: vtkCGALPMPCxx-TestPMPFillExecution ........................***Failed  Error regular expression found in output. Regex=[ERR\|]  0.07 sec
      Start 10: vtkCGALPMPCxx-TestPMPIsotropicExecution
10/20 Test #10: vtkCGALPMPCxx-TestPMPIsotropicExecution ...................***Failed  Error regular expression found in output. Regex=[ERR\|]  0.05 sec
      Start 11: vtkCGALPMPCxx-TestPMPMeshCheckerExecution
11/20 Test #11: vtkCGALPMPCxx-TestPMPMeshCheckerExecution .................***Failed  Error regular expression found in output. Regex=[ERR\|]  0.06 sec
      Start 12: vtkCGALPMPCxx-TestPMPMeshSubdivisionExecution
12/20 Test #12: vtkCGALPMPCxx-TestPMPMeshSubdivisionExecution .............   Passed    0.06 sec
      Start 13: vtkCGALPMPCxx-TestPMPSmoothingExecution
13/20 Test #13: vtkCGALPMPCxx-TestPMPSmoothingExecution ...................***Failed  Error regular expression found in output. Regex=[ERR\|]  0.05 sec
      Start 14: vtkCGALPMPCxx-TestPMPMeshSmoothingExecution
14/20 Test #14: vtkCGALPMPCxx-TestPMPMeshSmoothingExecution ...............   Passed    0.08 sec
      Start 15: vtkCGALPMPCxx-TestPMPAlphaWrapping
15/20 Test #15: vtkCGALPMPCxx-TestPMPAlphaWrapping ........................***Failed  Error regular expression found in output. Regex=[ERR\|]  0.05 sec
      Start 16: vtkCGALPSPCxx-TestPSPXYZReader
16/20 Test #16: vtkCGALPSPCxx-TestPSPXYZReader ............................   Passed    0.31 sec
      Start 17: vtkCGALPSPCxx-TestPSPPCAEstimateNormals
17/20 Test #17: vtkCGALPSPCxx-TestPSPPCAEstimateNormals ...................   Passed    1.44 sec
      Start 18: import_Delaunay
18/20 Test #18: import_Delaunay ...........................................   Passed    0.15 sec
      Start 19: execute_Delaunay
19/20 Test #19: execute_Delaunay ..........................................   Passed    0.33 sec
      Start 20: vtkCGALDelaunayCxx-TestDelaunayExecution
20/20 Test #20: vtkCGALDelaunayCxx-TestDelaunayExecution ..................***Failed  Error regular expression found in output. Regex=[ERR\|]  0.03 sec

55% tests passed, 9 tests failed out of 20

Label Time Summary:
vtkCGALDelaunay    =   0.03 sec*proc (1 test)
vtkCGALPMP         =   0.66 sec*proc (11 tests)
vtkCGALPSP         =   1.75 sec*proc (2 tests)
vtkCGALSR          =   9.68 sec*proc (2 tests)

Total Test time (real) =  13.59 sec

The following tests FAILED:
	  6 - vtkCGALPMPCxx-TestPMPBooleanExecution (Failed)
	  7 - vtkCGALPMPCxx-TestPMPDeformExecution (Failed)
	  8 - vtkCGALPMPCxx-TestPMPFairExecution (Failed)
	  9 - vtkCGALPMPCxx-TestPMPFillExecution (Failed)
	 10 - vtkCGALPMPCxx-TestPMPIsotropicExecution (Failed)
	 11 - vtkCGALPMPCxx-TestPMPMeshCheckerExecution (Failed)
	 13 - vtkCGALPMPCxx-TestPMPSmoothingExecution (Failed)
	 15 - vtkCGALPMPCxx-TestPMPAlphaWrapping (Failed)
	 20 - vtkCGALDelaunayCxx-TestDelaunayExecution (Failed)
Errors while running CTest

It seems there is some issue reading the input files:

mrouxell@escher:~/git/vespa/build-debug$ ctest -V -R Boolean
UpdateCTestConfiguration  from :X/git/vespa/build-debug/DartConfiguration.tcl
Parse Config file:X/git/vespa/build-debug/DartConfiguration.tcl
UpdateCTestConfiguration  from :X/git/vespa/build-debug/DartConfiguration.tcl
Parse Config file:X/git/vespa/build-debug/DartConfiguration.tcl
Test project X/git/vespa/build-debug
Constructing a list of tests
Done constructing a list of tests
Updating test list for fixtures
Added 0 tests to meet fixture requirements
Checking test dependency graph...
Checking test dependency graph end
test 6
    Start 6: vtkCGALPMPCxx-TestPMPBooleanExecution

6: Test command: X/git/vespa/build-debug/bin/vtkCGALPMPCxxTests "TestPMPBooleanExecution" "X/git/vespa/Data/Testing/"
6: Working Directory: X/git/vespa/build-debug/vespa/PolygonMeshProcessing/Testing
6: Test timeout computed to be: 1500
6: (   0.019s) [main thread     ]       vtkXMLParser.cxx:375    ERR| vtkXMLDataParser (0x323fd7e0): Error parsing XML in stream at line 50, column 0, byte index 2848: not well-formed (invalid token)
6: (   0.019s) [main thread     ]       vtkXMLReader.cxx:521    ERR| vtkXMLPolyDataReader (0x323f0f50): Error parsing input file.  ReadXMLInformation aborting.
6: (   0.019s) [main thread     ]       vtkExecutive.cxx:740    ERR| vtkCompositeDataPipeline (0x323f4050): Algorithm vtkXMLPolyDataReader (0x323f0f50) returned failure for request: vtkInformation (0x323fb470)
6:   Debug: Off
6:   Modified Time: 295
6:   Reference Count: 1
6:   Registered Events: (none)
6:   Request: REQUEST_INFORMATION
6:   FROM_OUTPUT_PORT: 0
6:   ALGORITHM_AFTER_FORWARD: 1
6:   FORWARD_DIRECTION: 0
6: 
6: 
1/1 Test #6: vtkCGALPMPCxx-TestPMPBooleanExecution ...***Failed  Error regular expression found in output. Regex=[ERR\|]  0.06 sec

0% tests passed, 1 tests failed out of 1

Label Time Summary:
vtkCGALPMP    =   0.06 sec*proc (1 test)

Total Test time (real) =   0.07 sec

The following tests FAILED:
	  6 - vtkCGALPMPCxx-TestPMPBooleanExecution (Failed)
Errors while running CTest
Output from these tests are in: X/git/vespa/build-debug/Testing/Temporary/LastTest.log
Use "--rerun-failed --output-on-failure" to re-run the failed cases verbosely.

Using the plugin

If I enable VESPA_BUILD_PV_PLUGIN, and after specifying my paraview folder as described in the readme, I get the following error while configuring:

Unknown CMake command "vtk_module_python_default_destination".
Edited by Mael

Merge request reports

Loading