Browse Source

- fixed SVG export

Marius Stanciu 6 years ago
parent
commit
1af594403e
3 changed files with 4 additions and 3 deletions
  1. 1 1
      FlatCAMApp.py
  2. 1 0
      README.md
  3. 2 2
      camlib.py

+ 1 - 1
FlatCAMApp.py

@@ -9063,7 +9063,7 @@ class App(QtCore.QObject):
         try:
         try:
             filename, _f = QtWidgets.QFileDialog.getSaveFileName(
             filename, _f = QtWidgets.QFileDialog.getSaveFileName(
                 caption=_("Export SVG"),
                 caption=_("Export SVG"),
-                directory=self.get_last_save_folder() + '/' + str(name),
+                directory=self.get_last_save_folder() + '/' + str(name) + '_svg',
                 filter=_filter)
                 filter=_filter)
         except TypeError:
         except TypeError:
             filename, _f = QtWidgets.QFileDialog.getSaveFileName(caption=_("Export SVG"), filter=_filter)
             filename, _f = QtWidgets.QFileDialog.getSaveFileName(caption=_("Export SVG"), filter=_filter)

+ 1 - 0
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
 - 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 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 Gerber parsing for very simple Gerber files that have only one Polygon but many LPC zones
+- fixed SVG export
 
 
 16.10.2019
 16.10.2019
 
 

+ 2 - 2
camlib.py

@@ -1843,8 +1843,6 @@ class Geometry(object):
         :return: SVG Element
         :return: SVG Element
         """
         """
 
 
-        geom = None
-
         # Make sure we see a Shapely Geometry class and not a list
         # Make sure we see a Shapely Geometry class and not a list
         if str(type(self)) == "<class 'FlatCAMObj.FlatCAMGeometry'>":
         if str(type(self)) == "<class 'FlatCAMObj.FlatCAMGeometry'>":
             flat_geo = []
             flat_geo = []
@@ -1869,6 +1867,8 @@ class Geometry(object):
             elif skew_reference == 'bottomright':
             elif skew_reference == 'bottomright':
                 skew_ref = (xmax, ymin)
                 skew_ref = (xmax, ymin)
 
 
+        geom = geom_svg
+
         if scale_factor_x:
         if scale_factor_x:
             geom = affinity.scale(geom_svg, scale_factor_x, 1.0)
             geom = affinity.scale(geom_svg, scale_factor_x, 1.0)
         if scale_factor_y:
         if scale_factor_y: