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

Why I can't identify my AIS_Shape in my Interactive Context ?

Mathieu's picture
Forums: 

Hello,
I\'m creating an AIS_Shape like this :

gp_Pln tmpPln = gp_Pln(pnt, dir);
BRepBuilderAPI_MakeFace MakeFace(tmpPln, UMin, UMax, VMin, VMax);
TopoDS_Face S = MakeFace.Face();
myBox = new AIS_Shape(S);

This shape is displayed in my Interactive context like this :
Handle(AIS_InteractiveContext) context = myDocument->getContext();
context->Display(myBox);

This is good working.

Now, I want to select my shape with my mouse to apply a translation.
When my shape is hilighited, this function is run :

myContext->Select();
myContext->InitSelected();
while(myContext->MoreSelected())
{
if(myContext->HasApplicative())
{
//This code is never executed, why ?
}
else
{

}
}

I don\'t know how to identify the selected AIS_Shape in order to apply the good transformation (I\'ve many AIS_Shape in my view).

myContext->SelectedShape() is true but I don\'t know how to identify the AIS_Shape with this TopoDS_Shape object.

Thank you for your help.

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.