Grouping two shapes?

Hi all,


Is it possible to group two shapes in Open Cascade? Not fusing, grouping. If yes, please guide me relevant examples or pointers. 



qa qa's picture

Hello Rakesh,

OCCT provides such a container. It is called Compound. The following code snippet solves your problem:

TopoDS_Compound aCompound;
BRep_Builder aBuilder; aBuilder.MakeCompound(aCompound);
aBuilder.Add(aCompound, aShape1);
aBuilder.Add(aCompound, aShape2);

In general, it creates a new shape of the compound type and two shapes are added to this container shape.

qa qa

Rakesh Patil's picture

Thanks qa qa.. It works well for now :-)