Forum archiveIssue archiveOther usage issues

Archived discussion

assembly in XDE

Other usage issuesMon, 04/21/2008 - 16:553 replies

Browse this forum
QuestionAuthor

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

Author

Discussion

3 archived replies

Posts are displayed in their archived order.

01Author

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
Author
___________________________

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

02Commenter-1

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

03Author

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

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

greets Author