Advanced brep, sweeps and various fixes #4848 #4895

This commit is contained in:
Thomas Krijnen
2024-07-03 14:36:35 +02:00
parent 9485190604
commit d4efcd40f9
19 changed files with 537 additions and 219 deletions
+20 -1
View File
@@ -7,9 +7,28 @@ using namespace ifcopenshell::geometry::kernels;
using namespace IfcGeom;
using namespace IfcGeom::util;
namespace {
// @todo move into taxonomy;
bool shell_polyhedral(const taxonomy::shell::ptr& sh) {
for (auto& f : sh->children) {
for (auto& w : f->children) {
if (!w->is_polyhedron()) {
return false;
}
}
if (f->basis && f->basis->kind() != taxonomy::PLANE) {
return false;
}
}
return true;
}
}
bool OpenCascadeKernel::convert(const taxonomy::shell::ptr l, TopoDS_Shape& shape) {
std::unique_ptr<faceset_helper> helper_scope;
helper_scope.reset(new faceset_helper(this, l));
if (shell_polyhedral(l)) {
helper_scope.reset(new faceset_helper(this, l));
}
faceset_helper_ = helper_scope.get();