assembly in XDE

Hi community!

refering to site 30 of the XDE guide:

Can someone give me someone a simple example how i can make 4 Shapes to 2 assembly's?? Because i can work it out with the 40 sites of the guide and i read it now for 2days...

thanks in advance

Mathias

Mathias Neyer's picture

sry for bad language ability

i try it a second time
Can someone please give me a simple example how i can make 4 Shapes to 2 assembly's in a XDE doc?? Because i can't work it out with the 40 sites of the guide and i read it now for 2days...

Best Regards
Mathias
___________________________

PS: it must not be code at all just a few tipps where pretty nice

Marco Matt's picture

To tell the truth I'm not sure to understand you question.

I hope the following code will help you.

TopoDS_Solid s1 = BRepPrimAPI_MakeBox(10, 10, 10).Solid();
TopoDS_Solid s2 = BRepPrimAPI_MakeCylinder(5, 20).Solid();
TopoDS_Compound comp;
BRep_Builder builder;
builder.MakeCompound(comp);
builder.Add( comp, s1 );
builder.Add( comp, s2 );
Handle(XCAFDoc_ShapeTool) shapeTool = XCAFDoc_DocumentTool::ShapeTool(currentDocument->Main());
TDF_Label compLabel = shapeTool->AddShape(comp, true);
# compLabel refers to an assembly

Mathias Neyer's picture

Thanks a lot that was exactly what i'm looking for...

.. sry again for my bad language skills... :-)

greets Mathias