-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add PMP::longest_edge() #6496
base: master
Are you sure you want to change the base?
Add PMP::longest_edge() #6496
Conversation
Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h
Outdated
Show resolved
Hide resolved
Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h
Outdated
Show resolved
Hide resolved
Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h
Outdated
Show resolved
Hide resolved
Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h
Outdated
Show resolved
Hide resolved
Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h
Outdated
Show resolved
Hide resolved
What is missing: |
@afabri, I updated the Reference Manual and change log files. about testing, I added calls to the function in measure_test.cpp and it ran as expected on these tests. But I can also make a testing program for this function if required. |
Would it be beneficial to add functions for shortest edge, largest and smallest faces (area) for completion? If so, I can implement them and add tests in general for the 4 functions. |
There is a test failing here. Basically it says that the edge iterator of Polyhedron is not detected as a |
Hello, what is the status of this PR? |
@janetournois from what I remember there is a technical issue that I wasn't able to easily workaround at the time I looked at it. Let me have a fresh look. |
Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h
Outdated
Show resolved
Hide resolved
Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h
Outdated
Show resolved
Hide resolved
std::max_element demands a forward iterator, which we do not have for Polyhedron_3: its iterator type is a boost transform_iterator with the edge_descriptor built on-the-fly when dereferenced. The error in practice is a static assertion for compilers that do in fact enforce the requirement of the iterator category like: error: static assertion failed due to requirement 'std::is_same< boost::iterators::detail::iterator_category_with_traversal< std::input_iterator_tag, boost::iterators::bidirectional_traversal_tag>, std::forward_iterator_tag>::value' We could probably have an iterator with state or something, but it is not worth it for now...
Successfully tested in CGAL-6.1-Ic-45 |
Summary of Changes
I have implemented the
longest_edge()
function requested in this issue. I have tested it on simple input and it works fine.Release Management