From d0008e6756ff7cbaee090667ec9722068660a4a6 Mon Sep 17 00:00:00 2001 From: donovaly Date: Sat, 9 Feb 2019 17:08:28 +0100 Subject: [PATCH] export Flattened SVG fixes for python 3 To be able to export as flattened SVG with the Conda build of FC one needs these fixes. --- src/Mod/Draft/importSVG.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Mod/Draft/importSVG.py b/src/Mod/Draft/importSVG.py index cbc4254857..8868dabfde 100644 --- a/src/Mod/Draft/importSVG.py +++ b/src/Mod/Draft/importSVG.py @@ -1251,7 +1251,7 @@ def export(exportList,filename): # writing header # we specify the svg width and height in FreeCAD's physical units (mm), # and specify the viewBox so that user units maps one-to-one to mm - svg = pythonopen(filename,'wb') + svg = pythonopen(filename,'w') svg.write('\n') svg.write('\n') @@ -1280,13 +1280,10 @@ def export(exportList,filename): svg.write('\n' %\ ob.Name) svg.write(Draft.getSVG(ob)) - svg.write('%s\n' % ob.Label.encode('utf8')\ + svg.write('%s\n' % str(ob.Label.encode('utf8'))\ .replace('<','<').replace('>','>')) # replace('"',\ """) svg.write('\n') # closing svg.write('') svg.close() - - -