Skip to content
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

Open
wants to merge 34 commits into
base: master
Choose a base branch
from

Conversation

afabri
Copy link
Member

@afabri afabri commented Jan 3, 2025

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.

  • Deal with non-triangle case
  • What to do with edges adjacent to degenerate faces?
  • Add to statistics in Lab
  • Small Feature

Release Management

  • Affected package(s): Polygon Mesh Processing
  • Feature/Small Feature (if any): link
  • Link to compiled documentation (obligatory for small feature) wrong link name to be changed
  • License and copyright ownership: GeometryFactory

hoskillua and others added 16 commits April 19, 2022 01:04
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...
@afabri

This comment was marked as outdated.

This comment was marked as outdated.

@afabri

This comment was marked as outdated.

@afabri

This comment was marked as outdated.

Copy link

github-actions bot commented Jan 8, 2025

The documentation is built. It will be available, after a few minutes, here: https://cgal.github.io/8676/v0/Manual/index.html

@sloriot
Copy link
Member

sloriot commented Jan 9, 2025

Successfully tested in CGAL-6.1-Ic-59

@github-actions github-actions bot removed the Tested label Jan 10, 2025

This comment was marked as outdated.

@MaelRL
Copy link
Member

MaelRL commented Jan 13, 2025

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 compare_dihedral / compare_squared_distance so we are not using predicates.

@afabri
Copy link
Member Author

afabri commented Jan 13, 2025

These functions are trivially paralleliozable. Do we take care of that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants