mirror of https://github.com/CGAL/cgal
move clear_cells_and_facets_from_c3t3() inside the constructor of Mesher_3
to make sure the input c3t3 is fully clean before starting refinement
This commit is contained in:
parent
24cbbc689f
commit
83c88da327
|
|
@ -404,6 +404,13 @@ Mesher_3<C3T3,MC,MD>::Mesher_3(C3T3& c3t3,
|
||||||
cells_mesher_.set_stop_pointer(stop_ptr);
|
cells_mesher_.set_stop_pointer(stop_ptr);
|
||||||
facets_mesher_.set_stop_pointer(stop_ptr);
|
facets_mesher_.set_stop_pointer(stop_ptr);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// First surface mesh could modify c3t3 without notifying cells_mesher
|
||||||
|
// So we have to ensure that no old cell will be left in c3t3
|
||||||
|
// Second, the c3t3 object could have been corrupted since the last call
|
||||||
|
// to `refine_mesh`, for example by inserting new vertices in the
|
||||||
|
// triangulation.
|
||||||
|
r_c3t3_.clear_cells_and_facets_from_c3t3();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -424,13 +431,6 @@ refine_mesh(std::string dump_after_refine_surface_prefix)
|
||||||
auto refine_volume_mesh_task_handle = __itt_string_handle_create("Mesher_3 refine volume mesh");
|
auto refine_volume_mesh_task_handle = __itt_string_handle_create("Mesher_3 refine volume mesh");
|
||||||
#endif // CGAL_MESH_3_USE_INTEL_ITT
|
#endif // CGAL_MESH_3_USE_INTEL_ITT
|
||||||
|
|
||||||
// First surface mesh could modify c3t3 without notifying cells_mesher
|
|
||||||
// So we have to ensure that no old cell will be left in c3t3
|
|
||||||
// Second, the c3t3 object could have been corrupted since the last call
|
|
||||||
// to `refine_mesh`, for example by inserting new vertices in the
|
|
||||||
// triangulation.
|
|
||||||
r_c3t3_.clear_cells_and_facets_from_c3t3();
|
|
||||||
|
|
||||||
const Triangulation& r_tr = r_c3t3_.triangulation();
|
const Triangulation& r_tr = r_c3t3_.triangulation();
|
||||||
CGAL_USE(r_tr);
|
CGAL_USE(r_tr);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue