Commit Graph

4912 Commits

Author SHA1 Message Date
lvalque cc593c35d8 Merge branch 'CGAL:master' into PMP_triangle_soup_rounding-GF 2025-03-18 15:47:50 +01:00
lvalque 26debef54a Update Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/autorefinement.h
Co-authored-by: Andreas Fabri <andreas.fabri@geometryfactory.com>
2025-03-18 09:03:20 +01:00
Léo Valque aa765c2332 Add variant where cluster of points are round to the closest of them to the voxel center instead of the voxel center 2025-03-14 13:58:45 +01:00
Léo Valque 5404b37aa2 correct typo in function name 2025-03-13 19:04:13 +01:00
Léo Valque ebbd529ef6 Modify soup_triangles_snap_rounding to support a visitor 2025-03-13 18:57:12 +01:00
Léo Valque 765aa430a2 Fix warnings and compile error 2025-03-04 11:41:29 +01:00
Léo Valque 4200d928ff Reduce default number of iterations 2025-03-03 16:03:55 +01:00
Léo Valque f615b6537d missing word in the doc 2025-03-03 15:33:36 +01:00
Léo Valque 15e80b0a78 solved conflict 2025-03-03 15:26:25 +01:00
lvalque b99ae574d1 Clean doc autorefine snap_grid_size description
Co-authored-by: Sebastien Loriot <sloriot.ml@gmail.com>
2025-02-28 11:45:47 +01:00
lvalque 05ecac919d Clean doc autorefine return description
Co-authored-by: Sebastien Loriot <sloriot.ml@gmail.com>
2025-02-28 11:45:00 +01:00
lvalque 88bad8a2e5 Clean doc autorefine
Co-authored-by: Sebastien Loriot <sloriot.ml@gmail.com>
2025-02-28 11:44:23 +01:00
Léo Valque 3b29156f29 Bug solved: Shift before ceil was in the wrong direction 2025-02-25 09:41:09 +01:00
Léo Valque 20e54eb8fd reintroduced #ifdef CGAL_LINKED_WITH_TBB 2025-02-20 09:14:01 +01:00
Léo Valque 0bbaa2a661 replace #ifdef CGAL_LINED_WITH_TBB by constexpr 2025-02-19 17:33:57 +01:00
Léo Valque 09239da179 rename snap_polygon_soup to triangle_soup_snap_rounding and fix bug in snap_polygon_soup.cpp 2025-02-19 11:36:20 +01:00
Léo Valque 9b84d4c73c rename do_snap to apply_iterative_snap_rounding, remove trailing whitespace 2025-02-17 18:09:04 +01:00
Léo Valque ac7bf3c45f Doc modification of autorefine and Polygon mesh processing 2025-02-17 15:44:10 +01:00
Léo Valque d4e66753ad made snap polygon soup an option of autorefine_triangle_soup 2025-02-17 14:17:45 +01:00
Sébastien Loriot 06b511cc65 Merge pull request #6088 from sloriot/PMP-add_discrete_curvature
Add functions to compute discrete curvatures
2025-02-12 21:22:40 +01:00
Léo Valque 8079f69f8b Add some parallellisation 2025-02-12 13:16:43 +01:00
Léo Valque 64c4fd25a9 ceil for negative rational and comments 2025-02-12 10:51:31 +01:00
Léo Valque aef30f0e9d Write a generic ceil function to use snap_polygon_soup with various number type; tested with EPECK et EPICK 2025-02-11 17:01:10 +01:00
Léo Valque 4d4763fa8b Fig a bug when the scaling have a negative exponent 2025-02-07 10:15:49 +01:00
Mael Rouxel-Labbé 07d7615d91 Require a FaceGraph for boundary checks 2025-02-06 10:16:10 +01:00
Léo Valque 3dc12cd8fb New alternative version of snap_polygon_soup for testing 2025-02-04 16:15:08 +01:00
Léo Valque 3811271150 add more verbose in snap_polygon_soup 2025-02-04 15:17:20 +01:00
Léo Valque 3a64fe3fcd add number_of_iterations as a named parameter for snap_polygon_soup 2025-02-04 14:11:28 +01:00
Léo Valque 14ccffcd13 Doc, verbose and named parameter of snap_polygon_soup 2025-02-04 13:51:53 +01:00
Léo Valque 3787d4b0ac Add snap polygon soup to PMP 2025-02-04 11:26:46 +01:00
Sébastien Loriot 107f3696dc boost::tie -> std::tie 2025-01-24 14:20:00 +01:00
Sebastien Loriot db45571323
refactor: remove duplicate header file inclusion (#8692)
## Summary of Changes

remove duplicate header file inclusion

## Release Management

* Affected package(s): Polygon_mesh_processing
2025-01-22 10:46:18 +01:00
Sébastien Loriot 6d20c44ccf Merge remote-tracking branch 'cgal/6.0.x-branch' 2025-01-17 18:52:55 +01:00
zfb132 d5d01a4d32
refactor: remove duplicate header file inclusion 2025-01-15 23:34:10 +08:00
Jane Tournois 8e0ebb9a39 update status of border edges when removing a (degenerate) border face 2025-01-10 13:42:33 +00:00
Mael Rouxel-Labbé c418aea7c2 Document PMP/curvature.h 2025-01-10 13:11:21 +01:00
Mael Rouxel-Labbé db297d7eff Handle boundary vertices in angle_sum 2025-01-10 13:10:33 +01:00
Mael Rouxel-Labbé 26005e59f3 Fix compilation 2025-01-10 13:10:16 +01:00
Mael Rouxel-Labbé 6d68861f1e Move PMP/curvature.h outside of 'internal' 2025-01-10 11:40:50 +01:00
Mael Rouxel-Labbé d7791980d1 Move separator 2025-01-10 11:40:10 +01:00
albert-github f5ec9b05b7 Spelling correction
Spelling correction

Note: we also have a similar spelling error in:
```
Surface_mesh_skeletonization/benchmark/Surface_mesh_skeletonization/mcf_scale_invariance.cpp:104:  output.open("correspondance.cgal");
Surface_mesh_skeletonization/examples/Surface_mesh_skeletonization/MCF_Skeleton_example.cpp:68:  output.open("correspondance-poly.polylines.txt");
Surface_mesh_skeletonization/examples/Surface_mesh_skeletonization/MCF_Skeleton_LCC_example.cpp:66:  output.open("correspondance-lcc.polylines.txt");
Surface_mesh_skeletonization/examples/Surface_mesh_skeletonization/MCF_Skeleton_om_example.cpp:75:  output.open("correspondance-sm.polylines.txt");
Surface_mesh_skeletonization/examples/Surface_mesh_skeletonization/MCF_Skeleton_sm_example.cpp:67:  output.open("correspondance-sm.polylines.txt");
Surface_mesh_skeletonization/examples/Surface_mesh_skeletonization/simple_mcfskel_example.cpp:72:  output.open("correspondance-poly.polylines.txt");
Surface_mesh_skeletonization/examples/Surface_mesh_skeletonization/simple_mcfskel_LCC_example.cpp:72:  output.open("correspondance-lcc.polylines.txt");
Surface_mesh_skeletonization/examples/Surface_mesh_skeletonization/simple_mcfskel_sm_example.cpp:51:  output.open("correspondance-sm.polylines.txt");
```
but as this in filenames I didn't change it.
2024-12-23 15:23:47 +01:00
Sébastien Loriot f5f5dc7244 Merge remote-tracking branch 'cgal/6.0.x-branch' into HEAD 2024-12-23 09:40:20 +01:00
Sébastien Loriot cb3e182284 Merge remote-tracking branch 'cgal/5.6.x-branch' into HEAD 2024-12-23 09:38:35 +01:00
Sebastien Loriot 06fa730c75
Flip it if you can't collapse it (#8609)
if a needle is also a cap, it will be handled as a needle only. But if
we can't collapse the edge, a flip will not be tried. Try the flip too.

Note that this will slow down the method as the status of a triangle is
tested twice.

Fix #8605
2024-12-23 09:34:33 +01:00
Sebastien Loriot b55bdc0103
Fix link to replacement function (#8657)
## Release Management

* Affected package(s): `Polygon_mesh_processing`
* Issue(s) solved (if any): -
* Feature/Small Feature (if any): -
* License and copyright ownership: no change
2024-12-23 09:33:22 +01:00
Sébastien Loriot 8bc0b888b8 clean up patch and make filling lazy 2024-12-18 11:42:10 +01:00
Sébastien Loriot a6f7b3c163 WIP handle nested coplanar CC 2024-12-18 11:37:14 +01:00
Mael Rouxel-Labbé 4efaa1e9cb Fix link to replacement function 2024-12-13 11:57:30 +01:00
Mael Rouxel-Labbé 373ad84461 Improve discrete curvature implementation 2024-12-10 21:17:36 +01:00
Sébastien Loriot 078053314e Merge remote-tracking branch 'cgal/6.0.x-branch' in master 2024-12-10 16:33:32 +01:00
Sébastien Loriot 3fa3568e6b Merge remote-tracking branch 'cgal/5.6.x-branch' into cgal/6.0.x-branch 2024-12-10 16:32:33 +01:00
Sebastien Loriot 289a8bda49
`PMP::isotropic_remeshing()` - fix relaxation of constrained vertices (#8604)
## Summary of Changes

Constrained vertices, and constrained edges were not properly protected
during the smoothing step.

## Release Management

* Affected package(s): PMP
* Issue(s) solved (if any): fix #8388
* License and copyright ownership: unchanged
2024-12-10 16:30:25 +01:00
Sébastien Loriot 0737a8f99b do not put all the faces of the mesh in the hash map 2024-12-10 15:58:53 +01:00
Sébastien Loriot c3e4e32fb7 factorize cap checks 2024-12-10 15:37:53 +01:00
Sébastien Loriot 116c0ec5d9 only use one container for the next loop
--> make the output of the function idempotent
2024-12-10 15:18:24 +01:00
Mael Rouxel-Labbé b24e6509fe Merge remote-tracking branch 'cgal/master' into PMP-add_discrete_curvature 2024-12-09 11:40:20 +01:00
Mael Rouxel-Labbé e8602e1f4e Use modern typedefs 2024-12-07 23:50:02 +01:00
Mael Rouxel-Labbé 25cd25c477 Tiny indentation fix 2024-12-07 23:49:55 +01:00
Mael Rouxel-Labbé a0e319e67b Re-attach convenience overloads to their respective main function 2024-12-07 23:43:07 +01:00
Mael Rouxel-Labbé f2299f844f Use plural for the all-vertices function 2024-12-07 23:42:49 +01:00
Mael Rouxel-Labbé 693fd25174 Use a capital 'G' 2024-12-07 23:42:31 +01:00
Mael Rouxel-Labbé 0fe940555d Fix namespace 2024-12-07 23:41:38 +01:00
Mael Rouxel-Labbé eb668da9ea Misc cleaning 2024-12-07 23:34:23 +01:00
Mael Rouxel-Labbé fda7b1ae6a Avoid a lot of useless shape predicate calls
Here are some changes:
- Avoid a lot of redundant calls of is_it_a_needle / is_it_a_cap
  - Do not test for cap-ness if it's already a needle
  - Do not fill both ranges at the beginning, but fill
    with everything: on the first round, needle-ness will
    be tested, and the exit towards cap-ness will happen
  - Wait for a needle to no longer be a needle, or not be
    treatable to actually test cap-ness
- When the mesh is modified, do not test everything immediately,
  just put them in the queue of the next iteration

Result: Fewer calls to shape predicates

- master -
needle calls = 828 668
cap calls = 803 330

- PR -
needle calls = 803 554
cap calls = 795 317

Should be fewer but two effects are balacing each other for the calls:
- much fewer calls to shape predicates (is_it_a_needle, is_it_a_cap)
  by not calling until absolutely necessary (but still checking at pop time).
- when we modify the mesh, I no longer fill the CURRENT cap and needle
  ranges, but the next ones. The point is to really prioritize all caps
  BEFORE treating needles, whereas otherwise we would treat some needles
  at the current iteration while there are still caps to treat.
So there are more iterations which add more useless calls (see below)
2024-12-07 23:31:57 +01:00
Mael Rouxel-Labbé a4cb48a145 Fix never trying again a user-rejected cap 2024-12-07 23:29:04 +01:00
Mael Rouxel-Labbé eb5ff9b33e Fix collect_badly_shaped_triangles not actually filling both ranges 2024-12-07 23:28:20 +01:00
Sébastien Loriot cac285d097 no need to redo new node propagation if it was already been done once 2024-12-06 17:19:01 +01:00
Sébastien Loriot 0b3c27e584 swap the parameters also here 2024-11-21 09:04:17 +01:00
Sébastien Loriot 41d37ac2a9 split badly shaped triangle check and delay the check calls 2024-11-20 09:40:13 +01:00
Sébastien Loriot b60b203c56 add missing cap collection in case of non-collapsed edge 2024-11-20 09:11:48 +01:00
Jane Tournois 21e1ff113a vertex is constrained if NOT allowed to move 2024-11-18 16:17:19 +01:00
Sébastien Loriot c9c1770c18 in case an edge is both a cap and a needle but that is not collapsable try to flip 2024-11-14 11:54:48 +01:00
albert-github 1320a1d497 Spelling correction
Spelling correction
2024-11-14 10:22:43 +01:00
Jane Tournois 7462b70bec remove unused 2024-11-12 14:01:30 +01:00
Jane Tournois b8165f62de add is_move_allowed(v) and use it in tangential_relaxation_impl() 2024-11-08 16:57:42 +01:00
Jane Tournois ec1d43afbe add constrained vertices to pmap 2024-11-08 16:11:11 +01:00
Andreas Fabri fcf062bf48 PMP: Initialize to avoid warning 2024-11-08 10:13:26 +00:00
albert-github dd02af92a2 issue #8515 Spelling mistakes found checking `en-GB` to `en-US`
Spelling corrections, `en-GB` -> `en-US`
2024-10-05 11:28:29 +02:00
Laurent Rineau e1c1582c08 Merge pull request #8210 from janetournois/PMP-allow_move_example-jtournois
PMP isotropic_remeshing - add example using `allow_move_functor`

# Conflicts:
#	Polygon_mesh_processing/doc/Polygon_mesh_processing/examples.txt
2024-09-27 11:49:59 +02:00
Jane Tournois eabb4dc756 remove border degenerate faces, fixed 2024-08-26 10:21:41 +02:00
Jane Tournois c7ce0e43b8 remove boundary degenerate faces 2024-08-26 10:06:08 +02:00
Sébastien Loriot 152fd4d74e do no flip if creating a degenerate face 2024-08-20 17:25:32 +02:00
Sébastien Loriot 2577ecea27 fix initialization
bug introduced #7712
2024-07-05 13:01:45 +02:00
Laurent Rineau a800918665 Merge pull request #8276 from sloriot/PMP-split_visitor_fwd
Forward the visitor for split
2024-06-13 12:48:47 +02:00
Laurent Rineau 6f4b598b6a Merge pull request #8278 from albert-github/feature/bug_spell_20240511
Spelling correction
2024-06-13 12:48:43 +02:00
Laurent Rineau 212a323e4d Merge pull request #8276 from sloriot/PMP-split_visitor_fwd
Forward the visitor for split
2024-06-13 12:48:22 +02:00
Laurent Rineau ff6e9d262b Merge pull request #8272 from sloriot/PMP-coref_use_size_type
Fix iteration on dynamic bit set
2024-06-12 10:06:06 +02:00
albert-github c35a0a7f11 Spelling correction
Spelling correction due to updated dictionary.
(dictionary was updated after the previous spelling correction :-( )
2024-06-11 10:12:12 +02:00
Sébastien Loriot 4cd04080b3 forward the visitor 2024-06-11 09:08:33 +02:00
Sébastien Loriot 174a1d68e0 avoid potentially infinite loop 2024-06-10 15:07:25 +02:00
albert-github 36c8b7589d Spelling corrections
Last batch (for now) of spelling corrections in doxygen and normal comments
2024-05-31 19:05:34 +02:00
Sébastien Loriot 279ddde799 more to core 2024-05-24 17:03:18 +02:00
Jane Tournois de9eccf316 functor is not unary! 2024-05-17 15:41:29 +02:00
Laurent Rineau 022b19d3ca Merge pull request #8057 from sloriot/AABB_tree-2d_and_3d
Updating the AABB-tree to work in both 2D and 3D
2024-05-15 16:12:19 +02:00
Laurent Rineau 0dcb83bff8 Merge pull request #8142 from sloriot/PMP-coref_nm_out
Add extra parameters to the corefinement visitor to handle non-manifold output
2024-05-15 16:12:16 +02:00
Laurent Rineau 02ad5d6003 Merge pull request #8150 from janetournois/PMP-isotropic_remeshing_with_allow_move_functor-jtournois
PMP::isotropic_remeshing() - add NP `allow move functor`
2024-05-15 16:12:14 +02:00
Laurent Rineau f260a22a64 Merge pull request #8160 from sloriot/PMP-coref_with_less_bbox
PMP corefinement: only allocate necessary bboxes
2024-05-15 16:12:09 +02:00
Laurent Rineau 87fe13fcf6 Merge pull request #8168 from sloriot/PMP-remesh_doc
Update parameter description
2024-05-15 16:12:07 +02:00
Laurent Rineau 76809fa947 Merge pull request #8178 from sloriot/PMP-shorten_params
Rename parameters
2024-05-15 16:06:06 +02:00
Sébastien Loriot 6291a4f62d also rename input nps 2024-05-06 09:50:18 +02:00