OCC functions to save and restore geometry as binary format

Hi! All

Is there any OCC functions to save and restore geometry as binary format?

I'd like to use the function to load geometry to parallel computer.
I will write geometry as binary stream in memory buffer and send them to the proper processors.

Can anybody give me the OCC function name for this or any advices about it?

Rob Bachrach's picture

You might want to look at the BinTools_ShapeSet class. As long as your memory buffer can be treated as a standard output stream, you might be able to make it work.

Rob

Thomas Paviot's picture

Hi,

In pythonOCC, the class BRepTools_ShapeSet is used to serialize classes that inherit from TopoDS_Shape. This feature was used to make a 'slicing' operation being distributed over many cores (on a multicore machine and using the 'processing' python module). This seems closely related to the subject you're working on.

The video of the program is available here:
http://www.pythonocc.org/PDE2009/Screencasts/parallel_slicing_pythonOCC.mov

And the python source code:
http://www.pythonocc.org/PDE2009/Python_Scripts/Concurrency/parallel_sli...

Hope this helps,

Best Regards,

Thomas

Hong-Jun Kim's picture

Thank you so much about all your help.
I will try what you guys mentioned and let me report the progress.
Thank you.