- fixed some possible issues due of changes in version 2.0 of Shapely

- removed the import * statement from most of the app
This commit is contained in:
Marius Stanciu
2023-03-06 16:40:49 +02:00
parent 33de5314b1
commit 3b3c87e953
230 changed files with 1253 additions and 15935 deletions

View File

@@ -10,10 +10,9 @@
# File modified by: Marius Stanciu #
# ##########################################################
# import inspect
from appGUI.ObjectUI import *
from PyQt6 import QtCore, QtGui
from appGUI.ObjectUI import ObjectUI
from appCommon.Common import LoudDict
from appGUI.PlotCanvasLegacy import ShapeCollectionLegacy
from appGUI.VisPyVisuals import ShapeCollection
@@ -21,9 +20,10 @@ from appGUI.VisPyVisuals import ShapeCollection
from shapely.ops import unary_union
from shapely.geometry import Polygon, MultiPolygon, Point, LineString
from copy import deepcopy
from copy import deepcopy, copy
import sys
import math
import inspect
import gettext
import appTranslation as fcTranslate
@@ -211,12 +211,12 @@ class FlatCAMObj(QtCore.QObject):
@property
def visible(self):
'''
"""
This property is used by Editors to turn off plotting for the original object that is edited,
such that when deleting certain elements there is no background plot in place to confuse things.
:return:
:rtype:
'''
"""
return self.shapes.visible
@visible.setter
@@ -227,6 +227,7 @@ class FlatCAMObj(QtCore.QObject):
current_visibility = self.shapes.visible
self.shapes.visible = current_visibility # maybe this is slower in VisPy? use enabled property?
def task(visibility):
if visibility is True:
if value is False:
@@ -666,7 +667,7 @@ class FlatCAMObj(QtCore.QObject):
if isinstance(geo, list) and geo[0] is not None:
if isinstance(geo, MultiPolygon):
env_obj = geo.convex_hull
elif (isinstance(geo, MultiPolygon) and len(geo) == 1) or \
elif (isinstance(geo, MultiPolygon) and len(geo.geoms) == 1) or \
(isinstance(geo, list) and len(geo) == 1) and isinstance(geo[0], Polygon):
env_obj = unary_union(geo)
env_obj = env_obj.convex_hull