BIM: Fix ArchBuildingPart not moving child object base (#27237)

When a child (e.g. a Wall) of an ArchBuildingPart (e.g. of a Level)
had both 'Move With Host' and 'Move Base' enabled, it failed to move
the base (e.g. Line) of the child, and only displaced the child
itself (effectively ignoring the 'Move Base' setting).

Example project structure:

Level
|
+- Wall ('Move With Host' = true, 'Move Base' = true)
   |
   +- (base of Wall) Line
This commit is contained in:
Arusekk
2026-01-31 11:50:51 +01:00
committed by GitHub
parent 44fd6754d8
commit c497a583ca

View File

@@ -44,6 +44,7 @@ import Draft
import DraftVecUtils
from draftutils import params
from draftutils import utils
if FreeCAD.GuiUp:
from PySide.QtCore import QT_TRANSLATE_NOOP
@@ -356,7 +357,9 @@ class BuildingPart(ArchIFC.IfcProduct):
deltar = obj.Placement.Rotation * self.oldPlacement.Rotation.inverted()
if deltar.Angle < 0.0001:
deltar = None
for child in self.getMovableChildren(obj):
children = self.getMovableChildren(obj)
children = utils._modifiers_filter_objects(children, False)
for child in children:
if deltar:
child.Placement.rotate(
self.oldPlacement.Base,