From a90e7629dc604a4a48974991e7b2619a5a6db5a1 Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Fri, 4 Oct 2019 03:15:31 +0300 Subject: [PATCH] - optimized Rules Check Tool so it runs faster when doing Copper 2 Copper rule --- README.md | 1 + flatcamTools/ToolRulesCheck.py | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/README.md b/README.md index 526fe484..271e7dc8 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ CAD program, and create G-Code for Isolation routing. 4.10.2019 - updated the Film Tool and added the ability to generate Punched Positive films (holes in the pads) when a Gerber file is the film's source. The punch holes source can be either an Excellon file or the pads center +- optimized Rules Check Tool so it runs faster when doing Copper 2 Copper rule 3.10.2019 diff --git a/flatcamTools/ToolRulesCheck.py b/flatcamTools/ToolRulesCheck.py index 26f7c26d..9096ec6b 100644 --- a/flatcamTools/ToolRulesCheck.py +++ b/flatcamTools/ToolRulesCheck.py @@ -669,6 +669,12 @@ class RulesCheck(FlatCAMTool): if 'solid' in geo_el and geo_el['solid'] is not None: total_geo_grb_3.append(geo_el['solid']) + total_geo_grb_1 = MultiPolygon(total_geo_grb_1) + total_geo_grb_1 = total_geo_grb_1.buffer(0) + + total_geo_grb_3 = MultiPolygon(total_geo_grb_3) + total_geo_grb_3 = total_geo_grb_3.buffer(0) + iterations = len(total_geo_grb_1) * len(total_geo_grb_3) log.debug("RulesCheck.check_gerber_clearance(). Iterations: %s" % str(iterations))