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

Failure when Trying to Copy a TopoDS_Shape

Omar Msaaf's picture
Forums: 

Hello, I tried to perform some elementary transformations on some selected shapes, but i had nothing displayed on the screen. So i tried to create a copy of the selected shapes, but at run time, tryng to perform this creates the application to shutdown with an error message. Does any one have a clue.. Here is the code used when i try to translate a shape, but it doesn't work. Having help on it would be great.. Best Regards Omar Msaaf

TopoDS_Shape aShape = myAISContext->SelectedShape(); gp_Trsf T; T.SetTranslation(gp_Pnt(10.,20.,0.),gp_Pnt(60.,0,0.)); BRepBuilderAPI_Transform Trsf(T); Trsf.Perform(aShape); TopoDS_Shape NewShape = Trsf.Shape(); Handle(AIS_Shape) View_NewShape = new AIS_Shape(NewShape); View_NewShape->SetColor(Quantity_NOC_AQUAMARINE1); View_NewShape->SetMaterial(Graphic3d_NOM_SHINY_PLASTIC); View_NewShape->SetDisplayMode(1); myAISContext->Display(View_NewShape);

I perform aftewards a Fit() Operation...