diff --git a/src/Mod/Arch/ArchSectionPlane.py b/src/Mod/Arch/ArchSectionPlane.py index 61084b6b48..76ce16742a 100644 --- a/src/Mod/Arch/ArchSectionPlane.py +++ b/src/Mod/Arch/ArchSectionPlane.py @@ -95,6 +95,18 @@ def makeSectionView(section,name="View"): view.Label = translate("Arch","View of")+" "+section.Name return view +def looksLikeDraft(o): + # If there is no shape at all ignore it + if not hasattr(o, 'Shape') or o.Shape.isNull(): + return False + + # If there are solids in the object, it will be handled later + # by getCutShapes + if len(o.Shape.Solids) > 0: + return False + + # If we have a shape, but no volume, it looks like a flat 2D object + return o.Shape.Volume == 0 def getCutShapes(objs,section,showHidden): @@ -178,6 +190,8 @@ def getSVG(section, renderMode="Wireframe", allOn=False, showHidden=False, scale drafts.append(o) elif o.isDerivedFrom("Part::Part2DObject"): drafts.append(o) + elif looksLikeDraft(o): + drafts.append(o) else: nonspaces.append(o) if Draft.getType(o) == "Window":