diff --git a/src/ifcgeom/kernels/opencascade/IfcGeomShapes.cpp b/src/ifcgeom/kernels/opencascade/IfcGeomShapes.cpp index 08d1d6a09e..09c10dd964 100644 --- a/src/ifcgeom/kernels/opencascade/IfcGeomShapes.cpp +++ b/src/ifcgeom/kernels/opencascade/IfcGeomShapes.cpp @@ -824,16 +824,16 @@ bool OpenCascadeKernel::convert_impl(const taxonomy::extrusion* extrusion, ifcop return true; } -bool OpenCascadeKernel::convert_impl(const taxonomy::shell *extrusion, ifcopenshell::geometry::ConversionResults& results) { +bool OpenCascadeKernel::convert_impl(const taxonomy::shell *shell, ifcopenshell::geometry::ConversionResults& results) { TopoDS_Shape shape; - if (!convert(extrusion, shape)) { + if (!convert(shell, shape)) { return false; } results.emplace_back(ConversionResult( - extrusion->instance->data().id(), - extrusion->matrix, + shell->instance->data().id(), + shell->matrix, new OpenCascadeShape(shape), - extrusion->surface_style + shell->surface_style )); return true; } diff --git a/src/ifcgeom/schema/bind_convert_decl.i b/src/ifcgeom/schema/bind_convert_decl.i index b612616039..212c4e822d 100644 --- a/src/ifcgeom/schema/bind_convert_decl.i +++ b/src/ifcgeom/schema/bind_convert_decl.i @@ -2,6 +2,6 @@ #undef BIND #endif -#define BIND(T) ifcopenshell::geometry::taxonomy::item* map(const IfcSchema::T*); +#define BIND(T) ifcopenshell::geometry::taxonomy::item* map_impl(const IfcSchema::T*); #include "mapping.i" diff --git a/src/ifcgeom/schema/bind_convert_impl.i b/src/ifcgeom/schema/bind_convert_impl.i index 5914425f88..298c809e0e 100644 --- a/src/ifcgeom/schema/bind_convert_impl.i +++ b/src/ifcgeom/schema/bind_convert_impl.i @@ -5,7 +5,7 @@ #define BIND(T) \ if (l->declaration().is(IfcSchema::T::Class())) { \ try { \ - taxonomy::item* item = map((IfcSchema::T*)l); \ + taxonomy::item* item = map_impl((IfcSchema::T*)l); \ if (item != nullptr) { \ item->instance = l; \ try { \ diff --git a/src/ifcgeom/schema/mapping.cpp b/src/ifcgeom/schema/mapping.cpp index 3218e4355b..689a539f27 100644 --- a/src/ifcgeom/schema/mapping.cpp +++ b/src/ifcgeom/schema/mapping.cpp @@ -144,7 +144,7 @@ namespace { } }; -taxonomy::item* mapping::map(const IfcSchema::IfcExtrudedAreaSolid* inst) { +taxonomy::item* mapping::map_impl(const IfcSchema::IfcExtrudedAreaSolid* inst) { // @todo length unit return new taxonomy::extrusion( as(map(inst->Position())), @@ -154,19 +154,19 @@ taxonomy::item* mapping::map(const IfcSchema::IfcExtrudedAreaSolid* inst) { ); } -taxonomy::item* mapping::map(const IfcSchema::IfcRepresentation* inst) { +taxonomy::item* mapping::map_impl(const IfcSchema::IfcRepresentation* inst) { return map_to_collection(this, inst->Items()); } -taxonomy::item* mapping::map(const IfcSchema::IfcFaceBasedSurfaceModel* inst) { +taxonomy::item* mapping::map_impl(const IfcSchema::IfcFaceBasedSurfaceModel* inst) { return map_to_collection(this, inst->FbsmFaces()); } -taxonomy::item* mapping::map(const IfcSchema::IfcConnectedFaceSet* inst) { +taxonomy::item* mapping::map_impl(const IfcSchema::IfcConnectedFaceSet* inst) { return map_to_collection(this, inst->CfsFaces()); } -taxonomy::item* mapping::map(const IfcSchema::IfcFace* inst) { +taxonomy::item* mapping::map_impl(const IfcSchema::IfcFace* inst) { taxonomy::face* face = new taxonomy::face; auto bounds = inst->Bounds(); for (auto& bound : *bounds) { @@ -184,7 +184,7 @@ taxonomy::item* mapping::map(const IfcSchema::IfcFace* inst) { return face; } -taxonomy::item* mapping::map(const IfcSchema::IfcPolyLoop* inst) { +taxonomy::item* mapping::map_impl(const IfcSchema::IfcPolyLoop* inst) { taxonomy::loop* loop = new taxonomy::loop; taxonomy::point3 first, previous; @@ -218,7 +218,7 @@ taxonomy::item* mapping::map(const IfcSchema::IfcPolyLoop* inst) { return loop; } -taxonomy::item* mapping::map(const IfcSchema::IfcCartesianPoint* inst) { +taxonomy::item* mapping::map_impl(const IfcSchema::IfcCartesianPoint* inst) { auto coords = inst->Coordinates(); return new taxonomy::point3( coords.size() >= 1 ? coords[0] : 0., @@ -227,38 +227,38 @@ taxonomy::item* mapping::map(const IfcSchema::IfcCartesianPoint* inst) { ); } -taxonomy::item* mapping::map(const IfcSchema::IfcProduct* inst) { +taxonomy::item* mapping::map_impl(const IfcSchema::IfcProduct* inst) { auto n = new taxonomy::node; n->matrix = as(map(inst->ObjectPlacement())); return n; } -taxonomy::item* mapping::map(const IfcSchema::IfcAxis2Placement3D* inst) { +taxonomy::item* mapping::map_impl(const IfcSchema::IfcAxis2Placement3D* inst) { // @todo length unit return new taxonomy::matrix4(); } -taxonomy::item* mapping::map(const IfcSchema::IfcCartesianTransformationOperator2DnonUniform* inst) { +taxonomy::item* mapping::map_impl(const IfcSchema::IfcCartesianTransformationOperator2DnonUniform* inst) { // @todo length unit return new taxonomy::matrix4(); } -taxonomy::item* mapping::map(const IfcSchema::IfcCartesianTransformationOperator3DnonUniform* inst) { +taxonomy::item* mapping::map_impl(const IfcSchema::IfcCartesianTransformationOperator3DnonUniform* inst) { // @todo length unit return new taxonomy::matrix4(); } -taxonomy::item* mapping::map(const IfcSchema::IfcCartesianTransformationOperator2D* inst) { +taxonomy::item* mapping::map_impl(const IfcSchema::IfcCartesianTransformationOperator2D* inst) { // @todo length unit return new taxonomy::matrix4(); } -taxonomy::item* mapping::map(const IfcSchema::IfcCartesianTransformationOperator3D* inst) { +taxonomy::item* mapping::map_impl(const IfcSchema::IfcCartesianTransformationOperator3D* inst) { // @todo length unit return new taxonomy::matrix4(); } -taxonomy::item* mapping::map(const IfcSchema::IfcLocalPlacement* inst) { +taxonomy::item* mapping::map_impl(const IfcSchema::IfcLocalPlacement* inst) { // @todo length unit return new taxonomy::matrix4(); } @@ -672,7 +672,7 @@ namespace { } } -taxonomy::item* mapping::map(const IfcSchema::IfcMaterial* material) { +taxonomy::item* mapping::map_impl(const IfcSchema::IfcMaterial* material) { IfcSchema::IfcMaterialDefinitionRepresentation::list::ptr defs = material->HasRepresentation(); for (IfcSchema::IfcMaterialDefinitionRepresentation::list::it jt = defs->begin(); jt != defs->end(); ++jt) { IfcSchema::IfcRepresentation::list::ptr reps = (*jt)->Representations(); @@ -693,7 +693,7 @@ taxonomy::item* mapping::map(const IfcSchema::IfcMaterial* material) { // return &(style_cache[material->data().id()] = material_style); } -taxonomy::item* mapping::map(const IfcSchema::IfcStyledItem* inst) { +taxonomy::item* mapping::map_impl(const IfcSchema::IfcStyledItem* inst) { static taxonomy::colour white = taxonomy::colour(1., 1., 1.); taxonomy::style* surface_style = new taxonomy::style;