summaryrefslogtreecommitdiff
path: root/gerber/excellon_statements.py
diff options
context:
space:
mode:
authorGarret Fick <garret@ficksworkshop.com>2016-06-04 14:57:21 +0800
committerGarret Fick <garret@ficksworkshop.com>2016-06-04 14:57:21 +0800
commitfca36a29b9a07dc0cb031ae87b72385150b55c3e (patch)
tree428c092305c27b8c60b85d36424914a9e870c0e4 /gerber/excellon_statements.py
parentea97d9d0376db6ff7afcc7669eec84a228f8d201 (diff)
downloadgerbonara-fca36a29b9a07dc0cb031ae87b72385150b55c3e.tar.gz
gerbonara-fca36a29b9a07dc0cb031ae87b72385150b55c3e.tar.bz2
gerbonara-fca36a29b9a07dc0cb031ae87b72385150b55c3e.zip
Handle 85 statements that omit one value
Diffstat (limited to 'gerber/excellon_statements.py')
-rw-r--r--gerber/excellon_statements.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/gerber/excellon_statements.py b/gerber/excellon_statements.py
index c9367b4..7153c82 100644
--- a/gerber/excellon_statements.py
+++ b/gerber/excellon_statements.py
@@ -856,6 +856,11 @@ class SlotStmt(ExcellonStatement):
(x_start_coord, y_start_coord) = SlotStmt.parse_sub_coords(sub_coords[0], settings)
(x_end_coord, y_end_coord) = SlotStmt.parse_sub_coords(sub_coords[1], settings)
+ # Some files seem to specify only one of the coordinates
+ if x_end_coord == None:
+ x_end_coord = x_start_coord
+ if y_end_coord == None:
+ y_end_coord = y_start_coord
c = cls(x_start_coord, y_start_coord, x_end_coord, y_end_coord, **kwargs)
c.units = settings.units