- NCC Plugin: updates to fix a bug when doing copper clearing with Rest option

This commit is contained in:
Marius Stanciu
2023-06-29 22:40:36 +03:00
parent e965ca5494
commit 70bf613163
2 changed files with 10 additions and 1 deletions

View File

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