DiscussionsIssue archiveOther usage issues

Archived discussion

Draw XYZ-axis in the corner of view window

Other usage issuesWed, 06/30/2010 - 20:356 replies

Browse this forum
QuestionAuthor

Is there an easy way to add XYZ-axis in the corner of view window?

Thanks,
Author

Discussion

6 archived replies

Posts are displayed in their archived order.

01Commenter-1

To control displaying of "thick" colored trihedron you may use the following methods of V3d_View class:

V3d_View::TriedronDisplay
V3d_View::TriedronErase
V3d_View::ZBufferTriedronSetup

Here is an example of C++ code suitable for insertion into MFC method void CSampleView::OnInitialUpdate():

myView->ZBufferTriedronSetup(Quantity_NOC_RED,Quantity_NOC_GREEN,Quantity_NOC_BLUE1,0.8,0.05,12);
myView->TriedronDisplay(Aspect_TOTP_LEFT_LOWER,Quantity_NOC_WHITE,0.2,V3d_ZBUFFER);

For a simpler trihedron you can choose V3d_WIREFRAME instead of V3d_ZBUFFER as last parameter to TriedronDisplay. Then ZBufferTriedronSetup() should not be necessary.

Kind regards,
Commenter-1

02Author

Thanks a lot, Timo.

03Author

Hi, Timo:

I did see beautiful 3-color triedron, but the weird thing is, when I pan the object in the view, triedron will follow.

Any advices?

04Commenter-1

This behaviour was fixed in the maintenance release 6.3.1 of Open Cascade.
So, either you contact OCC company to get this release.
Or you wait for the public release of OCC 6.4 in December 2010.
Or you look at http://sourceforge.net/projects/opencascade/files/
There is also a Fix (fix235) for this problem.
It says in readme.txt:
- Summary: Incorrect placement of ZBuffer trihedron
- Detailed description: OpenGl_triedron.c used weird check isWithinView and correctly placed ZBuffer trihedron only when the model went out of the view. Fix ignores this check. Sergey Anikin claimed this must have been fixed in 6.3.1.

Commenter-1

05Commenter-2

"Wait for half a year to get a fix for a solved problem"
I do not know whether to laugh or weep when I read this.

06Author

Thank you so much, Timo. You are so kind. I will get fix from Sourceforge.