Skip to content

Commit

Permalink
BIM: check if Width and Height of window are not zero
Browse files Browse the repository at this point in the history
  • Loading branch information
Roy-043 authored and chennes committed Oct 3, 2024
1 parent a10dcb2 commit ab44bd1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Mod/BIM/ArchWindowPresets.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ def makeSketch(windowtype,width,height,h1,h2,h3,w1,w2,o1,o2):
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
Expand Down

0 comments on commit ab44bd1

Please sign in to comment.