From 34b82286cafe60d16e70f8ae50a3aa272dec1cf5 Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Sat, 23 May 2020 04:46:50 +0300 Subject: [PATCH] - fixed a issue when testing for Exclusion areas overlap over the Geometry object solid_geometry --- CHANGELOG.md | 4 ++++ Common.py | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 988af6e9..21ccc48c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/Common.py b/Common.py index 19b33cf7..7887954b 100644 --- a/Common.py +++ b/Common.py @@ -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 ..."))