File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -442,6 +442,7 @@ def generate_from_array_with_subdomain_sizing(
442442 facet_distance = 0.0 ,
443443 cell_radius_edge_ratio = 0.0 ,
444444 verbose = True ,
445+ seed = 0 ,
445446):
446447 assert vol .dtype in ["uint8" , "uint16" ]
447448 fh , inr_filename = tempfile .mkstemp (suffix = ".inr" )
@@ -460,6 +461,7 @@ def generate_from_array_with_subdomain_sizing(
460461 facet_distance ,
461462 cell_radius_edge_ratio ,
462463 verbose ,
464+ seed ,
463465 )
464466 os .remove (inr_filename )
465467 return mesh
Original file line number Diff line number Diff line change @@ -47,9 +47,12 @@ generate_from_inr(
4747 const double facet_distance,
4848 const double cell_radius_edge_ratio,
4949 const double cell_size,
50- const bool verbose
50+ const bool verbose,
51+ const int seed
5152 )
5253{
54+ CGAL::get_default_random () = CGAL::Random (seed);
55+
5356 CGAL::Image_3 image;
5457 const bool success = image.read (inr_filename.c_str ());
5558 if (!success) {
Original file line number Diff line number Diff line change @@ -39,7 +39,8 @@ generate_from_inr_with_subdomain_sizing(
3939 const double facet_size = 0.0 ,
4040 const double facet_distance = 0.0 ,
4141 const double cell_radius_edge_ratio = 0.0 ,
42- const bool verbose = true
42+ const bool verbose = true ,
43+ const int seed = 0
4344 );
4445
4546} // namespace pygalmesh
You can’t perform that action at this time.
0 commit comments