From 4eb69a9f0703240e59b28ab45715bcc61405d5e1 Mon Sep 17 00:00:00 2001 From: Juan Pablo Caram Date: Fri, 12 Dec 2014 14:35:34 -0500 Subject: [PATCH] Added some debug prints to camplib.py --- camlib.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/camlib.py b/camlib.py index 712370f1..b462a143 100644 --- a/camlib.py +++ b/camlib.py @@ -1470,6 +1470,16 @@ class Gerber (Geometry): ### Polarity change # Example: %LPD*% or %LPC*% + # If polarity changes, creates geometry from current + # buffer, then adds or subtracts accordingly. + + ## DEBUG + if line_num == 11: + print "LINE:", gline + print "RE:", self.lpol_re.pattern + print "MATCH:", self.lpol_re.search(gline) + + match = self.lpol_re.search(gline) if match: if len(path) > 1 and current_polarity != match.group(1): @@ -1482,7 +1492,9 @@ class Gerber (Geometry): path = [path[-1]] # --- Apply buffer --- + print "current_polarity:", current_polarity if current_polarity == 'D': + print "Union with Cascaded Union of:", poly_buffer self.solid_geometry = self.solid_geometry.union(cascaded_union(poly_buffer)) else: self.solid_geometry = self.solid_geometry.difference(cascaded_union(poly_buffer))