- moved the initialization of the FlatCAM editors after a read of the default values. If I don't do this then only at the first start of the application the Editors are not functional as the Editor objects are most likely destroyed

- fixed bug in FlatCAM editors that caused the shapes to be drawn without resolution when the app units where INCH
- modified the transformation functions in all classes in camlib.py and FlatCAMObj.py to work with empty geometries
This commit is contained in:
Marius Stanciu
2019-08-17 18:47:41 +03:00
parent d8937b82fc
commit b20203eace
8 changed files with 184 additions and 64 deletions

View File

@@ -5000,14 +5000,20 @@ class FlatCAMGeometry(FlatCAMObj, Geometry):
geoms.append(scale_recursion(local_geom))
return geoms
else:
return affinity.scale(geom, xfactor, yfactor, origin=(px, py))
try:
return affinity.scale(geom, xfactor, yfactor, origin=(px, py))
except AttributeError:
return geom
if self.multigeo is True:
for tool in self.tools:
self.tools[tool]['solid_geometry'] = scale_recursion(self.tools[tool]['solid_geometry'])
else:
self.solid_geometry = scale_recursion(self.solid_geometry)
try:
self.solid_geometry = scale_recursion(self.solid_geometry)
except AttributeError:
self.solid_geometry = []
return
self.app.inform.emit(_(
"[success] Geometry Scale done."
))
@@ -5038,7 +5044,10 @@ class FlatCAMGeometry(FlatCAMObj, Geometry):
geoms.append(translate_recursion(local_geom))
return geoms
else:
return affinity.translate(geom, xoff=dx, yoff=dy)
try:
return affinity.translate(geom, xoff=dx, yoff=dy)
except AttributeError:
return geom
if self.multigeo is True:
for tool in self.tools: