Trihedron not zoomable

I want to make my trihedron unzoomable. I have used unsetsize() but doesn't work.
I have used Handle(AIS_Trihedron) Trihed; for the declaration of my Trihedron.
Thanks for your help

EricThompson's picture

You can use

SetTransformPersistence( Graphic3d_TMF_ZoomPers );

which causes the trihedron to remain the same size, but still rotate and translate. However, when I use this I have trouble with the trihedron display getting clipped.

I've tried fiddling with the view, adjusting SetDepth(), SetZClippingDepth(), SetZClippingType(), and SetZClippingWidth() with no success.

Any suggestions on how to avoid this clipping issue would be appreciated.

P Dolbey's picture

With 6.3 I had a lot of fun get trihedron to work without clipping. if you can get bthis link to work (shows the diffs between the original code and my mods)

you'll see that I had to unset and reset the clipping planes to get it work with clipped models

Might work for you.


JuryS's picture

Hi guys ! It's a cool with using QTOCC_PATCH on OpenGl_triedron.c
But I'm try to put the triedron in 0,0,0 point. I think that is more userfull because we are need to know where we now in the work scene.

There is no implementation for this reason. Aspect_TOTP_CENTER, Aspect_TOTP_LEFT_LOWER, Aspect_TOTP_LEFT_UPPER, Aspect_TOTP_RIGHT_LOWER, Aspect_TOTP_RIGHT_UPPER. But how we can make the position 0,0,0 or any function for put triedron in this location.

Many thanks for your answer.

EricThompson's picture


Instead of calling TrihedronDisplay to create your trihedron, try creating an instance of an AIS_Trihedron and displaying that in your context:

Handle(Geom_Axis2Placement) anAxis = new Geom_Axis2Placement( gp::XOY() );
Handle(AIS_Trihedron) mTrihedron = new AIS_Trihedron( anAxis );
mContext->Display( mTrihedron );

EricThompson's picture

I think I figured out my issue. I had called SetZClippingType( ), but I later call ZFitAll(). ZFitAll appears to reactivate the Z clipping, even though it does not change the ZClippingType(). Removing the calls to ZFitAll appears to have fixed my problem.