From ab44bd1f7ba3c3008f3fd8ef6bdb61d11d1a82e1 Mon Sep 17 00:00:00 2001 From: Roy-043 Date: Wed, 2 Oct 2024 14:02:41 +0200 Subject: [PATCH] BIM: check if Width and Height of window are not zero --- src/Mod/BIM/ArchWindowPresets.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Mod/BIM/ArchWindowPresets.py b/src/Mod/BIM/ArchWindowPresets.py index 380c2d748d..765c85f402 100644 --- a/src/Mod/BIM/ArchWindowPresets.py +++ b/src/Mod/BIM/ArchWindowPresets.py @@ -51,10 +51,10 @@ def makeWindowPreset(windowtype,width,height,h1,h2,h3,w1,w2,o1,o2,placement=None w2 = float(w2) o1 = float(o1) o2 = float(o2) - # h1, h2, w1, w2 cannot be null (for now) + # width, height, h1, h2, w1, w2 cannot be null (for now) # TODO allow these to be null (don't create the component if so) - if h1*h2*w1*w2 == 0: - FreeCAD.Console.PrintError("H1, H2, W1 and W2 parameters cannot be zero. Aborting\n") + if width*height*h1*h2*w1*w2 == 0: + FreeCAD.Console.PrintError("Width, Height, H1, H2, W1 and W2 parameters cannot be zero. Aborting\n") return # small spacing to avoid wrong auto-wires in sketch tol = h1/10