For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings

 

Need to speed up your development?
Have a look at our:

Samples & Tools

 

Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

assembly in XDE

Mathias Neyer's picture
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

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'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

Contact us

Attention: DO NOT use this form for all kind of request for the removal of your personal data. Please follow this link for such cases.