cbernardo / libIGES

Implementation of the IGESv5.3 specification
http://cbernardo.github.io/libIGES
GNU Lesser General Public License v2.1
58 stars 18 forks source link

Micro USB socket from Molex can not be read #2

Closed nickoe closed 9 years ago

nickoe commented 9 years ago

This is against ec73b476cd61dd37df7a7deb0067f486f4a3a421

I tried to fetch a model from the Molex home page. If that direct link does not work, you should be able to deduce the partnumber and serach for it.

http://www.molex.com/elqNow/elqRedir.htm?ref=http://www.molex.com/pdm_docs/igs/47346-0001_igs.zip

┌─[nickoe ~/libIGES/build]
└─ $ ./readtest ../parts/473460001.igs 
/home/nickoe/libIGES/src/entities/iges_entity.cpp:1005:ReadDE(): 
 + invalid Structure pointer (1); must be <= 0
/home/nickoe/libIGES/src/entities/entity314.cpp:262:ReadDE(): 
 + [INFO] failed to read Directory Entry
/home/nickoe/libIGES/src/iges/iges.cpp:1426:readDE(): 
 + [INFO] could not read Directory Entry
/home/nickoe/libIGES/src/iges/iges.cpp:459:Read(): 
 + [INFO] problems reading file DIRECTORY section
 + filename: '../parts/473460001.igs'
Oops - too bad, better luck next time
 + [INFO] Entities culled: 0
 + [INFO] Entities remaining: 0
/home/nickoe/libIGES/src/iges/iges.cpp:528:Write(): 
 + [INFO ] no entities to save
cbernardo commented 9 years ago

Thanks Nick, this one will take a little longer to fix; there are several issues:

  1. As the messages say, there is something wrong with the IGES file. In this case the problem can simply be ignored (invalid value in 'Structure' element of directory entry). Whatever software Molex is using is putting a '1' in that position while only 0 or negative values are allowed by the specification.
  2. Support is required for B-REP entities (6 entities) + Conic Arc.

So we've barely begun and we can already see some inconsistencies in different IGES files depending on the source. It may take me a few months to code all 7 required entities; after all the total number so far is 16 entities and that has taken me since November last year.

cbernardo commented 9 years ago

The necessary objects have been coded; more with other models using Manifold Solid B-Rep Objects (for example other IGES models generated by Pro-E) will be required.