Advice

Dirk S.

Looking around for some CAD
Hi All,

I would like to play around with the ActiveData libs to see if I can create a model derived from ActData_BaseModel from which I can add metadata to parts and faces.
For that it is suggested to work with XDE but if I am correct that conflicts with the OCAF model of ActiveData. I would like to be able to import a step file, add metadata to parts and faces and view the assembly. Saving and loading the model should also be possible.
I don't need the option to export to a neutral format.

Should I just stick with XDE and add the metadata there if possible or is there a way to transform an XDE document to a "normal" OCAF document?
Any advice would help!

Best regards,
Dirk
 

Quaoar

Administrator
Staff member
Hey Dirk. I would recommend keep using XDE for adding your metadata as it should be not too difficult to do: you just add some more OCAF attributes under the corresponding labels. This way, for example, we added triangulation parameters for parts as well as some alternative representations of their geometries, e.g., meshes (surface and volumetric).

One problem you might easily encounter with XDE (aside from its "nice" API) is how to attach an attribute to a specific occurrence of a part in an assembly. Imagine you have two bolts, both being instances of the same "prototype" part. Then imagine you want to assign some boundary condition for a face on one bolt occurrence but not on the another (stupid example, but anyways). This is where XDE stops shining as here the object you wanna reference is not a prototype anymore but an occurrence. Such occurrences are not addressed by distinct OCAF labels, and generally speaking you'll have to address them by their paths in the assembly graph (stuff like "0:1:1:1/0:1:1:1:2/..."). This is what we call and "assembly item" and it was quite an annoying "discovery" of the simple fact that an assembly is not a tree but a hierarchical graph. Still, it is possible to add some indirect references to such occurrences in XDE, but you'll have to use string references which are "weak" as they wouldn't get updated automatically if something is changed in your model. Having said that, I can add that we successfully used this approach in quite a couple of commercial products that are still being marketed by OCC.

With Active Data, you'll pretty much have to start from scratch. It was initially designed to ease your life when building pre-/post-processing software (like Salome or Ansys Workbench) and it was never heavy-tested on huge and even moderate CAD assemblies. What might happen is that Active Data will create tons of labels where you might want to have just a couple (and this is the case of XDE).

If I were in your shoes and had enough time for reengineering this whole thing, I would probably try something completely different, such as SQLite for organizing assemblies. Have you considered such options?
 

Dirk S.

Looking around for some CAD
Hi Quaoar,

Thank you for the detailed reply! I will stick with XDE. Unfortunately not a lot of free time to try SQLite.
 
Top