
Mon, 04/21/2008 - 16:55
Forums:
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
Mon, 04/21/2008 - 18:27
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
Tue, 04/22/2008 - 12:58
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
Tue, 04/22/2008 - 14:45
Thanks a lot that was exactly what i'm looking for...
.. sry again for my bad language skills... :-)
greets Mathias