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

Hi,Gentlemen:
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)

Tilman Leune'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

lch0515l's picture

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