Skip to content

Mesh_2: Make lloyd_optimize_mesh_2() deterministic #8768

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Mar 28, 2025

Conversation

afabri
Copy link
Member

@afabri afabri commented Mar 4, 2025

Summary of Changes

Replace a std::set<Vertex_handle> by a std::set<std::pair<std::size_t,Vertex_handle>> to make traversing the set deterministic.
At the same time, do not erase() a key, but an iterator.

Release Management

@afabri afabri requested a review from janetournois March 4, 2025 16:40
@afabri afabri self-assigned this Mar 4, 2025
@afabri afabri added this to the 6.1-beta milestone Mar 4, 2025
@janetournois
Copy link
Member

you should add a test similar to what we have in Mesh_3 to avoid regressions

@afabri
Copy link
Member Author

afabri commented Mar 4, 2025

you should add a test similar to what we have in Mesh_3 to avoid regressions

I plan to add the code of the issue.

@sloriot sloriot removed the TODO label Mar 17, 2025
@sloriot
Copy link
Member

sloriot commented Mar 24, 2025

https://cgal.geometryfactory.com/CGAL/testsuite/CGAL-6.1-Ic-114/Mesh_2/TestReport_gimeno_Ubuntu-Latest-NO_DEPRECATED_CODE.gz

/mnt/testsuite/test/Mesh_2/issue8719.cpp:69:35: error: ‘class CGAL::Delaunay_mesh_vertex_base_2<CGAL::Epick, CGAL::Triangulation_vertex_base_2<CGAL::Epick, CGAL::Triangulation_ds_vertex_base_2<CGAL::Triangulation_data_structure_2<CGAL::Delaunay_mesh_vertex_base_2<CGAL::Epick>, CGAL::Delaunay_mesh_face_base_2<CGAL::Epick> > > > >’ has no member named ‘handle’
   69 |     CDT::Vertex_handle vh = v_it->handle();
      |                                   ^~~~~~

@sloriot
Copy link
Member

sloriot commented Mar 28, 2025

Successfully tested in CGAL-6.1-Ic-119

@sloriot sloriot merged commit 3fa6e77 into CGAL:master Mar 28, 2025
9 checks passed
@sloriot sloriot deleted the Mesh_2-deterministic_again-GF branch March 28, 2025 17:04
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.

CGAL Remesh , output result has randomness
4 participants