Openings now move with the host by default. Small change, big impact.

This commit is contained in:
Dion Moult
2022-10-03 23:29:59 +11:00
parent 1d39413717
commit 0eae3de6a2
3 changed files with 56 additions and 2 deletions
@@ -104,9 +104,13 @@ 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"):
# Although a port is technically a nested child, it is generally
# more intuitive that the ports always move with the parent.
continue
elif obj.is_a("IfcFeatureElement"):
# Feature elements affect the geometry of their parent, and
# so logically should always move with the parent.
continue
results.append({"product": obj, "matrix": matrix, "is_si": False, "should_transform_children": False})
results.extend(self.get_children_settings(referenced_placement))