lundi 13 juillet 2020

How to set random seed for CGAL Mesh Skeletonization processes

I write unit tests for function that use CGAL Mesh Skeletonization processes. As this CGAL process is randomized, results differ at each executiion.

This function uses: CGAL::Mean_curvature_flow_skeletonization<Polyhedron>::contract_until_convergence and convert_to_skeleton

https://doc.cgal.org/latest/Surface_mesh_skeletonization/classCGAL_1_1Mean__curvature__flow__skeletonization.html

For my unit tests, I try to set the same seed to CGAL::Random object, but as this object is not used by skeletonizer processes, they still produced different result a each execution.

Is it possible to fix random generator for CGAL in order to always obtain the same output with the same input ?

Thank you for your help.




Aucun commentaire:

Enregistrer un commentaire