-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
insert_constraint error on Constrained_Delaunay_Triangulation_plus_2 #210
Comments
@sloriot It seems there is a sort of confusion: the Python code should call: |
I suspect it is a bug with SWIG. I tried 4.3.3 with the 4.x branch and it does not work either. Maybe it was working for you but with a earlier version of SWIG. The issue is because of overloads. It I rename the function in the base wrapper class, it works. I don't know yet what is the best solution (without breaking the API). |
Thank you for your return. I've tried to add |
I've got a new track. Obviously, it's not very satisfying to revert a commit which is probably useful for other users. But by analysing the changes introduced on this commit, it can give us some tips on how to solve the problem. In first analysis, the problem could be related with the introduction of Contraint_id_wrapper, as the suppression of this class in Triangulation_2 package, solves the problem. |
As I said, SWIG is confused by the overload |
We found this workaround which works : I hope it can help anyone who encounters same problem. |
Hello,
We have a project using CGAL through cgal-bindings with CGAL 4.14.3.
While upgrading the project to CGAL 5.4, we encountered an error in CDTP2.insert_constraint().
I reproduced the issue by adapting the example of the wiki conforming.py.
(The original example works perfectly in our environment).
Code to reproduce failure :
Error message :
TypeError: 'Constrained_Delaunay_triangulation_plus_2_Vertex_handle' object is not iterable
Additional information:
Wrong number or type of arguments for overloaded function 'Constrained_Delaunay_triangulation_plus_2_insert_constraint'.
Possible C/C++ prototypes are:
Constrained_triangulation_plus_2_wrapper< CGAL_CDTplus2,Constrained_Delaunay_triangulation_2_wrapper< CGAL_CDTplus2,SWIG_Triangulation_2::CGAL_Vertex_handle< CGAL_CDTplus2,Point_2 >,SWIG_Triangulation_2::CGAL_Face_handle< CGAL_CDTplus2,Point_2 > >,SWIG_Triangulation_2::CGAL_Vertex_handle< CGAL_CDTplus2,Point_2 > >::insert_constraint(Polygon_2 const &)
Constrained_triangulation_plus_2_wrapper< CGAL_CDTplus2,Constrained_Delaunay_triangulation_2_wrapper< CGAL_CDTplus2,SWIG_Triangulation_2::CGAL_Vertex_handle< CGAL_CDTplus2,Point_2 >,SWIG_Triangulation_2::CGAL_Face_handle< CGAL_CDTplus2,Point_2 > >,SWIG_Triangulation_2::CGAL_Vertex_handle< CGAL_CDTplus2,Point_2 > >::insert_constraint(Wrapper_iterator_helper< Point_2 >::input,bool)
Constrained_triangulation_plus_2_wrapper< CGAL_CDTplus2,Constrained_Delaunay_triangulation_2_wrapper< CGAL_CDTplus2,SWIG_Triangulation_2::CGAL_Vertex_handle< CGAL_CDTplus2,Point_2 >,SWIG_Triangulation_2::CGAL_Face_handle< CGAL_CDTplus2,Point_2 > >,SWIG_Triangulation_2::CGAL_Vertex_handle< CGAL_CDTplus2,Point_2 > >::insert_constraint(Wrapper_iterator_helper< Point_2 >::input)
Investigation :
CGAL : We haven't see any changes on this method between CGAL 4.14.3 and CGAL 5.4 in CGAL documentation.
cgal_bindings :
We keep on investigating to find a solution and any help is welcome.
Thanks in advance.
Jean.
The text was updated successfully, but these errors were encountered: