Skip to content

Introduce strictly_inside parameter for PMP::kernel_point()#9339

Merged
sloriot merged 13 commits intoCGAL:mainfrom
LeoValque:PMP-kernel_extra
Apr 7, 2026
Merged

Introduce strictly_inside parameter for PMP::kernel_point()#9339
sloriot merged 13 commits intoCGAL:mainfrom
LeoValque:PMP-kernel_extra

Conversation

@LeoValque
Copy link
Copy Markdown
Contributor

@LeoValque LeoValque commented Feb 24, 2026

Summary of Changes

Add a parameter "require_strictly_inside" to the function "PMP::kernel_point()".
If the parameter is true and the kernel of the input mesh is degenerated, the function returns nothing instead of a point on the boundary of the kernel.

Release Management

  • Affected package(s): PMP
  • Issue(s) solved (if any): -
  • Feature/Small Feature (if any): here pre-approved -- Sloriot 2026-03-26
  • Link to compiled documentation (obligatory for small feature) here
  • License and copyright ownership: no change

@MaelRL MaelRL added Enhancement Not yet approved The feature or pull-request has not yet been approved. Pkg::PMP labels Feb 24, 2026
@MaelRL MaelRL added this to the 6.2-beta milestone Feb 24, 2026
@sloriot
Copy link
Copy Markdown
Member

sloriot commented Mar 24, 2026

Successfully tested in CGAL-6.2-Ic-137

@sloriot
Copy link
Copy Markdown
Member

sloriot commented Mar 25, 2026

/build:v0

@github-actions
Copy link
Copy Markdown

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

@github-actions

This comment was marked as spam.

@sloriot sloriot changed the title Introduce require_strictly_inside parameter for PMP::kernel_point() Introduce strictly_inside parameter for PMP::kernel_point() Mar 25, 2026
@sloriot sloriot added the pre-approved For pre-approved small features. After 15 days the feature will be accepted. label Mar 25, 2026
@sloriot
Copy link
Copy Markdown
Member

sloriot commented Mar 30, 2026

Successfully tested in CGAL-6.2-Ic-141

@MaelRL MaelRL added CHANGES.md not updated and removed Not yet approved The feature or pull-request has not yet been approved. CHANGES.md not updated labels Mar 30, 2026
Comment on lines -65 to +73
auto sq = traits.compute_squared_distance_3_object();
auto normal = traits.construct_orthogonal_vector_3_object();
auto vector = traits.construct_vector_3_object();
auto point_on = traits.construct_point_on_3_object();
auto dot = traits.compute_scalar_product_3_object();
auto sq = [&](const Plane_3& pl, const Point_3& p){
return dot(vector(point_on(pl), p), normal(pl));
};
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

sq is:

  [&](const Plane_3& pl, const Point_3& p){
    return dot(vector(point_on(pl), p), normal(pl));
  };

That function evaluates the equation of the plane ax+by+cz+d with the coordinates of the point p, and that returns the signed distance to the plane (multiplied by the length of the normal), That function should be added to the kernel, because I am pretty sure it is used in other pieces of code in CGAL.

I am also surprised that the code below compares those distances. Is that code only called with an exact kernel (with exact constructions)?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Seeing how it is used later, simply evaluation the equation of the plane at p should be enough. No need to normalize as all points are compared to the same plane. Isn't it @LeoValque ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I need the value to progress in the direction to the plane, for that I can use the new predicate compare_along_dir with two pts and a Direction_3

@MaelRL MaelRL mentioned this pull request Apr 2, 2026
8 tasks
@sloriot sloriot added Accepted small feature and removed Ready to be tested pre-approved For pre-approved small features. After 15 days the feature will be accepted. labels Apr 7, 2026
Co-authored-by: Laurent Rineau <Laurent.Rineau@cgal.org>
@github-actions github-actions bot removed the Tested label Apr 7, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 7, 2026

This pull-request was previously marked with the label Tested, but has been modified with new commits. That label has been removed.

@sloriot sloriot added the Tested label Apr 7, 2026
@sloriot sloriot merged commit da81a7f into CGAL:main Apr 7, 2026
1 check passed
@sloriot sloriot deleted the PMP-kernel_extra branch April 7, 2026 15:16
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.

4 participants