I am working on a plugin for the rendering software Realsoft3D, this plugin introduces the modeling features of OpenCASCADE in that host program. First results are encouraging, see for instance..
My problem is that I have to implement the serialization of my 'shape' objects for the Realsoft3D binary files, that is I
need to save (for example) a TopoDS_Shape into an already opened
binary file. The same for loading. Then, it looks a bit like
the CArchive mechanism for MSFC technology (but I do not use MSFC).
Well, I cannot use the BRepTool::Write function because it uses an
ascii file (it would mix it with the stream containing other
Realsoft3D binary info.. I do not know if this is a good way to go..)
So I thought that a basic method could be to convert the
transient object to persistent object, then to save the persistent
object byte-by-byte on file. Is this possible? And how?