diff --git a/src/ifcgeom/mapping/IfcExtrudedAreaSolid.cpp b/src/ifcgeom/mapping/IfcExtrudedAreaSolid.cpp index fcdff6952f..77fbe846d4 100644 --- a/src/ifcgeom/mapping/IfcExtrudedAreaSolid.cpp +++ b/src/ifcgeom/mapping/IfcExtrudedAreaSolid.cpp @@ -49,10 +49,28 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcExtrudedAreaSolid* inst) { } #endif - return taxonomy::make( - matrix, - taxonomy::cast(map(inst->SweptArea())), - taxonomy::cast(map(inst->ExtrudedDirection())), - height - ); + auto basis = map(inst->SweptArea()); + if (auto bases = taxonomy::dcast(basis)) { + // @todo this requires a unified approach for all sweeps + auto c = taxonomy::make(); + for (auto& f : bases->children) { + c->children.push_back( + taxonomy::make( + matrix, + taxonomy::cast(f), + taxonomy::cast(map(inst->ExtrudedDirection())), + height + ) + ); + c->children.back()->instance = inst; + } + return c; + } else { + return taxonomy::make( + matrix, + taxonomy::cast(basis), + taxonomy::cast(map(inst->ExtrudedDirection())), + height + ); + } }