From 24bccaa8ff94a1323aa2d9d30c9979e067c887ea Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 12 Feb 2019 14:38:01 +0100 Subject: [PATCH] Initialize the face_patch_id_t pmap before adding to the AABB tree --- .../Polyhedral_mesh_domain_with_features_3.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Mesh_3/include/CGAL/Polyhedral_mesh_domain_with_features_3.h b/Mesh_3/include/CGAL/Polyhedral_mesh_domain_with_features_3.h index 83227fc93e4..bbfbb9b5a89 100644 --- a/Mesh_3/include/CGAL/Polyhedral_mesh_domain_with_features_3.h +++ b/Mesh_3/include/CGAL/Polyhedral_mesh_domain_with_features_3.h @@ -137,7 +137,7 @@ public: { stored_polyhedra.resize(1); stored_polyhedra[0] = p; - get(CGAL::face_patch_id_t(), stored_polyhedra[0]); + get(face_patch_id_t(), stored_polyhedra[0]); this->add_primitives(stored_polyhedra[0]); this->build(); } @@ -172,6 +172,8 @@ public: stored_polyhedra.resize(2); stored_polyhedra[0] = p; stored_polyhedra[1] = bounding_p; + get(face_patch_id_t(), stored_polyhedra[0]); + get(face_patch_id_t(), stored_polyhedra[1]); this->add_primitives(stored_polyhedra[0]); this->add_primitives(stored_polyhedra[1]); if(CGAL::is_empty(bounding_p)) { @@ -179,8 +181,6 @@ public: } else { this->add_primitives_to_bounding_tree(stored_polyhedra[1]); } - get(CGAL::face_patch_id_t(), stored_polyhedra[0]); - get(CGAL::face_patch_id_t(), stored_polyhedra[1]); } template @@ -192,8 +192,8 @@ public: stored_polyhedra.reserve(std::distance(begin, end)); for (; begin != end; ++begin) { stored_polyhedra.push_back(**begin); + get(face_patch_id_t(), stored_polyhedra.back()); this->add_primitives(stored_polyhedra.back()); - get(CGAL::face_patch_id_t(), stored_polyhedra.back()); } this->set_surface_only(); this->build(); @@ -210,13 +210,13 @@ public: if(begin != end) { for (; begin != end; ++begin) { stored_polyhedra.push_back(**begin); + get(face_patch_id_t(), stored_polyhedra.back()); this->add_primitives(stored_polyhedra.back()); - get(CGAL::face_patch_id_t(), stored_polyhedra.back()); } - stored_polyhedra.push_back(bounding_polyhedron); - this->add_primitives(stored_polyhedra.back()); - get(CGAL::face_patch_id_t(), stored_polyhedra.back()); } + stored_polyhedra.push_back(bounding_polyhedron); + get(face_patch_id_t(), stored_polyhedra.back()); + this->add_primitives(stored_polyhedra.back()); if(bounding_polyhedron.empty()) { this->set_surface_only(); } else { @@ -252,8 +252,8 @@ private: std::ifstream input(filename); stored_polyhedra.resize(1); input >> stored_polyhedra[0]; + get(face_patch_id_t(), stored_polyhedra[0]); this->add_primitives(stored_polyhedra[0]); - get(CGAL::face_patch_id_t(), stored_polyhedra[0]); this->build(); }