DiscussionsIssue archiveVisualization and 3D Viewer

Archived discussion

The Triedron changes position

Visualization and 3D ViewerFri, 03/04/2022 - 05:556 replies

Browse this forum
QuestionAuthor

Hi,
I use OCC to display a coordinate system. When I zoom the window, the coordinate system shifts!
This problem also exists in the OCC sample androidqt Who can help me?

The code below:
V3d_View::TriedronDisplay(Aspect_TOTP_LEFT_LOWER,Quantity_NOC_RED, 0.1, V3d_ZBUFFER);

Discussion

6 archived replies

Posts are displayed in their archived order.

01Commenter-1

You are zooming into an empty scene?

02Author

No,I only changed the size of the view window, which is easy to happen when the height is getting smaller and smaller!

03Commenter-1

If you application is not expected to work as a tiny horizontal viewer, then it makes sense preventing window resize smaller than predefined values.

Otherwise, you may override Graphic3d_Camera::FOV2d() default value (set to 180 degrees) to something less reliable like 360 degrees.

04Author

Thank you for your reply.
I modified the value and it didn't take effect.
The code below:
myView->DefaultCamera()->SetFOV2d(360.0);

Is there something wrong?

05Commenter-1

Your code changes V3d_View::DefaultCamera(), not active camera (V3d_View::Camera()). Not sure that your code makes any change.

06Author

I use active camera,the problem also occurs.