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

(cherry picked from commit c497a583ca)
This commit is contained in:
Arusekk
2026-01-31 15:50:01 +01:00
committed by Max Wilfinger
parent 3d538beb80
commit 3e659cf6f8
+4 -1
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,