From f673658a225a717bfddfe10aa6b305dbf9913ce6 Mon Sep 17 00:00:00 2001 From: Simon Date: Wed, 19 Apr 2017 00:22:08 +0200 Subject: [PATCH] ArchSectionPlane: Remove placeholders in getSVG and more clean up. getSVG puts placeholders in the generated SVG code and replaces them afterwards with length values. With the changes of the previous commits this seems not to be necessary anymore. I replace them in a separate commit so this change can be reverted easily. --- src/Mod/Arch/ArchSectionPlane.py | 90 +++++++++++++++++--------------- 1 file changed, 48 insertions(+), 42 deletions(-) diff --git a/src/Mod/Arch/ArchSectionPlane.py b/src/Mod/Arch/ArchSectionPlane.py index 3f57830ddb..c5faa246aa 100644 --- a/src/Mod/Arch/ArchSectionPlane.py +++ b/src/Mod/Arch/ArchSectionPlane.py @@ -168,11 +168,22 @@ def getSVG(section, renderMode="Wireframe", allOn=False, showHidden=False, scale if Draft.getType(o) == "Window": windows.append(o) objs = nonspaces - svg = '' + + archUserParameters = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Arch") + scaledLineWidth = linewidth/scale + svgLineWidth = str(scaledLineWidth) + 'px' + st = archUserParameters.GetFloat("CutLineThickness",2) + svgCutLineWidth = str(scaledLineWidth * st) + 'px' + yt = archUserParameters.GetFloat("SymbolLineThickness",0.6) + svgSymbolLineWidth = str(linewidth * yt) + hiddenPattern = archUserParameters.GetString("archHiddenPattern","30,10") + svgHiddenPattern = hiddenPattern.replace(" ","") fillpattern = '