diff options
author | Garret Fick <garret@ficksworkshop.com> | 2016-06-04 14:57:21 +0800 |
---|---|---|
committer | Garret Fick <garret@ficksworkshop.com> | 2016-06-04 14:57:21 +0800 |
commit | fca36a29b9a07dc0cb031ae87b72385150b55c3e (patch) | |
tree | 428c092305c27b8c60b85d36424914a9e870c0e4 /gerber/excellon_statements.py | |
parent | ea97d9d0376db6ff7afcc7669eec84a228f8d201 (diff) | |
download | gerbonara-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.py | 5 |
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 |