Port locations now sync relative to their parent even when not actively displayed in the viewport

This commit is contained in:
Dion Moult
2022-05-05 18:00:42 +10:00
parent 3213af2f48
commit 53c050c6ed
13 changed files with 93 additions and 27 deletions
@@ -103,6 +103,10 @@ class Usecase:
for referenced_placement in placement.ReferencedByPlacements:
matrix = ifcopenshell.util.placement.get_local_placement(referenced_placement)
for obj in referenced_placement.PlacesObject:
# Although a port is technically a nested child, it is generally
# more intuitive that the ports always move with the parent.
if obj.is_a("IfcDistributionPort"):
continue
results.append({"product": obj, "matrix": matrix, "is_si": False, "should_transform_children": False})
results.extend(self.get_children_settings(referenced_placement))
return results