Fix missing door symbols in getSVG

The ArchSectionPlane has a built in SVG Cache. But the door symbols and
a few other things are not inside the cache. This things not inside the
cache rely on the presence of a cutface. But this cutface was only built
when the cache is not available.

So the First invocation after the cache was cleared added the symbols.
The next invocations of the method, with a cached SVG did not calculate
the symbols again, because the cutfaces where missing.

This commit fixes it by calculating the cutfaces independent from the
cache.

Reported in https://forum.freecadweb.org/viewtopic.php?f=3&t=33987
This commit is contained in:
furti
2019-02-07 16:58:51 +01:00
committed by Yorik van Havre
parent fe39347b05
commit 1610046905

View File

@@ -238,11 +238,12 @@ def getSVG(section, renderMode="Wireframe", allOn=False, showHidden=False, scale
# print(render.info())
section.Proxy.svgcache = [svgcache,renderMode,showHidden,showFill]
else:
shapes,hshapes,sshapes,cutface,cutvolume,invcutvolume = getCutShapes(objs,section,showHidden)
if not svgcache:
svgcache = ""
# render using the Drawing module
import Drawing, Part
shapes,hshapes,sshapes,cutface,cutvolume,invcutvolume = getCutShapes(objs,section,showHidden)
if shapes:
baseshape = Part.makeCompound(shapes)
style = {'stroke': "SVGLINECOLOR",