pyvista / pyiges

Python IGES Reader
https://pyvista.github.io/pyiges/
MIT License
34 stars 8 forks source link

Header issues #7

Open msc-turb opened 3 years ago

msc-turb commented 3 years ago

Hi,

I get an error when reading the first "G" header line, which is in my iges file:

,,31HOpen CASCADE IGES processor 7.4,13HFilename.iges,                  G0000001

As a workaround I am replacing this row with a functional line.

As far as I understand you need the right identifier for splitting the line into parameters param_sep = data[2] record_sep = data[6]

In my header from Open Cascade export these identifiers are not there. The iges file itself is readable for example in Creo.

Regards, Martin

mikamove commented 1 year ago

I encountered the same issue when loading a file created by recent AutoCAD, which procudes exactly this Header format.

According to http://paulbourke.net/dataformats/iges/IGES.pdf, p. 15 there are four possible formats:

grafik

The given example has Form 1.

pyiges wrongly assumes Form 2 and determines the delimiters 3, p instead of ,, ;:

,,31HOpen CASCADE IGES processor 7.4,13HFilename.iges,                  G0000001
  ^   ^

I provide a solution via #32 feel free to see if You have time.

mikamove commented 1 year ago

@akaszynski @msc-turb I think this can be closed