excellonparse.rst 1.5 KB

1234567891011121314151617181920212223242526272829303132333435
  1. Excellon Parser
  2. ===============
  3. List of test files and their settings
  4. -------------------------------------
  5. ========================== ============== ========= ===================
  6. File Settings Parsed Ok Example
  7. ========================== ============== ========= ===================
  8. FlatCAM_Drilling_Test.drl METRIC YES X76324 -> 76mm
  9. Drill_All.drl METRIC NO X019708 -> 1.97mm X
  10. TFTadapter.drl METRIC,TZ YES? X4.572 -> 4.57mm
  11. rfduino dip.drl_ METRIC,TZ NO X236220 -> 23mm X
  12. X-Y CONTROLLER - Drill... METRIC YES X76213 -> 76mm
  13. ucontrllerBoard.drl INCH,TZ YES X1.96572
  14. holes.drl INCH YES Y+019500 -> 1.95in
  15. BLDC2003Through.drl INCH YES X+023625 -> 2.3in
  16. PlacaReles.drl INCH,TZ YES Y-8200 -> -0.82in
  17. AVR_Transistor_Tester.DRL INCH YES X033000 -> 3.3in
  18. DRL INCH,00.0000 YES/NO* X004759 -> 0.47in
  19. ========================== ============== ========= ===================
  20. (*) The units format is not recognized, thus it is parsed correctly
  21. as long as the project is set for inches already.
  22. Parser was:
  23. .. code-block:: python
  24. def parse_number(self, number_str):
  25. if self.zeros == "L":
  26. match = self.leadingzeros_re.search(number_str)
  27. return float(number_str)/(10**(len(match.group(1)) + len(match.group(2)) - 2))
  28. else: # Trailing
  29. return float(number_str)/10000