Best practice to store a sub-shape in OCAF hierarchy

Suppose I have a solid which is stored as an attribute to a label, directly below to the root in an OCAF hierarchy. I would like to assign attributes to the solid's faces and edges. I do not think I can store the sub-shapes in a proper tree hierarchy, as in solid --> shell --> face --> wire --> edge, as then I would have duplicate faces and edges under different shells and wires. Would it then be recommended to store all sub-shapes directly under the solid label? I thought this would ensure non-duplication, but I am wondering if there is any side effect to this.

Many thanks,
Dan

Benjamin Bihler's picture

I guess that this depends on what you want to do with your OCAF hierarchy. Do you want to display it in a tree view? Will every label be a node of the tree? Would the user then prefer to see the sub-shapes in sub-hierarchies? So probably there is no definite answer to your question.

Benjamin

Daniel Woodman's picture

Many thanks Benjamin. My current objective is to pass attributes and children from one shape to another if the first shape is used to create the second one. So, at the moment I do not need to store the actual tree hierarchy. Maybe I will try this approach first and see if there is any problem.

Dan