erichVK5 / BXL2text

A utility to convert huffman encoded BXL schematic and footprint files to plain text, gEDA PCB (.fp) and gschem (.sym), and KiCad (.lib) formats
GNU General Public License v2.0
22 stars 9 forks source link

Errors out on this bxl file from Analog Devices #6

Closed ahhsia closed 7 years ago

ahhsia commented 7 years ago

I've used this converter successfully with several bxl files from different vendors. But on occasion I get one that errors out. Maybe it is an error in the bxl file, but the -t text dump seems to work, while without that flag the translation to .sym,.lib, & .fp errors out with a message like this :

About to use filneame: ADP7118AUJZ.bxl
Created new buffer: ADP7118AUJZ.bxl
Exception in thread "main" java.lang.NumberFormatException: For input string: "234.3147"
    at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
    at java.lang.Integer.parseInt(Integer.java:580)
    at java.lang.Integer.parseInt(Integer.java:615)
    at Arc.populateBXLElement(Arc.java:94)
    at BXLDecoder.main(BXLDecoder.java:116)

I've attached the bxl file downloaded from Analog Devices

ADP7118AUJZ.bxl.zip

erichVK5 commented 7 years ago

I have fixed float parsing in the Arc.java class which seems to fix the issue in the example BXL provided.

Please let me know if it misbehaves.

Thanks for flagging the issue.

Erich.