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 += ''
+ svgs += ''
+ svgs += ''
+ for s in sshapes:
+ if s.Edges:
+ f = Draft.getSVG(s,direction=self.direction.negative(),linewidth=0,fillstyle="sectionfill",color=(0,0,0))
+ svgs += f
+ svgs += "\n"
sshapes = Part.makeCompound(sshapes)
self.sectionshape = sshapes
- svgs = Drawing.projectToSVG(sshapes,self.direction)
+ svgs += Drawing.projectToSVG(sshapes,self.direction)
if svgs:
svgs = svgs.replace('stroke-width="0.35"','stroke-width="SWPlaceholder"')
svgs = svgs.replace('stroke-width="1"','stroke-width="SWPlaceholder"')
svgs = svgs.replace('stroke-width:0.01','stroke-width:SWPlaceholder')
+ svgs = svgs.replace('stroke-width="0.35 px"','stroke-width="SWPlaceholder"')
+ svgs = svgs.replace('stroke-width:0.35','stroke-width:SWPlaceholder')
self.svg += svgs
def __getstate__(self):
diff --git a/src/Mod/Draft/Draft.py b/src/Mod/Draft/Draft.py
index b1b4829bc..1073a26be 100644
--- a/src/Mod/Draft/Draft.py
+++ b/src/Mod/Draft/Draft.py
@@ -1742,9 +1742,12 @@ def getSVG(obj,scale=1,linewidth=0.35,fontsize=12,fillstyle="shape color",direct
def getPath(edges=[],wires=[],pathname=None):
import DraftGeomUtils
+ svg = "