Fixes for spatial tree on iterator and positive extend param

This commit is contained in:
Thomas Krijnen
2021-05-08 13:04:22 +02:00
parent a80fbdbc1d
commit 28081f7df8
+8 -3
View File
@@ -166,8 +166,11 @@ namespace IfcGeom {
std::vector<T> ts;
if (IfcGeom::Kernel::count(s, TopAbs_SHELL) == 0) {
return ts;
if (extend < 0.) {
// Shell are only required when we do the boolean based intersection check
if (IfcGeom::Kernel::count(s, TopAbs_SHELL) == 0) {
return ts;
}
}
ts = select_box(bb, completely_within);
@@ -288,7 +291,9 @@ namespace IfcGeom {
if (it.initialize()) {
do {
IfcGeom::BRepElement<double>* elem = (IfcGeom::BRepElement<double>*)it.get();
add((IfcUtil::IfcBaseEntity*)it.file()->instance_by_id(elem->id()), elem->geometry().as_compound());
auto compound = elem->geometry().as_compound();
compound.Move(elem->transformation().data());
add((IfcUtil::IfcBaseEntity*)it.file()->instance_by_id(elem->id()), compound);
} while (it.next());
}
}