mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 09:21:46 +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())) {
|
||||
typename Schema::IfcLocalPlacement* local_place = (typename Schema::IfcLocalPlacement*)place;
|
||||
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