From a072f944d0ba1ea3fcea9faba09b8536c09cfb9e Mon Sep 17 00:00:00 2001 From: Vanuan Date: Thu, 2 Jul 2020 11:58:28 +0300 Subject: [PATCH] [Arch] [TD] Bug 4392: ArchSection and hidden objects for Render mode --- src/Mod/Arch/ArchSectionPlane.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/Mod/Arch/ArchSectionPlane.py b/src/Mod/Arch/ArchSectionPlane.py index d7ddfa728e..746ae4dfb3 100644 --- a/src/Mod/Arch/ArchSectionPlane.py +++ b/src/Mod/Arch/ArchSectionPlane.py @@ -381,6 +381,13 @@ def getSVG(source, if source.Proxy.svgcache[5] != joinArch: svgcache = None source.Proxy.shapecache = None + # TODO check array bounds + if source.Proxy.svgcache[6] != allOn: + svgcache = None + source.Proxy.shapecache = None + if source.Proxy.svgcache[7] != set(objs): + svgcache = None + source.Proxy.shapecache = None # generating SVG if renderMode in ["Coin",2,"Coin mono",3]: @@ -395,7 +402,7 @@ def getSVG(source, else: svgcache = getCoinSVG(cutplane,objs,cameradata,linewidth="SVGLINEWIDTH") if hasattr(source,"Proxy"): - source.Proxy.svgcache = [svgcache,renderMode,showHidden,showFill,fillSpaces,joinArch] + source.Proxy.svgcache = [svgcache,renderMode,showHidden,showFill,fillSpaces,joinArch,allOn,set(objs)] elif renderMode in ["Solid",1]: if not svgcache: svgcache = '' @@ -426,7 +433,7 @@ def getSVG(source, svgcache += '\n' # print(render.info()) if hasattr(source,"Proxy"): - source.Proxy.svgcache = [svgcache,renderMode,showHidden,showFill,fillSpaces,joinArch] + source.Proxy.svgcache = [svgcache,renderMode,showHidden,showFill,fillSpaces,joinArch,allOn,set(objs)] else: # Wireframe (0) mode @@ -490,7 +497,8 @@ def getSVG(source, hStyle=style, h0Style=style, h1Style=style, vStyle=style, v0Style=style, v1Style=style) if hasattr(source,"Proxy"): - source.Proxy.svgcache = [svgcache,renderMode,showHidden,showFill,fillSpaces,joinArch] + source.Proxy.svgcache = [svgcache,renderMode,showHidden,showFill,fillSpaces,joinArch,allOn,set(objs)] + svgcache = svgcache.replace("SVGLINECOLOR",svgLineColor) svgcache = svgcache.replace("SVGLINEWIDTH",svgLineWidth) svgcache = svgcache.replace("SVGHIDDENPATTERN",svgHiddenPattern)