Reading IGES from stream seems broken on 7.7.0

Hello,

Reading an IGES from file works as expected:

IGESCAFControl_Reader reader;
reader.ReadFile("some_file.iges");

But is not working when reading from stream (IFSelect_RetFail is returned):

IGESCAFControl_Reader reader;
std::ifstream stream("same_file.iges", std::ifstream::in  | std::ifstream::binary);
reader.ReadStream("", stream);

Please note that that there's no issue with the STEPCAFControl_Reader.

Dmitrii Pasukhin's picture

Hello, thank you for your resource.

Can you share an IGES files? This problem reproduce only on one file or it is for a lot of files?

Best regards, Dmitrii.

Antoine H's picture

The issue appears on all files that I have so far. Here's attached a simple cube.

I just tested on 7.7.1, same issue.

Attachments: 
gkv311 n's picture

Apparently, IGESSelect_WorkLibrary doesn't implement ReadStream() interface, and I don't see any in IGESFile_Read/igesread.c that would be able to handle C++ streams.

Dmitrii Pasukhin's picture

Thank you for your research.

We will plan this for integration. It will be a part of DE wrapper pathing or that should be better develop as a child of. (0033301: Data Exchange, DE Wrapper - Replacing own XDEDRAW transfer commands to DE - MantisBT (opencascade.org)

Best regards, Dmitrii.