How to create an XDE document

I'm trying to export geometry & basic metadata from our software package to STEP.  I know I need to use XDE in order to pass assemblies, colors, and layers.  I'm quite familiar with converting data between different file formats, but I'm not at all familiar with XDE.  I've been reading the user guide for XDE at:

https://dev.opencascade.org/doc/overview/html/occt_user_guides__xde.html

However, I'm having trouble understanding some of the terminology and high-level process flow.  The docs seem to explain the details, without ever explaining the high level view of how things work together or what certain terms mean, which makes the docs very hard to understand.

The general layout of our internal 3D model is that our model contains a bunch of assemblies.  Each assembly can belong to a particular layer.  Each assembly contains one or more physical parts.  Each part can have a unique color.  There may be multiple copies of each unique part at different locations either within one assembly or in different assemblies.  Each assembly and each part have their own names, and those names may not be unique.

How do I go about filling an XDE document(?) with this information so that I can then write it out to a STEP (or, eventually, IGES) file?

If there was some well-documented, sample C++ code that I could look at, that would be very helpful.  I've looked at the files in the "samples/ocafsamples" directory, but that merely shows individual function calls, not the entire program flow.

I do already have working code that exports just the shape geometry to STEP without using XDE, but I really need to export the assemblies, colors, and layers along with that.

Can anybody help me out?

Forum supervisor's picture

Hello Ben,

We may offer you our Advanced XDE sample that is available within A la Carte support programs.

You may also consider buying the source code of the CAD Assistant application (see https://www.opencascade.com/content/cad-assistant ).

Please, contact us for more informaiton.

Best regards,

Forum supervisor

Ben Hollingsworth's picture

Where can I find more info and pricing on either of those options?

Kadir Canik's picture

Can i get price for advanced sample?

Is CAD assistant an MFC project or can i get a working MFC project?

Best regards.