cgal icon indicating copy to clipboard operation
cgal copied to clipboard

Add do_snap parameter to PMP::autorefine_triangle_soup

Open LeoValque opened this issue 10 months ago • 14 comments

Summary of Changes

The PR adds the do_snap parameter to autorefine_triangle_soup(). When set to true, the coordinates are rounded to fit in double with additional subdivisions, preventing any self-intersections from occurring.

Todo

  • [x] Add to change log

Release Management

  • Affected package(s): PMP
  • Issue(s) solved (if any):
  • Feature/Small Feature (if any): link
  • Link to compiled documentation (obligatory for small feature) wrong link name to be changed
  • License and copyright ownership: GeometryFactory

LeoValque avatar Feb 17 '25 14:02 LeoValque

What do you think of apply_iterative_snap_rounding() ? cc @MaelRL

sloriot avatar Feb 17 '25 16:02 sloriot

do you suggest to create a new function apply_iterative_snap_rounding() or simply to rename the parameter do_snap to apply_iterative_snap_rounding ?

LeoValque avatar Feb 17 '25 16:02 LeoValque

do you suggest to create a new function apply_iterative_snap_rounding() or simply to rename the parameter do_snap to apply_iterative_snap_rounding ?

renaming the named parameter, provided Mael thinks it is a better name too.

sloriot avatar Feb 17 '25 16:02 sloriot

What do you think of apply_iterative_snap_rounding() ? cc @MaelRL

I do not like an apply_ prefix. Did you have a look at the existing function for 2D

afabri avatar Feb 17 '25 17:02 afabri

What do you think of apply_iterative_snap_rounding() ? cc @MaelRL

I do not like an apply_ prefix. Did you have a look at the existing function for 2D

note that's a named parameter, not a free function

sloriot avatar Feb 17 '25 17:02 sloriot

What do you think of apply_iterative_snap_rounding() ? cc @MaelRL

I do not like an apply_ prefix. Did you have a look at the existing function for 2D

note that's a named parameter, not a free function

there is already the named parameter : apply_per_connected_component()

sloriot avatar Feb 17 '25 17:02 sloriot

What do you think of apply_iterative_snap_rounding() ? cc @MaelRL

OK, but I also meant the function snap_polygon_soup(): even if it's internal, best to still avoid naming similarities.

MaelRL avatar Feb 18 '25 07:02 MaelRL

What do you think of apply_iterative_snap_rounding() ? cc @MaelRL

OK, but I also meant the function snap_polygon_soup(): even if it's internal, best to still avoid naming similarities.

for that one it could be internal::polygon_soup_snap_rounding()

sloriot avatar Feb 18 '25 18:02 sloriot

/Users/magritte/cgal_root/CGAL-6.1-Ic-91/include/CGAL/Polygon_mesh_processing/internal/snap_polygon_soup.h:138:13: warning: unused variable 'pm' [-Wunused-variable]
/Users/magritte/cgal_root/CGAL-6.1-Ic-91/include/CGAL/Polygon_mesh_processing/internal/snap_polygon_soup.h:136:9: warning: unused type alias 'GT' [-Wunused-local-typedef]
/mnt/testsuite/include/CGAL/Polygon_mesh_processing/internal/snap_polygon_soup.h:223:5: warning: this 'else' clause does not guard... [-Wmisleading-indentation]

and PMP examples fully red https://cgal.geometryfactory.com/CGAL/testsuite/summary-6.1-Ic-91.html?package=Polygon_mesh_processing_Examples

sloriot avatar Feb 19 '25 06:02 sloriot

PMP test/examples are fully red. See for example here

sloriot avatar May 02 '25 06:05 sloriot

Successfully tested in CGAL-6.1-Ic-155

sloriot avatar May 16 '25 10:05 sloriot

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

github-actions[bot] avatar May 19 '25 07:05 github-actions[bot]

Successfully tested in CGAL-6.1-Ic-170

sloriot avatar Jun 10 '25 15:06 sloriot

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

github-actions[bot] avatar Jun 10 '25 16:06 github-actions[bot]

Successfully tested in CGAL-6.1-Ic-184

sloriot avatar Jun 26 '25 19:06 sloriot