diff --git a/src/ifcgeom/schema/mapping.cpp b/src/ifcgeom/schema/mapping.cpp index 51a29a32a1..7dfba8bb4a 100644 --- a/src/ifcgeom/schema/mapping.cpp +++ b/src/ifcgeom/schema/mapping.cpp @@ -1205,11 +1205,23 @@ taxonomy::item* mapping::map_impl(const IfcSchema::IfcRectangleProfileDef* inst) }); } -taxonomy::item* mapping::map_impl(const IfcSchema::IfcArbitraryClosedProfileDef* l) { - auto loop = map(l->OuterCurve()); +taxonomy::item* mapping::map_impl(const IfcSchema::IfcArbitraryClosedProfileDef* inst) { + auto loop = map(inst->OuterCurve()); if (loop) { auto face = new taxonomy::face; + ((taxonomy::loop*)loop)->external = true; face->children = { loop }; + if (inst->as()) { + auto with_voids = inst->as(); + auto voids = with_voids->InnerCurves(); + for (auto& v : *voids) { + auto inner_loop = map(v); + if (inner_loop) { + ((taxonomy::loop*)inner_loop)->external = false; + face->children.push_back(inner_loop); + } + } + } return face; } else { return nullptr; diff --git a/src/ifcgeom/schema/mapping.i b/src/ifcgeom/schema/mapping.i index 2ea4d901c5..f743319b09 100644 --- a/src/ifcgeom/schema/mapping.i +++ b/src/ifcgeom/schema/mapping.i @@ -72,7 +72,7 @@ BIND(IfcHalfSpaceSolid); // BIND(IfcSurfaceCurveSweptAreaSolid); // BIND(IfcSweptDiskSolid); -// BIND(IfcArbitraryProfileDefWithVoids); +// IfcArbitraryProfileDefWithVoids included BIND(IfcArbitraryClosedProfileDef); // BIND(IfcRoundedRectangleProfileDef); // BIND(IfcRectangleHollowProfileDef);