mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-20 23:36:20 +00:00
Use name for imported objects rather than GUID if name is not null
This commit is contained in:
@@ -192,7 +192,7 @@ IfcGeomObjects::IfcGeomObject* _get() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
Ifc2x3::IfcProduct::ptr entity = *inner;
|
Ifc2x3::IfcProduct::ptr entity = *inner;
|
||||||
const std::string guid = entity->GlobalId();
|
const std::string name = entity->hasName() ? entity->Name() : entity->GlobalId();
|
||||||
|
|
||||||
gp_Trsf trsf;
|
gp_Trsf trsf;
|
||||||
try {
|
try {
|
||||||
@@ -235,7 +235,7 @@ IfcGeomObjects::IfcGeomObject* _get() {
|
|||||||
shape = new IfcGeomObjects::IfcMesh(shaperep->entity->id(),shapes);
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user