Mesh_3 - add detection of intersection lines from labeled images
Summary of Changes
This PR introduces automatic detection of triple lines in labeled images. The constructor function
CGAL::Mesh_domain_with_polyline_features_3<Labeled_mesh_domain_3> create_labeled_image_mesh_domain_with_features(A_i&...);
creates a mesh domain, with triple lines detected and ready to be protected using Mesh_3 protecting balls.
Release Management
- Affected package(s): Mesh_3
- Small Feature: link
- Link to compiled documentation link
- License and copyright ownership: unchanged
Todo
- [x] create small feature
- [x] update changes.md
The current API of this PR is to add a function called CGAL::Mesh_3::detect_triple_lines<Word_type>(image, domain), which does not really fit the Labeled_mesh_domain (since Labeled_image_mesh_domain is deprecated).
I suggest to transform that into adding a domain creation function called create_labeled_image_mesh_domain_with_features() that would return a Mesh_domain_with_polyline_features_3<Labeled_mesh_domain_3<Gt>> . What do you think @lrineau ?
The current API of this PR is to add a function called
CGAL::Mesh_3::detect_triple_lines<Word_type>(image, domain), which does not really fit theLabeled_mesh_domain(sinceLabeled_image_mesh_domainis deprecated). I suggest to transform that into adding a domain creation function calledcreate_labeled_image_mesh_domain_with_features()that would return aMesh_domain_with_polyline_features_3<Labeled_mesh_domain_3<Gt>>. What do you think @lrineau ?
That sounds good.
/build:v1
The documentation is built. It will be available, after a few minutes, here: https://cgal.github.io/6129/v1/Manual/index.html
/force-build:v1
The documentation is built. It will be available, after a few minutes, here: https://cgal.github.io/6129/v1/Manual/index.html
Would it be a good idea to add an example subsection in the User Manual?
/force-build:v1
The documentation is built. It will be available, after a few minutes, here: https://cgal.github.io/6129/v1/Manual/index.html
We usually prefer "feature lines"
We usually prefer "feature lines"
Should not that be feature curves?
We should keep clear that we do not detect all features, but only the "triple or more" lines. We don't know how to detect sharp features that are not at the intersection of 3 subdomains yet
@ChristopherNcl You have some trailing whitespaces that should be removed.
You also have some unsued variables:
-
Mesh_3/include/CGAL/Mesh_3/features_detection/features_detection.h:1851:52: warning: unused parameter ‘prec’ [-Wunused-parameter] 1851 | std::vector<std::vector<P>> poly01121223(const int prec = 10) -
Mesh_3/include/CGAL/Mesh_3/features_detection/features_detection.h:2959:52: warning: unused parameter ‘prec’ [-Wunused-parameter]
@janetournois @lrineau Do you agree with e0f99d3 ?
Successfully tested in CGAL-5.6-Ic-34
The plugin should be tested by someone who can display the protecting balls. Protection of triple (and more) lines is performed by choosing the option "Triple+ lines detected" in the meshing dialog

Successfully tested in CGAL-5.6-Ic-39.
In this branch, the display of C3t3 generated from a polyhedral surface is broken. I'll have a look at it, but the branch can't be merged as is.
We have tested on data with 4 subdomains intersecting at one point (3 inside subdomains and the outside), the result is great!
@lrineau I think this PR can be merged, except if you want to do a last review.
@lrineau I think this PR can be merged, except if you want to do a last review.
I have actually never reviewed the documentation, so far. I'll do it today.
/build:v2
The documentation is built. It will be available, after a few minutes, here: https://cgal.github.io/6129/v2/Manual/index.html
In the polyhedron demo, open 420.inr, and mesh it with default parameters:

then the produced mesh does not have any protecting balls:

I will fix the demo issue
Actually it works. In the meshing dialog, I have added an item to the "Protect sharp edges" list, to separate protection of
- Polylines on cube, and
- Triple+ lines (including polylines on cube)

Do you think we should do it another way? Or maybe have "triple+ lines" as the default?
Maybe I have not understood. With the default option "Polyhedron on cube", I expected to have sharp features on the border of the cube (and not inside the cube), but there was none.
It's fixed. Here is now what I get
- (left) with no protection
- (middle) with protection of polylines on bbox
- (right) with protection of all detected triple lines

b98d6d6 seems to be a merge of another PR. The dependency must be indicated in the PR labels + description. IMO when no needed we should avoid such merges.