From e6fbfee76616a3e85fcfbbe42d8b719982330df6 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Tue, 2 Aug 2016 15:44:42 +0200 Subject: [PATCH] Check for existence of representation identifier in python wrapper create_shape --- src/ifcwrap/IfcGeomWrapper.i | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ifcwrap/IfcGeomWrapper.i b/src/ifcwrap/IfcGeomWrapper.i index 1f66eab9fd..65689edeeb 100644 --- a/src/ifcwrap/IfcGeomWrapper.i +++ b/src/ifcwrap/IfcGeomWrapper.i @@ -274,6 +274,9 @@ struct ShapeRTTI : public boost::static_visitor // First, try to find a representation based on the settings for (IfcSchema::IfcRepresentation::list::it it = reps->begin(); it != reps->end(); ++it) { IfcSchema::IfcRepresentation* rep = *it; + if (!rep->hasRepresentationIdentifier()) { + continue; + } if (!settings.get(IfcGeom::IteratorSettings::EXCLUDE_SOLIDS_AND_SURFACES)) { if (rep->RepresentationIdentifier() == "Body") { ifc_representation = rep;