mirror of https://github.com/CGAL/cgal
Initialize the face_patch_id_t pmap before adding to the AABB tree
This commit is contained in:
parent
ef48d053ad
commit
24bccaa8ff
|
|
@ -137,7 +137,7 @@ public:
|
||||||
{
|
{
|
||||||
stored_polyhedra.resize(1);
|
stored_polyhedra.resize(1);
|
||||||
stored_polyhedra[0] = p;
|
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->add_primitives(stored_polyhedra[0]);
|
||||||
this->build();
|
this->build();
|
||||||
}
|
}
|
||||||
|
|
@ -172,6 +172,8 @@ public:
|
||||||
stored_polyhedra.resize(2);
|
stored_polyhedra.resize(2);
|
||||||
stored_polyhedra[0] = p;
|
stored_polyhedra[0] = p;
|
||||||
stored_polyhedra[1] = bounding_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[0]);
|
||||||
this->add_primitives(stored_polyhedra[1]);
|
this->add_primitives(stored_polyhedra[1]);
|
||||||
if(CGAL::is_empty(bounding_p)) {
|
if(CGAL::is_empty(bounding_p)) {
|
||||||
|
|
@ -179,8 +181,6 @@ public:
|
||||||
} else {
|
} else {
|
||||||
this->add_primitives_to_bounding_tree(stored_polyhedra[1]);
|
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>
|
template <typename InputPolyhedraPtrIterator>
|
||||||
|
|
@ -192,8 +192,8 @@ public:
|
||||||
stored_polyhedra.reserve(std::distance(begin, end));
|
stored_polyhedra.reserve(std::distance(begin, end));
|
||||||
for (; begin != end; ++begin) {
|
for (; begin != end; ++begin) {
|
||||||
stored_polyhedra.push_back(**begin);
|
stored_polyhedra.push_back(**begin);
|
||||||
|
get(face_patch_id_t<Patch_id>(), stored_polyhedra.back());
|
||||||
this->add_primitives(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->set_surface_only();
|
||||||
this->build();
|
this->build();
|
||||||
|
|
@ -210,13 +210,13 @@ public:
|
||||||
if(begin != end) {
|
if(begin != end) {
|
||||||
for (; begin != end; ++begin) {
|
for (; begin != end; ++begin) {
|
||||||
stored_polyhedra.push_back(**begin);
|
stored_polyhedra.push_back(**begin);
|
||||||
|
get(face_patch_id_t<Patch_id>(), stored_polyhedra.back());
|
||||||
this->add_primitives(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()) {
|
if(bounding_polyhedron.empty()) {
|
||||||
this->set_surface_only();
|
this->set_surface_only();
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -252,8 +252,8 @@ private:
|
||||||
std::ifstream input(filename);
|
std::ifstream input(filename);
|
||||||
stored_polyhedra.resize(1);
|
stored_polyhedra.resize(1);
|
||||||
input >> stored_polyhedra[0];
|
input >> stored_polyhedra[0];
|
||||||
|
get(face_patch_id_t<Patch_id>(), stored_polyhedra[0]);
|
||||||
this->add_primitives(stored_polyhedra[0]);
|
this->add_primitives(stored_polyhedra[0]);
|
||||||
get(CGAL::face_patch_id_t<Patch_id>(), stored_polyhedra[0]);
|
|
||||||
this->build();
|
this->build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue