diff --git a/src/Mod/Arch/ArchSectionPlane.py b/src/Mod/Arch/ArchSectionPlane.py index 6de04a6d73..8763f17f08 100644 --- a/src/Mod/Arch/ArchSectionPlane.py +++ b/src/Mod/Arch/ArchSectionPlane.py @@ -542,8 +542,10 @@ def getSVG(source, # add additional edge symbols from windows cutwindows = [] - if cutface and windows: - cutwindows = [w.Name for w in windows if w.Shape.BoundBox.intersect(cutface.BoundBox)] + if cutface and windows and BoundBoxValid(cutface.BoundBox): + cutwindows = [ + w.Name for w in windows if BoundBoxValid(w.Shape.BoundBox) and w.Shape.BoundBox.intersect(cutface.BoundBox) + ] if windows: sh = [] for w in windows: @@ -576,6 +578,11 @@ def getSVG(source, return svg +def BoundBoxValid(boundBox)->bool: + """Return true if boundBox has a non-zero volume""" + return boundBox.XLength > 0 and boundBox.YLength > 0 and boundBox.ZLength > 0 + + def getDXF(obj): """Return a DXF representation from a TechDraw view.""" allOn = getattr(obj, "AllOn", True)