DiscussionsIssue archiveOther usage issues

Archived discussion

AIS object Selection problem using SetLocation

Other usage issuesWed, 06/01/2011 - 12:353 replies

Browse this forum
QuestionAuthor

Hello,

When I change the position of AIS_InteractiveObjects with Ais_InteractiveContext->SetLocation() I get the object hilighted in the original position.

I create some object in this way :
...
pObject=new AIS_Shape();
...
myAISContext->Display(pObject,Standard_False);
myAISContext->ResetLocation(pObject);
myAISContext->SetLocation(pObject, TopLoc_Location(ActTrsf) );
myAISContext->Activate(pObject);

I have tried to chane the location of the AIS_InteractiveObject before display it, but the result is the same.

How can I update the selection of the objects displayed ?

Discussion

3 archived replies

Posts are displayed in their archived order.

01Author

Hello,

I have solved the problem calling two times the SetLocation() method.
It seem that the first call sets correctly the location for visualization but do somethink wrong for the selection.
Calling twice the SetLocation() method all seems works well.
My object are displyed without local context.
The final code is:
myAISContext->Display(pObject,Standard_False);
myAISContext->Activate(pObject);
myAISContext->ResetLocation(pObject);
myAISContext->SetLocation(pObject, TopLoc_Location(ActTrsf) );
myAISContext->SetLocation(pObject, TopLoc_Location(ActTrsf) );

Have anyone any other suggestion ?

02Commenter-1

Hi Author,

Thanks a lot for this find, that helped me.
Looks like the issue will be fixed in 6.8.0...

Thanks again,

-jelle

03Commenter-2

Using 6.3.1 I was not able to fix the problem until I found that after a call to the function myAISContex​->UpdateCurrentViewer(); must be called again myAISContext->SetLocation(pObject, TopLoc_Location(ActTrsf) );

I hope this can help.

-Andrea