- some changes in the app.on_togle_units() to make sure we don't try to convert empty parameters which may cause crashes on FlatCAM units change
- updated setup_ubuntu.sh file - made sure to import certain libraries in some of the FlatCAM files and not to rely on chained imports
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
from ObjectCollection import *
|
||||
from tclCommands.TclCommand import TclCommand
|
||||
from shapely.ops import cascaded_union
|
||||
from shapely.geometry import LineString
|
||||
|
||||
|
||||
class TclCommandCutout(TclCommand):
|
||||
@@ -81,11 +83,12 @@ class TclCommandCutout(TclCommand):
|
||||
|
||||
try:
|
||||
obj = self.app.collection.get_by_name(str(name))
|
||||
except:
|
||||
except Exception as e:
|
||||
log.debug("TclCommandCutout.execute() --> %s" % str(e))
|
||||
return "Could not retrieve object: %s" % name
|
||||
|
||||
def geo_init_me(geo_obj, app_obj):
|
||||
margin = margin_par + dia_par / 2
|
||||
margin = margin_par + dia_par / 2
|
||||
gap_size = dia_par + gapsize_par
|
||||
|
||||
minx, miny, maxx, maxy = obj.bounds()
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
from ObjectCollection import *
|
||||
from tclCommands.TclCommand import TclCommandSignaled
|
||||
from copy import deepcopy
|
||||
from shapely.ops import cascaded_union
|
||||
from shapely.geometry import Polygon, LineString, LinearRing
|
||||
|
||||
|
||||
class TclCommandGeoCutout(TclCommandSignaled):
|
||||
"""
|
||||
Tcl shell command to create a board cutout geometry. Allow cutout for any shape. Cuts holding gaps from geometry.
|
||||
Tcl shell command to create a board cutout geometry.
|
||||
Allow cutout for any shape.
|
||||
Cuts holding gaps from geometry.
|
||||
|
||||
example:
|
||||
|
||||
@@ -66,9 +70,9 @@ class TclCommandGeoCutout(TclCommandSignaled):
|
||||
:return:
|
||||
"""
|
||||
|
||||
def subtract_rectangle(obj_, x0, y0, x1, y1):
|
||||
pts = [(x0, y0), (x1, y0), (x1, y1), (x0, y1)]
|
||||
obj_.subtract_polygon(pts)
|
||||
# def subtract_rectangle(obj_, x0, y0, x1, y1):
|
||||
# pts = [(x0, y0), (x1, y0), (x1, y1), (x0, y1)]
|
||||
# obj_.subtract_polygon(pts)
|
||||
|
||||
def substract_rectangle_geo(geo, x0, y0, x1, y1):
|
||||
pts = [(x0, y0), (x1, y0), (x1, y1), (x0, y1)]
|
||||
|
||||
Reference in New Issue
Block a user