diff --git a/src/ifcgeom/IfcGeomObjects.cpp b/src/ifcgeom/IfcGeomObjects.cpp index 6d5b5b9d7b..9d8b6b0f8d 100644 --- a/src/ifcgeom/IfcGeomObjects.cpp +++ b/src/ifcgeom/IfcGeomObjects.cpp @@ -192,7 +192,7 @@ IfcGeomObjects::IfcGeomObject* _get() { } } Ifc2x3::IfcProduct::ptr entity = *inner; - const std::string guid = entity->GlobalId(); + const std::string name = entity->hasName() ? entity->Name() : entity->GlobalId(); gp_Trsf trsf; try { @@ -235,7 +235,7 @@ IfcGeomObjects::IfcGeomObject* _get() { shape = new IfcGeomObjects::IfcMesh(shaperep->entity->id(),shapes); } - return new IfcGeomObjects::IfcGeomObject(guid, Ifc2x3::Type::ToString(entity->type()), trsf, shape); + return new IfcGeomObjects::IfcGeomObject(name, Ifc2x3::Type::ToString(entity->type()), trsf, shape); } }