How to make an AIS_InteractiveObject always visible(on top)?

Hi,

How is it possible to make an AIS_InteractiveObject always completly visible?
Please give what is needed if it cannot be done directly through InteractiveObject's class interface.

Thanks.

Miguel Costa's picture

Hi Hugues,

I am working on an OCC interface and I need to make and AIS_Trihedron always on top. Did you have any chance with this feature of an AIS_InteractiveObject always visible?

If anyone can help that would be appreciated.

Miguel

Patrik Mueller's picture

Hi Miguel,

is this sufficient:

m_pAISView->TriedronDisplay(Aspect_TOTP_LEFT_LOWER, Quantity_NOC_BLACK, 0.08, V3d_ZBUFFER);
where m_pAISView is of Handle(V3d_View)?

You have to add it to your view creation...

Greets,

Patrik

Miguel Costa's picture

Hi guys,

Thanks a lot for your help, what patrick suggested works perfectly fine. I will have to find a way to make all my AIS_Trihedron always on top (I need also put a trihedron on the selected faces), but the most important part was for the trihedron that indeed to symbolize how the global 3D space is.

And Hugues, for the bug about that the selection of the trihedron, I had a similar problem. Maybe this won't help you, but what I did was to check if the selected object wasn't a trihedron before doing things with the selected object.
if(myAISContext->SelectedInteractive()->Signature() != 3)
where myAISContext is an AIS_InteractiveContext and SelectedInteractive() return an AIS_InteractiveObject

I agree that the look of the trihedrons is pretty bad, but I think there's a way to change that. If I find something I'll tell you.

Many thanks, you saved me a lot a job. I'm sorry I couldn't help you more.

Miguel

Hugues's picture

Hi Miguel,

Actually I also want to display an AIS_Trihedron on top. I have had no success with this class. I would like to display trihedrons that show the user the planes where specific computations are made.
OpenCascade's AIS trihedrons are pretty ugly and the display gets rapidely buggy(with selections).
As Patrick suggested, if you want to have a trihedron that symbolizes how the global 3D space is, then V3d_View::TrihedronDisplay() is a working solution.