diff --git a/src/Mod/BIM/bimcommands/BimWindow.py b/src/Mod/BIM/bimcommands/BimWindow.py index b89f611a78..b157589a4e 100644 --- a/src/Mod/BIM/bimcommands/BimWindow.py +++ b/src/Mod/BIM/bimcommands/BimWindow.py @@ -280,15 +280,25 @@ class Arch_Window: ): if self.Include: # Window base sketch's placement stay at origin is good if addon exists and self.Include + # + # Put Sketch in 'upright' position to ensure the opening symbol on plan (SymbolPlan enabled) is correct + # - see https://github.com/FreeCAD/FreeCAD/issues/24903#issuecomment-3475455946 + # placement = FreeCAD.Placement(App.Vector(0,0,0),App.Rotation(App.Vector(1,0,0),90)) + # TODO 2025.11.1 : To improve the algorithm to be more robust to allow the Base Sketch in any orientation but without problem + # # Window object triggers onChanged() upon setting/changing Window.Sill to move Window's z position # For Window with SketchArch add-on, attachToHost() is to be run below to set the 'initial' Window's placement prior to triggering onChanged() below, # so window_sill parameter is not used here at the moment, see 'if self.Include' below. # FreeCADGui.doCommand("win = Arch.makeWindowPreset('" + WindowPresets[self.Preset] + "' " + wp + ", window_sill=" + str(self.Sill.Value) + ")") + FreeCADGui.doCommand( + "pl90 = FreeCAD.Placement(App.Vector(0,0,0),App.Rotation(App.Vector(1,0,0),90))" + ) FreeCADGui.doCommand( "win = Arch.makeWindowPreset('" + WindowPresets[self.Preset] + "' " + wp + + ", placement=pl90" + ")" ) else: