mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-28 03:05:33 +00:00
Don't add inverse references to the entity being added itself.
This commit is contained in:
@@ -1117,6 +1117,7 @@ IfcUtil::IfcBaseClass* IfcFile::addEntity(IfcUtil::IfcBaseClass* entity) {
|
|||||||
} catch (...) {}
|
} catch (...) {}
|
||||||
for (IfcEntityList::it it = entity_attributes->begin(); it != entity_attributes->end(); ++it) {
|
for (IfcEntityList::it it = entity_attributes->begin(); it != entity_attributes->end(); ++it) {
|
||||||
IfcUtil::IfcBaseClass* entity_attribute = *it;
|
IfcUtil::IfcBaseClass* entity_attribute = *it;
|
||||||
|
if (*it == entity) continue;
|
||||||
try {
|
try {
|
||||||
if (!IfcSchema::Type::IsSimple(entity_attribute->type())) {
|
if (!IfcSchema::Type::IsSimple(entity_attribute->type())) {
|
||||||
unsigned entity_attribute_id = entity_attribute->entity->id();
|
unsigned entity_attribute_id = entity_attribute->entity->id();
|
||||||
|
|||||||
Reference in New Issue
Block a user