Browse Source

- 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)

Marius Stanciu 6 years ago
parent
commit
883e1ca837
2 changed files with 2 additions and 4 deletions
  1. 1 0
      README.md
  2. 1 4
      camlib.py

+ 1 - 0
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
 

+ 1 - 4
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