-
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
PMP: Add a function to find edges with smallest/largest dihedral angle #8676
base: master
Are you sure you want to change the base?
Conversation
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...
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Both functions now have the same API: std::pair<std::pair<boost::graph_traits<PolygonMesh>::edge_descriptor`, FT>,
std::pair<boost::graph_traits<PolygonMesh>::edge_descriptor`, FT> >
minmax_XXX(const EdgeRange& edge_range,
const PolygonMesh& pmesh,
const CGAL_NP_CLASS& np = parameters::default_values()) An annoying detail is that we compute and compare to current min/max rather than using |
These functions are trivially paralleliozable. Do we take care of that? |
6486b94
to
48d74ca
Compare
Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h
Outdated
Show resolved
Hide resolved
Here is some benchmark data for comparison == Version with pure sequential for() == == Version CGAL::for_each + mutex == == Version with tbb::parallel_reduce == Test Polyhedron Data/data/meshes/ultra_refined_elephant.off with Kernel N4CGAL5EpickE So the mutex ruins parallel gains but there is more to investiguate. |
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
Successfully tested in CGAL-6.1-Ic-66 |
But not ready to get merged as parallel sometimes slower than sequential. |
Co-authored-by: Sebastien Loriot <sloriot.ml@gmail.com>
This pull-request was previously marked with the label |
Summary of Changes
Add the function
minmax_dihedral_angle()
to identify the non-border edges with smallest/largest dihedral angle.It returns the edge descriptors and the angles in degree.
Release Management