Initialize the face_patch_id_t pmap before adding to the AABB tree

This commit is contained in:
Laurent Rineau 2019-02-12 14:38:01 +01:00
parent ef48d053ad
commit 24bccaa8ff
1 changed files with 9 additions and 9 deletions

View File

@ -137,7 +137,7 @@ public:
{
stored_polyhedra.resize(1);
stored_polyhedra[0] = p;
get(CGAL::face_patch_id_t<Patch_id>(), stored_polyhedra[0]);
get(face_patch_id_t<Patch_id>(), 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<Patch_id>(), stored_polyhedra[0]);
get(face_patch_id_t<Patch_id>(), 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<Patch_id>(), stored_polyhedra[0]);
get(CGAL::face_patch_id_t<Patch_id>(), stored_polyhedra[1]);
}
template <typename InputPolyhedraPtrIterator>
@ -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<Patch_id>(), stored_polyhedra.back());
this->add_primitives(stored_polyhedra.back());
get(CGAL::face_patch_id_t<Patch_id>(), 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<Patch_id>(), stored_polyhedra.back());
this->add_primitives(stored_polyhedra.back());
get(CGAL::face_patch_id_t<Patch_id>(), stored_polyhedra.back());
}
stored_polyhedra.push_back(bounding_polyhedron);
this->add_primitives(stored_polyhedra.back());
get(CGAL::face_patch_id_t<Patch_id>(), stored_polyhedra.back());
}
stored_polyhedra.push_back(bounding_polyhedron);
get(face_patch_id_t<Patch_id>(), 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<Patch_id>(), stored_polyhedra[0]);
this->add_primitives(stored_polyhedra[0]);
get(CGAL::face_patch_id_t<Patch_id>(), stored_polyhedra[0]);
this->build();
}