Browse Source

- optimized Rules Check Tool so it runs faster when doing Copper 2 Copper rule

Marius Stanciu 6 years ago
parent
commit
a90e7629dc
2 changed files with 7 additions and 0 deletions
  1. 1 0
      README.md
  2. 6 0
      flatcamTools/ToolRulesCheck.py

+ 1 - 0
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
 

+ 6 - 0
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))