Excellon parser: No understanding of leading zeros ... So X012345 != X12345.

Issue #69 resolved
Juan Pablo Caram repo owner created an issue

No description provided.

Comments (1)

  1. Juan Pablo Caram reporter
       def parse_number(self, number_str):
            """
            Parses coordinate numbers without period.
    
            :param number_str: String representing the numerical value.
            :type number_str: str
            :return: Floating point representation of the number
            :rtype: foat
            """
            if self.zeros == "L":
                match = self.leadingzeros_re.search(number_str)
                return float(number_str)/(10**(len(match.group(2))-2+len(match.group(1))))
            else:  # Trailing
                return float(number_str)/10000
    
  2. Log in to comment