Introduce strictly_inside parameter for PMP::kernel_point()#9339
Introduce strictly_inside parameter for PMP::kernel_point()#9339
Conversation
a8a26cf to
94871ad
Compare
PMP_Boolean_operations/include/CGAL/Polygon_mesh_processing/kernel.h
Outdated
Show resolved
Hide resolved
…rnel.h Co-authored-by: Sebastien Loriot <sloriot.ml@gmail.com>
|
Successfully tested in CGAL-6.2-Ic-137 |
|
/build:v0 |
|
The documentation is built. It will be available, after a few minutes, here: https://cgal.github.io/9339/v0/Manual/index.html |
This comment was marked as spam.
This comment was marked as spam.
|
Successfully tested in CGAL-6.2-Ic-141 |
| * | ||
| * See `CGAL::Polygon_mesh_processing::kernel()` for a comprehensive description of the parameters. | ||
| * | ||
| * In addition to the parameters available in `CGAL::Polygon_mesh_processing::kernel()`, the following parameter is also available: |
There was a problem hiding this comment.
| * In addition to the parameters available in `CGAL::Polygon_mesh_processing::kernel()`, the following parameter is also available: | |
| * In addition to the parameters available in `CGAL::Polygon_mesh_processing::kernel()`, the following named parameter is also available: |
| 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)); | ||
| }; |
There was a problem hiding this comment.
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)?
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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
Summary of Changes
Add a parameter "require_strictly_inside" to the function "PMP::kernel_point()".
If the parameter is
trueand the kernel of the input mesh is degenerated, the function returns nothing instead of a point on the boundary of the kernel.Release Management