From 767f7b40900abfef7c7119714203d8ae13bb1aaa Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Thu, 22 Sep 2011 11:35:03 +0000 Subject: [PATCH] Use name for imported objects rather than GUID if name is not null --- src/ifcgeom/IfcGeomObjects.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); } }