From 602176815a9e9efad5fe082edf74235b506a3911 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Thu, 1 Jun 2023 21:41:08 +0200 Subject: [PATCH] Commit obsolete fix just in case --- src/ifcgeom/IfcManifoldSolidBrep.cpp | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/src/ifcgeom/IfcManifoldSolidBrep.cpp b/src/ifcgeom/IfcManifoldSolidBrep.cpp index b278997b4b..d6f2c9a842 100644 --- a/src/ifcgeom/IfcManifoldSolidBrep.cpp +++ b/src/ifcgeom/IfcManifoldSolidBrep.cpp @@ -17,8 +17,10 @@ * * ********************************************************************************/ -#include #include "../ifcgeom/IfcGeom.h" + +#include + #include #define Kernel MAKE_TYPE_NAME(Kernel) @@ -48,6 +50,25 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcManifoldSolidBrep* l, IfcRepre } } + // #3141 this is no longer activated because narrow obb operands are filtered in boolean_operation() + // + // int attribute_index = -1; + // auto attrs = IfcSchema::IfcBooleanResult::Class().all_attributes(); + // for (auto it = attrs.begin(); it != attrs.end(); ++it) { + // if ((*it)->name() == "SecondOperand") { + // attribute_index = (int) std::distance(attrs.begin(), it); + // break; + // } + // } + // + // auto used_as_boolean_2nd_operand = l->data().file->getInverse(l->data().id(), &IfcSchema::IfcBooleanResult::Class(), attribute_index); + // const bool is_used_as_boolean_2nd_operand = used_as_boolean_2nd_operand && used_as_boolean_2nd_operand->size(); + // + // if (l->Outer()->as() && is_used_as_boolean_2nd_operand && util::count(s, TopAbs_FACE) < 2) { + // Logger::Error("No enough faces retained for boolean second operand, ignoring:", l->Outer()); + // return false; + // } + shape.push_back(IfcRepresentationShapeItem(l->data().id(), s, indiv_style ? indiv_style : collective_style)); return true; }