diff --git a/src/Mod/Arch/ArchSectionPlane.py b/src/Mod/Arch/ArchSectionPlane.py index 54109dde9..560b965b0 100644 --- a/src/Mod/Arch/ArchSectionPlane.py +++ b/src/Mod/Arch/ArchSectionPlane.py @@ -292,6 +292,7 @@ class _ArchDrawingView: obj.addProperty("App::PropertyLink","Source","Base","The linked object") obj.addProperty("App::PropertyEnumeration","RenderingMode","Drawing view","The rendering mode to use") obj.addProperty("App::PropertyBool","ShowCut","Drawing view","If cut geometry is shown or not") + obj.addProperty("App::PropertyBool","ShowFill","Drawing view","If cut geometry is filled or not") obj.addProperty("App::PropertyFloat","LineWidth","Drawing view","The line width of the rendered objects") obj.addProperty("App::PropertyLength","FontSize","Drawing view","The size of the texts inside this object") obj.RenderingMode = ["Solid","Wireframe"] @@ -408,12 +409,17 @@ class _ArchDrawingView: c = sol.cut(cutvolume) s = sol.section(cutface) try: - s = Part.Wire(s.Edges) - s = Part.Face(s) + wires = DraftGeomUtils.findWires(s.Edges) + for w in wires: + f = Part.Face(w) + sshapes.append(f) + #s = Part.Wire(s.Edges) + #s = Part.Face(s) except Part.OCCError: - pass + #print "ArchDrawingView: unable to get a face" + sshapes.append(s) nsh.extend(c.Solids) - sshapes.append(s) + #sshapes.append(s) if hasattr(obj,"ShowCut"): if obj.ShowCut: c = sol.cut(invcutvolume) @@ -439,13 +445,28 @@ class _ArchDrawingView: svgh = svgh.replace('fill="none"','fill="none"\nstroke-dasharray="DAPlaceholder"') self.svg += svgh if sshapes: + svgs = "" + if hasattr(obj,"ShowFill"): + if obj.ShowFill: + svgs += '\n' + svgs += '