Index: altium/pcbdoc_bin.c =================================================================== --- altium/pcbdoc_bin.c (revision 35465) +++ altium/pcbdoc_bin.c (revision 35466) @@ -259,3 +259,30 @@ } } + +int pcbdoc_bin_parse_vias6(rnd_hidlib_t *hidlib, altium_tree_t *tree, ucdf_file_t *fp, altium_buf_t *tmp) +{ + for(;;) { + unsigned char *d; + int rectype; + long len; + + len = read_rec_tlb(fp, tmp, &rectype); + if (len <= 0) + return len; + if (rectype != 3) { + rnd_message(RND_MSG_ERROR, "vias6 record with wrong type; expected 3, got %d\n", rectype); + continue; + } + if (len < 209) { + rnd_message(RND_MSG_ERROR, "vias6 record too short; expected 209, got %ld\n", len); + continue; + } + + d = tmp->data; + + printf("via: layer=%d..%d net=%ld (comp=%ld) u=%d C*=%d\n", d[0], d[1], load_int(d+3, 2), load_int(d+7, 2), d[70], d[40]); + printf(" x=%.2f y=%.2f copperD=%.2f holD=%.2f\n", bmil(d+13), bmil(d+17), bmil(d+21), bmil(d+25)); + } +} + Index: altium/test.c =================================================================== --- altium/test.c (revision 35465) +++ altium/test.c (revision 35466) @@ -3,7 +3,7 @@ #include "pcbdoc_ascii.h" #include "pcbdoc_bin.h" -int pcbdoc_bin_parse_fills6(rnd_hidlib_t *hidlib, altium_tree_t *tree, ucdf_file_t *fp, altium_buf_t *tmp); +int pcbdoc_bin_parse_vias6(rnd_hidlib_t *hidlib, altium_tree_t *tree, ucdf_file_t *fp, altium_buf_t *tmp); int main(int argc, char *argv[]) { @@ -20,7 +20,7 @@ exit(1); } - res = pcbdoc_bin_parse_fills6(&hidlib, &tree, f, &tmp); + res = pcbdoc_bin_parse_vias6(&hidlib, &tree, f, &tmp); printf("res=%d @ %ld\n", res, ftell(f));