From 70bf61316304eb9e558bbea5330f27faa934c916 Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Thu, 29 Jun 2023 22:40:36 +0300 Subject: [PATCH] - NCC Plugin: updates to fix a bug when doing copper clearing with Rest option --- CHANGELOG.md | 4 ++++ appPlugins/ToolNCC.py | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1652dfae..59033cd8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ CHANGELOG for FlatCAM Evo beta ================================================= +29.06.2023 + +- NCC Plugin: updates to fix a bug when doing copper clearing with Rest option + 19.06.2023 - added a new signal allowing printing messages in statusbar without polluting the Tcl Shell; to be used in the future for low-ranking messages diff --git a/appPlugins/ToolNCC.py b/appPlugins/ToolNCC.py index 9288efac..9d69d789 100644 --- a/appPlugins/ToolNCC.py +++ b/appPlugins/ToolNCC.py @@ -2776,7 +2776,12 @@ class NonCopperClear(AppTool, Gerber): # except Exception as e: # self.app.log.error("Creating new area failed due of: %s" % str(e)) - new_area = MultiPolygon([line.buffer(tool / 2) for line in cleared_geo]) + if not cleared_geo: + break + buffered_cleared_geo = [line.buffer(tool / 2) for line in cleared_geo] + if not buffered_cleared_geo: + break + new_area = MultiPolygon(buffered_cleared_geo) new_area = new_area.buffer(0.0000001) area = area.difference(new_area)