This commit is contained in:
Thomas Krijnen
2020-05-20 11:55:59 +02:00
parent 3d06af0001
commit 839ca49a7a
+5
View File
@@ -1925,6 +1925,7 @@ IfcGeom::BRepElement<P, PP>* IfcGeom::Kernel::create_brep_for_representation_and
IfcSchema::IfcRepresentation* IfcGeom::Kernel::representation_mapped_to(const IfcSchema::IfcRepresentation* representation) { IfcSchema::IfcRepresentation* IfcGeom::Kernel::representation_mapped_to(const IfcSchema::IfcRepresentation* representation) {
IfcSchema::IfcRepresentation* representation_mapped_to = 0; IfcSchema::IfcRepresentation* representation_mapped_to = 0;
try {
IfcSchema::IfcRepresentationItem::list::ptr items = representation->Items(); IfcSchema::IfcRepresentationItem::list::ptr items = representation->Items();
if (items->size() == 1) { if (items->size() == 1) {
IfcSchema::IfcRepresentationItem* item = *items->begin(); IfcSchema::IfcRepresentationItem* item = *items->begin();
@@ -1940,6 +1941,10 @@ IfcSchema::IfcRepresentation* IfcGeom::Kernel::representation_mapped_to(const If
} }
} }
} }
} catch (const IfcParse::IfcException& e) {
Logger::Error(e);
// @todo reset representation_mapped_to to zero?
}
return representation_mapped_to; return representation_mapped_to;
} }