From 8d6547d519ffb331cfba054b4db2750b3e71339b Mon Sep 17 00:00:00 2001 From: tetektoza Date: Fri, 25 Apr 2025 01:34:20 +0200 Subject: [PATCH] BIM: Allow CurtainWall to have Window being assigned upon Remove/Add ops Currently user has no possibility to insert Window to the host, if the host is a Curtain Wall. Solution is simple - just populate the array of acceptable hosts that haven't been extended. NOTE: Although this feels wrong, I've noted to change it as having some kind of an internal flag allowing for add/remove for the host, since extending this array looks like a really bad approach. --- src/Mod/BIM/ArchCommands.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Mod/BIM/ArchCommands.py b/src/Mod/BIM/ArchCommands.py index da53424625..67a9172238 100644 --- a/src/Mod/BIM/ArchCommands.py +++ b/src/Mod/BIM/ArchCommands.py @@ -102,7 +102,7 @@ def addComponents(objectsList,host): if hostType in ["Floor","Building","Site","Project","BuildingPart"]: for o in objectsList: host.addObject(o) - elif hostType in ["Wall","Structure","Precast","Window","Roof","Stairs","StructuralSystem","Panel","Component","Pipe"]: + elif hostType in ["Wall","CurtainWall","Structure","Precast","Window","Roof","Stairs","StructuralSystem","Panel","Component","Pipe"]: import DraftGeomUtils a = host.Additions if hasattr(host,"Axes"): @@ -146,7 +146,7 @@ def removeComponents(objectsList,host=None): if not isinstance(objectsList,list): objectsList = [objectsList] if host: - if Draft.getType(host) in ["Wall","Structure","Precast","Window","Roof","Stairs","StructuralSystem","Panel","Component","Pipe"]: + if Draft.getType(host) in ["Wall","CurtainWall","Structure","Precast","Window","Roof","Stairs","StructuralSystem","Panel","Component","Pipe"]: if hasattr(host,"Tool"): if objectsList[0] == host.Tool: host.Tool = None