From 5ac58143698f5924ead26b760abaef48ff757fcf Mon Sep 17 00:00:00 2001 From: Sebastian Kuzminsky Date: Thu, 9 Feb 2012 09:03:19 -0700 Subject: [PATCH] when exporting SVG, map user units to mm so the coordinates make sense This commit changes SVG export so that the user unit (what SVG calls 'px') is defined to be 1 mm. This lets us write out the native sketch coordinates in the SVG file, and the SVG will contain a drawing of the correct size (same size as what's in FreeCAD). --- src/Mod/Draft/importSVG.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Mod/Draft/importSVG.py b/src/Mod/Draft/importSVG.py index 6ecbed714..e071ebf20 100644 --- a/src/Mod/Draft/importSVG.py +++ b/src/Mod/Draft/importSVG.py @@ -961,12 +961,14 @@ def export(exportList,filename): boty = sizey+miny # 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.write('\n') svg.write('\n') svg.write('\n')