From 1af594403e1ef1be42fff24a16d6b1aa3ca92faf Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Sat, 19 Oct 2019 01:19:08 +0300 Subject: [PATCH] - fixed SVG export --- FlatCAMApp.py | 2 +- README.md | 1 + camlib.py | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/FlatCAMApp.py b/FlatCAMApp.py index 1000ebf1..249f329b 100644 --- a/FlatCAMApp.py +++ b/FlatCAMApp.py @@ -9063,7 +9063,7 @@ class App(QtCore.QObject): try: filename, _f = QtWidgets.QFileDialog.getSaveFileName( caption=_("Export SVG"), - directory=self.get_last_save_folder() + '/' + str(name), + directory=self.get_last_save_folder() + '/' + str(name) + '_svg', filter=_filter) except TypeError: filename, _f = QtWidgets.QFileDialog.getSaveFileName(caption=_("Export SVG"), filter=_filter) diff --git a/README.md b/README.md index 627b25b5..9b04e21a 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,7 @@ CAD program, and create G-Code for Isolation routing. - finished the Objects menu by adding the ability of actions to be checked so they will show the selected status of the objects and by adding to actions to (de)select all objects - fixed and optimized the click selection on canvas - fixed Gerber parsing for very simple Gerber files that have only one Polygon but many LPC zones +- fixed SVG export 16.10.2019 diff --git a/camlib.py b/camlib.py index e0bdd9e1..6b2909aa 100644 --- a/camlib.py +++ b/camlib.py @@ -1843,8 +1843,6 @@ class Geometry(object): :return: SVG Element """ - geom = None - # Make sure we see a Shapely Geometry class and not a list if str(type(self)) == "": flat_geo = [] @@ -1869,6 +1867,8 @@ class Geometry(object): elif skew_reference == 'bottomright': skew_ref = (xmax, ymin) + geom = geom_svg + if scale_factor_x: geom = affinity.scale(geom_svg, scale_factor_x, 1.0) if scale_factor_y: