Added non-compliant support for "-" in ApertureMacro names. Temporary fix for #185.

This commit is contained in:
Juan Pablo Caram 2015-12-29 17:35:43 -05:00
parent d5c99463fb
commit 3940408da5
1 changed files with 3 additions and 1 deletions

View File

@ -1307,7 +1307,9 @@ class Gerber (Geometry):
self.comm_re = re.compile(r'^G0?4(.*)$')
# AD - Aperture definition
self.ad_re = re.compile(r'^%ADD(\d\d+)([a-zA-Z_$\.][a-zA-Z0-9_$\.]*)(?:,(.*))?\*%$')
# Aperture Macro names: Name = [a-zA-Z_.$]{[a-zA-Z_.0-9]+}
# NOTE: Adding "-" to support output from Upverter.
self.ad_re = re.compile(r'^%ADD(\d\d+)([a-zA-Z_$\.][a-zA-Z0-9_$\.\-]*)(?:,(.*))?\*%$')
# AM - Aperture Macro
# Beginning of macro (Ends with *%):