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

Assign an arbitrary point position on a shape as the viewing rotation center?

c.h.Liu's picture

I am new to occ, (still in assessment process)
When experiencing the drawexe.exe (test harness), I had a viewing problem.
Is there a way to assign an arbitrary point position on a shape as the viewing rotation center?
It seems only rotating around (0,0,0) of any shape in the viewer.
What if the bounding box of the shape does not contain (0,0,0), on the contrary, it is very far from (0,0,0)? (such as the back-door of a car:
the center of a car model is usually between under the two front head-lights)
When i rotate the view, the back-door shape just swing out of the view.
How can i prevent this?
Please give me a hint? (using what tcl command,or what c++ functions?)
(i can understand both)

Gerrit Bette's picture

this is controlled through the v3dView class.

use v3d_view::Rotate():

from the Reference manual:

Standard_EXPORT void Rotate (const Quantity_PlaneAngle Ax, const Quantity_PlaneAngle Ay, const Quantity_PlaneAngle Az, const V3d_Coordinate X, const V3d_Coordinate Y, const V3d_Coordinate Z, const Standard_Boolean Start=Standard_True)

Rotates the eye about the coordinate system of
reference of the screen
for which the origin is Gravity point {X,Y,Z},
with a relative angular value in RADIANS with respect to
the initial position expressed by Start = Standard_True

c.h.Liu's picture

Much thank,Tilman. I'll try it latter.

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.