mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-17 14:02:27 +00:00
Adds check for placement relative to self
This commit is contained in:
@@ -156,7 +156,11 @@ void IfcHierarchyHelper<Schema>::relatePlacements(typename Schema::IfcProduct* p
|
|||||||
if (place && place->declaration().is(Schema::IfcLocalPlacement::Class())) {
|
if (place && place->declaration().is(Schema::IfcLocalPlacement::Class())) {
|
||||||
typename Schema::IfcLocalPlacement* local_place = (typename Schema::IfcLocalPlacement*)place;
|
typename Schema::IfcLocalPlacement* local_place = (typename Schema::IfcLocalPlacement*)place;
|
||||||
if (parent->ObjectPlacement()) {
|
if (parent->ObjectPlacement()) {
|
||||||
local_place->setPlacementRelTo(parent->ObjectPlacement());
|
if (local_place != parent->ObjectPlacement()) {
|
||||||
|
local_place->setPlacementRelTo(parent->ObjectPlacement());
|
||||||
|
} else {
|
||||||
|
Logger::Notice("Placement cannot be relative to self");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user