diff --git a/src/ifcgeom/mapping/bind_convert_impl.i b/src/ifcgeom/mapping/bind_convert_impl.i index f3a9e49033..e22cde0ddf 100644 --- a/src/ifcgeom/mapping/bind_convert_impl.i +++ b/src/ifcgeom/mapping/bind_convert_impl.i @@ -8,7 +8,7 @@ try { \ item = map_impl(inst->as()); \ if (item != nullptr) { \ - if (!(item->instance && inst->as())) { \ + if (item->instance == nullptr) { \ item->instance = inst; \ } \ try { \ diff --git a/src/ifcwrap/IfcGeomWrapper.i b/src/ifcwrap/IfcGeomWrapper.i index 200ea45bd1..6fc23d2ca6 100644 --- a/src/ifcwrap/IfcGeomWrapper.i +++ b/src/ifcwrap/IfcGeomWrapper.i @@ -200,8 +200,6 @@ std::string taxonomy_item_repr(ifcopenshell::geometry::taxonomy::item::ptr i) { %extend ifcopenshell::geometry::taxonomy::style { size_t instance_id() const { - // @todo for some reason we have the IfcStyledItem/IfcMaterial here, but - // BlenderBIM expects IfcSurfaceStyle/IfcMaterial if (self->instance == nullptr) { return 0; } @@ -209,23 +207,6 @@ std::string taxonomy_item_repr(ifcopenshell::geometry::taxonomy::item::ptr i) { if ((ent = self->instance->as()) == nullptr) { return 0; } - if (ent->declaration().name() == "IfcStyledItem") { - aggregate_of_instance::ptr styles = *ent->get("Styles"); - if (styles->size() == 1) { - ent = (*styles->begin())->as(); - // < IFC4X3. - if (ent->declaration().name() == "IfcPresentationStyleAssignment") { - aggregate_of_instance::ptr styles = *ent->get("Styles"); - if (styles->size() == 1) { - ent = (*styles->begin())->as(); - } else { - return 0; - } - } - } else { - return 0; - } - } return ent->data().id(); } }