- fixed a issue when testing for Exclusion areas overlap over the Geometry object solid_geometry

This commit is contained in:
Marius Stanciu 2020-05-23 04:46:50 +03:00 committed by Marius
parent 2e8d5b3b96
commit 34b82286ca
2 changed files with 6 additions and 1 deletions

View File

@ -7,6 +7,10 @@ CHANGELOG for FlatCAM beta
=================================================
23.05.2020
- fixed a issue when testing for Exclusion areas overlap over the Geometry object solid_geometry
22.05.2020
- fixed the algorithm for calculating closest points in the Exclusion areas

View File

@ -13,6 +13,7 @@
from PyQt5 import QtCore
from shapely.geometry import Polygon, MultiPolygon, Point, LineString
from shapely.ops import unary_union
from AppGUI.VisPyVisuals import ShapeCollection
from AppTool import AppTool
@ -394,7 +395,7 @@ class ExclusionAreas(QtCore.QObject):
# only the current object therefore it will not guarantee success
self.app.inform.emit("%s" % _("Exclusion areas added. Checking overlap with the object geometry ..."))
for el in self.exclusion_areas_storage:
if el["shape"].intersects(MultiPolygon(self.solid_geometry)):
if el["shape"].intersects(unary_union(self.solid_geometry)):
self.on_clear_area_click()
self.app.inform.emit(
"[ERROR_NOTCL] %s" % _("Failed. Exclusion areas intersects the object geometry ..."))