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

Better flip-check criterion for almost degenerate face removal #8743

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

Conversation

MaelRL
Copy link
Member

@MaelRL MaelRL commented Feb 17, 2025

Summary of Changes

While trying to remove caps, PMP::remove_almost_degenerate_faces() does a Delaunay-like check before allowing the edge flip. Unfortunately, the current criterion (see #7125) can prevent some edge flips that would resolve a cap because sometimes this Delaunay-like criterion can prefer a cap if it is balanced by a very small angle on the other side. Then you have alpha + beta < 180 and you're stuck with the cap, but maybe you would have liked to flip still because the largest angles created by a flip would be e.g. 120 and 120, which is not that bad.

However in this function, we are maybe not so interested in having nicely shaped elements as much as we are trying to remove the worst elements. So this PR tries to improve the worst cap angle instead, by checking only (and greedily) if we do not create a worse cap angle when we flip.

This produces better results for the cases that were problematic with alpha + beta < 180

1

image

2

image

3

image

Release Management

  • Affected package(s): PMP
  • Issue(s) solved (if any):
  • Feature/Small Feature (if any): -
  • License and copyright ownership: no change

The reasoning is that in this function, we are maybe not so interested
in having nicely shaped elements as much as we are trying to remove
the worst elements.

Unfortunately, the current criterion
(see CGAL#7125)
can prevent some edge flips that would resolve a cap because
sometimes this Delaunay-like criterion can prefer a cap if it is
balanced by a very small angle on the other side. Then you have
alpha + beta < 180 and you're stuck with the cap, but maybe you
would have liked to flip still because the largest angles created
by a flip would be e.g. 120 and 120, which is not that bad.

So this PR tries to improve the worst cap angle instead by checking
only (and greedily) if we do not create a worse cap angle when we flip.

This produces better results for the cases that were problematic with
alpha + beta < 180
@sloriot sloriot force-pushed the PMP-Remove_almost_degen_faces-Should_flip_criterion-GF branch from cc62cca to ebce0cf Compare February 17, 2025 17:42
@afabri
Copy link
Member

afabri commented Feb 17, 2025

WIP, so what is the todo?

@sloriot sloriot force-pushed the PMP-Remove_almost_degen_faces-Should_flip_criterion-GF branch from 53f9961 to 5e2a662 Compare February 19, 2025 06:32
@sloriot
Copy link
Member

sloriot commented Feb 21, 2025

Note that it makes hole_filling_example_LCC fail fo example here

@MaelRL
Copy link
Member Author

MaelRL commented Feb 21, 2025

This shouldn't be tested as it is: the API changes in the internal function (I added the capness threshold) breaks isotropic remeshing and related functions.

I didn't want to fix it until we discuss this criterion change (and with @janetournois).

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

Successfully merging this pull request may close these issues.

3 participants