- 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:
Marius Stanciu
2019-07-09 13:58:33 +03:00
committed by Marius
parent 16525a606c
commit 729b7cb11c
6 changed files with 52 additions and 19 deletions

View File

@@ -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)]