It seems that Save and Load to not be an easy task for me at least.
Question: if you would like use an new CAD application, like Naro, which format would you prefer to be used for save/restore the file in application?
Probably would you prefer (Boundary Representation like) STEP one or OCAF one?
STEP one is great but save too few things. Also as is right now is pretty hard to import in Naro as Naro works with high level primitives. So, information like: layers, constraints (not yet implemented), CAM parameters, etc. , even combining of some complex shapes (we can define an extrude as a base of another extrude using a referencing shape named subshape) will generate extra geometry that is not possible to save to Step. Also, all parametric propagation will not be properly restored. (at least from my understanding of what Step can save)
OCAF in itself is a format that stores data. Is somehow similar with XML. So converting the Naro tree to OCAF and save it, will bring the advantage of saving full attributes of Naro (Naro can be extended to save almost everything, at least by design) but no other application will know how to import them.
Also, considering that you would prefer OCAF, why OCAF and not XML? XML at least can be read by all browsers, text editors with syntax highlighting (and why not by Notepad?) and any wide used language (C using libxml2, C++, Java, C#, Python, Delphi) and can be somehow easily generated by other users and also can be easily extracted some information without having dependencies to OpenCascade library.
Still blocked to answer on this question from one side, and not knowing how to make it work (mostly the Step solution) I start doing the insertion of infrastructure code and letting blank only the save/load part. There are two new inputs for getting a file from disk drive and two actions that have almost no code.
So if you have any idea, drop a line...