CGAL/cgal-swig-bindings

Mesh Boolean operation possible?

liuzhy71 opened this issue · 4 comments

Hello,

Is there any way that I can implement mesh Boolean operations with the binding similar to the CPP version?
I did not find any function that is similar to corefine_and_compute_union.

I just added them in 87cae94

I just added them in 87cae94

With this new functionality, the make failed on my PC.
The error messages are:

/home/ubuntu/cgal-swig-bindings/examples/python/CGAL/CGAL_Polygon_mesh_processingPYTHON_wrap.cxx: In function ‘void split(Polyhedron_3_SWIG_wrapper&, Polyhedron_3_SWIG_wrapper&)’:
/home/ubuntu/cgal-swig-bindings/examples/python/CGAL/CGAL_Polygon_mesh_processingPYTHON_wrap.cxx:6049:10: error: ‘split’ is not a member of ‘PMP’
     PMP::split(A.get_data(), B.get_data());
          ^~~~~
/home/ubuntu/cgal-swig-bindings/examples/python/CGAL/CGAL_Polygon_mesh_processingPYTHON_wrap.cxx:6049:10: note: suggested alternatives:
/home/ubuntu/cgal-swig-bindings/examples/python/CGAL/CGAL_Polygon_mesh_processingPYTHON_wrap.cxx:6047:8: note:   ‘split’
   void split(Polyhedron_3_SWIG_wrapper& A, Polyhedron_3_SWIG_wrapper& B)
        ^~~~~
In file included from /usr/include/tbb/concurrent_hash_map.h:24:0,
                 from /usr/local/include/CGAL/Profile_counter.h:67,
                 from /usr/local/include/CGAL/Uncertain.h:18,
                 from /usr/local/include/CGAL/assertions.h:350,
                 from /home/ubuntu/cgal-swig-bindings/SWIG_CGAL/Common/Macros.h:16,
                 from /home/ubuntu/cgal-swig-bindings/SWIG_CGAL/Common/Iterator.h:10,
                 from /home/ubuntu/cgal-swig-bindings/examples/python/CGAL/CGAL_Polygon_mesh_processingPYTHON_wrap.cxx:3188:
/usr/include/tbb/tbb_stddef.h:391:7: note:   ‘tbb::split’
 class split {
       ^~~~~
/home/ubuntu/cgal-swig-bindings/examples/python/CGAL/CGAL_Polygon_mesh_processingPYTHON_wrap.cxx: In function ‘void split(Polyhedron_3_SWIG_wrapper&, Plane_3&)’:
/home/ubuntu/cgal-swig-bindings/examples/python/CGAL/CGAL_Polygon_mesh_processingPYTHON_wrap.cxx:6054:10: error: ‘split’ is not a member of ‘PMP’
     PMP::split(A.get_data(), plane.get_data());
          ^~~~~
/home/ubuntu/cgal-swig-bindings/examples/python/CGAL/CGAL_Polygon_mesh_processingPYTHON_wrap.cxx:6054:10: note: suggested alternatives:
/home/ubuntu/cgal-swig-bindings/examples/python/CGAL/CGAL_Polygon_mesh_processingPYTHON_wrap.cxx:6052:8: note:   ‘split’
   void split(Polyhedron_3_SWIG_wrapper& A, Plane_3& plane)
        ^~~~~
In file included from /usr/include/tbb/concurrent_hash_map.h:24:0,
                 from /usr/local/include/CGAL/Profile_counter.h:67,
                 from /usr/local/include/CGAL/Uncertain.h:18,
                 from /usr/local/include/CGAL/assertions.h:350,
                 from /home/ubuntu/cgal-swig-bindings/SWIG_CGAL/Common/Macros.h:16,
                 from /home/ubuntu/cgal-swig-bindings/SWIG_CGAL/Common/Iterator.h:10,
                 from /home/ubuntu/cgal-swig-bindings/examples/python/CGAL/CGAL_Polygon_mesh_processingPYTHON_wrap.cxx:3188:
/usr/include/tbb/tbb_stddef.h:391:7: note:   ‘tbb::split’
 class split {
       ^~~~~
[ 86%] Linking CXX shared module ../../../../examples/python/CGAL/_CGAL_Advancing_front_surface_reconstruction.so
[ 86%] Built target CGAL_Advancing_front_surface_reconstruction_python
[ 87%] Building CXX object SWIG_CGAL/Triangulation_3/CMakeFiles/CGAL_Triangulation_3_python.dir/__/__/examples/python/CGAL/CGAL_Triangulation_3PYTHON_wrap.cxx.o
[ 88%] Linking CXX shared module ../../../../examples/python/CGAL/_CGAL_Point_set_processing_3.so
[ 88%] Built target CGAL_Point_set_processing_3_python
[ 89%] Building CXX object SWIG_CGAL/Triangulation_2/CMakeFiles/CGAL_Triangulation_2_python.dir/__/__/examples/python/CGAL/CGAL_Triangulation_2PYTHON_wrap.cxx.o
[ 90%] Linking CXX shared module ../../../../examples/python/CGAL/_CGAL_Polyline_simplification_2.so
[ 90%] Built target CGAL_Polyline_simplification_2_python
[ 91%] Building CXX object SWIG_CGAL/Alpha_shape_2/CMakeFiles/CGAL_Alpha_shape_2_python.dir/__/__/examples/python/CGAL/CGAL_Alpha_shape_2PYTHON_wrap.cxx.o
SWIG_CGAL/Polygon_mesh_processing/CMakeFiles/CGAL_Polygon_mesh_processing_python.dir/build.make:75: recipe for target 'SWIG_CGAL/Polygon_mesh_processing/CMakeFiles/CGAL_Polygon_mesh_processing_python.dir/__/__/examples/python/CGAL/CGAL_Polygon_mesh_processingPYTHON_wrap.cxx.o' failed
make[2]: *** [SWIG_CGAL/Polygon_mesh_processing/CMakeFiles/CGAL_Polygon_mesh_processing_python.dir/__/__/examples/python/CGAL/CGAL_Polygon_mesh_processingPYTHON_wrap.cxx.o] Error 1
CMakeFiles/Makefile2:1927: recipe for target 'SWIG_CGAL/Polygon_mesh_processing/CMakeFiles/CGAL_Polygon_mesh_processing_python.dir/all' failed
make[1]: *** [SWIG_CGAL/Polygon_mesh_processing/CMakeFiles/CGAL_Polygon_mesh_processing_python.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 92%] Linking CXX shared module ../../../../examples/python/CGAL/_CGAL_Triangulation_3.so
[ 92%] Built target CGAL_Triangulation_3_python
[ 93%] Linking CXX shared module ../../../../examples/python/CGAL/_CGAL_Alpha_shape_2.so
[ 93%] Built target CGAL_Alpha_shape_2_python
[ 94%] Linking CXX shared module ../../../../examples/python/CGAL/_CGAL_Triangulation_2.so
[ 94%] Built target CGAL_Triangulation_2_python
Makefile:145: recipe for target 'all' failed

I guess you are using CGAL 5.0.x. It is no longer supported but I've updated the code anyway. It should be working now.

Yes. I'm using CGAL 5.0.2. And thank you for the timely reply!!!