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

AIS_Shape detection problem in OCC 6.5.0

Alexander Bovsunovsky's picture
Forums: 

I create the AIS_Shape object:
//----------
Handle_AIS_Shape aAIS = new AIS_Shape( aShape);
pContext->SetMaterial( aAIS , aMaterial);
pContext->SetColor( aAIS , aColor);
pContext->SetDisplayMode( aAIS , AIS_Shaded, false );
pContext->SetLocation(aAIS ,aTrsf);
pContext->Display(aAIS ,false);
//----------
after that I update the Viewer.
It is strange, but my shape is displayd then at expected location and detected at start point (as if location was not applied).

Then if I change location:
//------------------
pContext->ResetLocation(àAIS);
pContext->SetLocation(aAIS,aTrsf);
//------------------
and update Viewer
my shape moves as expected and the detection position moves too!!

The AIS_Trihedron, for example, is displayed and detected as expected.

However that can be the "external" solution I have found for now is:
1) call
aAIS->SetTransformation(new Geom_Transformation(aTrsf))
before first pContext->Display()
2) call
aAIS->Redisplay()
after each next pContext->SetLocation()

Maybe some changes need to be done in AIS_Shape::ComputeSelection() to get it fixed...

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.