- replaced the testing if instance of FlatCAMObj with testing the obj.kind attribute
- removed the import of the whole FlatCAMApp file only for the usage of GracefulException - remove the import of FlatCAMApp and used alternate ways - optimized the imports in some files - moved the Bookmarksmanager and ToolDB classes into their own files - solved some bugs that were not so visible in the Editors and HPGL parser - split the FlatCAMObj file into multiple files located in the flatcamObjects folder and renamed the contained classes with names more suggestive - updated the Google Translation for the German language
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import collections
|
||||
from tclCommands.TclCommand import TclCommand
|
||||
from FlatCAMObj import FlatCAMGeometry, FlatCAMGerber
|
||||
|
||||
from shapely.ops import cascaded_union
|
||||
|
||||
@@ -73,7 +72,7 @@ class TclCommandBbox(TclCommand):
|
||||
|
||||
if not isinstance(obj, FlatCAMGerber) and not isinstance(obj, FlatCAMGeometry):
|
||||
self.raise_tcl_error('%s %s: %s.' % (
|
||||
_("Expected FlatCAMGerber or FlatCAMGeometry, got"), name, type(obj)))
|
||||
_("Expected GerberObject or GeometryObject, got"), name, type(obj)))
|
||||
|
||||
if 'margin' not in args:
|
||||
args['margin'] = float(self.app.defaults["gerber_bboxmargin"])
|
||||
@@ -92,7 +91,7 @@ class TclCommandBbox(TclCommand):
|
||||
|
||||
try:
|
||||
def geo_init(geo_obj, app_obj):
|
||||
assert isinstance(geo_obj, FlatCAMGeometry)
|
||||
# assert geo_obj.kind == 'geometry'
|
||||
|
||||
# Bounding box with rounded corners
|
||||
geo = cascaded_union(obj.solid_geometry)
|
||||
|
||||
Reference in New Issue
Block a user