
Fri, 03/03/2017 - 19:18
Forums:
Hello,
I'm wondering if there is a way to write the Stereolithography (STL) data from a TopoDS_Shape to a container in program memory instead of to a file on disk.
I'm building an application where one component needs to read an STL file for a lot of objects and I don't want the disk I/O overhead.
Thanks
Mon, 03/06/2017 - 08:27
Hello John,
We have sent a private reply to you - please, check your mailbox.
Best regards,
Forum supervisor
Mon, 03/27/2017 - 11:24
Hello John,
You can use the gmio library.
gmio supports writting the internal triangulation of TopoDS_Shape objects, see here for the list of supported OpenCascade classes.
gmio works on "abstract" streams it's not limited to files.
You can easily provide a stream of your own that writes to a memory block.
Note that gmio provides also ready-to-use streams for QIODevice and C++ std streams.