Added support for M71/72 in Excellon parser.
This commit is contained in:
14
camlib.py
14
camlib.py
@@ -1880,15 +1880,27 @@ class Excellon(Geometry):
|
||||
### Cleanup lines
|
||||
eline = eline.strip(' \r\n')
|
||||
|
||||
## Header Begin (M48) / End (M95) ##
|
||||
## Header Begin (M48) ##
|
||||
if self.hbegin_re.search(eline):
|
||||
in_header = True
|
||||
continue
|
||||
|
||||
## Header End ##
|
||||
if self.hend_re.search(eline):
|
||||
in_header = False
|
||||
continue
|
||||
|
||||
## Alternative units format M71/M72
|
||||
# Supposed to be just in the body (yes, the body)
|
||||
# but some put it in the header (PADS for example).
|
||||
# Will detect anywhere. Occurrence will change the
|
||||
# object's units.
|
||||
match = self.meas_re.match(eline)
|
||||
if match:
|
||||
self.units = {"1": "MM", "2": "IN"}[match.group(1)]
|
||||
log.debug(" Units: %s" % self.units)
|
||||
continue
|
||||
|
||||
#### Body ####
|
||||
if not in_header:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user