Forum archiveIssue archiveModeling Data and Algorithms

Archived discussion

ByteArray Stream of STL file into TopoDS_Shape

Modeling Data and AlgorithmsMon, 06/19/2023 - 12:371 reply

Browse this forum
QuestionAuthor

Dear OCCT Community,

I have a bytearray of an STL file and I would like to set into TopoDS_Shape (or any data structure of OCCT for visualizing as AIS_Interactive Context). 

As a workaround, we read this bytearray using the RwStl class after saving it to the stl file. However, this causes performance loss. Is there an easy and direct way to do this?

Thank you in advance!

Best regards

Discussion

1 archived reply

Posts are displayed in their archived order.

01Commenter-1

Hello,

Please take a look into RWStl_Reader::ReadBinary(...) or RWStl_Reader::ReadAscii(...)

This class and methods be able to read from std::istream

Best regards, Commenter-1.