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

Add a way to pass input normal to faces #8638

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

sloriot
Copy link
Member

@sloriot sloriot commented Dec 2, 2024

Avoid computing them when they are known.

  • Normals are only used for estimating the angle between neighbor faces. PCA is used to estimate the plane.
  • sorting should be reusing the triangulation of faces that is already done in regions (pass the internal map to sort() for exemple). PCA is also used here to estimate the flatness score of a face in its neighborhood
  • About sorting: I'm not sure it wouldn't be a better idea to simply sort using the area of the faces and ignore flatness of the neighborhood.

@sloriot sloriot requested a review from soesau January 6, 2025 14:16
Copy link
Member

@soesau soesau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ! in Plane_face_region.h#320 looks like bug and at least the doc needs to be updated.

h=next(h, m_face_graph);
r=get(m_vpm,target(h, m_face_graph));
}
while(!collinear(p,q,r));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
while(!collinear(p,q,r));
while(collinear(p,q,r));

to chunks of faces in a polygon mesh and controls the quality of this fit.
If all quality conditions are satisfied, the chunk is accepted as a valid region,
otherwise rejected.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doc needs to be updated. The region is based on the support plane of the seed face.

const Item query,
const Region&) const
{
//TODO: that's a bit dummy that we retest points that are already in the region...
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If performance is an issue, we can add a flag that is set when the region needs to be rechecked. But this region type should be pretty fast already as there is no refitting.

const typename GeomTraits::Point_3& p=get(m_vpm,source(h, m_face_graph));
const typename GeomTraits::Point_3& q=get(m_vpm,target(h, m_face_graph));
typename GeomTraits::Point_3 r;
//TODO: add safety checks for degenerate faces
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The safety check should be inside the update method that should return false for degenerate faces.

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.

2 participants