From 883e1ca837ee789e00e0cfd379ab206f3ea48d41 Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Wed, 21 Aug 2019 15:14:35 +0300 Subject: [PATCH] - fixed bug in Excellon parser for the Excellon files that do not put the type of zero suppression they use in the file (like DipTrace eCAD) --- README.md | 1 + camlib.py | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index e0f22a74..aabf9367 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ CAD program, and create G-Code for Isolation routing. - added new entry in Properties Tool which is the calculated Convex Hull Area (should give a more precise area for the irregular shapes than the box area) - added some more strings in Properties Tool for the translation - in NCC Tool added area selection feature +- fixed bug in Excellon parser for the Excellon files that do not put the type of zero suppression they use in the file (like DipTrace eCAD) 20.08.2019 diff --git a/camlib.py b/camlib.py index 0eddddf3..9c7bafe7 100644 --- a/camlib.py +++ b/camlib.py @@ -4532,7 +4532,7 @@ class Excellon(Geometry): else: result = float(number_str) / (10 ** (float(nr_length) - float(self.excellon_format_upper_mm))) return result - elif self.zeros == "T" or self.zeros == "TZ": # Trailing + else: # Trailing # You must show all zeros to the right of the number and can omit # all zeros to the left of the number. The CNC-7 will count the number # of digits you typed and automatically fill in the missing zeros. @@ -4544,9 +4544,6 @@ class Excellon(Geometry): else: # Metric is 000.000 result = float(number_str) / (10 ** (float(self.excellon_format_lower_mm))) return result - else: # None - the numbers are in decimal format - return float(number_str) - except Exception as e: log.error("Aborted. Operation could not be completed due of %s" % str(e)) return