View Issue Details

IDProjectCategoryView StatusLast Update
0024119CommunityOCCT:Visualizationpublic2014-03-04 10:44
Reportermach22 Assigned Tomach22  
Status closedResolutionfixed 
PlatformWindowsOSVC++ 2012 
Product Version6.6.0 
Target Version6.7.0Fixed in Version6.7.0 
Summary0024119: Dynamic operations on the v3d view can not be simultaneously used with V3d_View::Eye(...) getter
The description of the problem, reported by mach22
I need to get the Eye position every time using the DynamicRotation change the position of the eye. but if I call the method
V3d_View::Eye(V3d_Coordinate &X, V3d_Coordinate &Y, V3d_Coordinate &Z) const
something change in the state of the view and when I activate the DynamicRotation the objects in the scene seem to change their position jumping from a frame to another.

V3d view features interactive operations: Rotation, Panning, Zooming. To perform these operation, the one can call an appropriate method ("Rotation", "Panning", ...) passing a value of special "toStart" flag as TRUE. The method remembers initial state of view or mouse coordinates in a set of temporary variables. Then, the operation can be performed by calling the same method with new mouse cursor position, and "toStart" value equal to FALSE. Using the temporary data, the method derives difference of mouse cursor coordinates, or view state, and performs transformation, relative to the initial state of the view.

The problem is that, in general, these operations remember the initial state in form of static variables - the same ones, which are, for some reason, silently modified by logically independent getters, like Eye(...) or FocalReferencePoint(...).

Calling such methods, like Eye, during the interactive operation will lead to undefined behavior on the next step.
Steps To ReproduceUsing the samples provided with the latest release, running the Geometry project.
in the GeometryView.cpp file, in the OnMouseMove method I have added the call to the Eye method in the DynamicRotation section like this:

case CurAction3d_DynamicRotation :

  V3d_Coordinate x, y, z;

Additional information
and documentation updates
I have added the modified file for the sample
TagsNo tags attached.
Test case numberNot needed

Attached Files

  • GeometryView.cpp (15,051 bytes)
  • dynamic_rotation_sample.png (69,578 bytes)


related to 0024413 closedabv Open CASCADE Visualization - get rid of projection shift from orthographic camera definition 



2013-08-21 03:48


GeometryView.cpp (15,051 bytes)


2014-02-17 16:35

developer   ~0027929

Dear apl,

could you please revise bug description?


2014-02-17 19:07


dynamic_rotation_sample.png (69,578 bytes)


2014-02-17 19:12

developer   ~0027934

Last edited: 2014-02-17 19:22

Dear Bugmaster,

The problems with static variables in interactive operations on v3d view were fixed with implementation of camera approach #24001.

Could you please check, on current occt master, the MFC Geometry sample with modified "GeometryView.cpp" that the problem is not reproduced anymore? The source file can be found in attachments.

The dynamic rotation operation is shown on illustration.

Thank you!


2014-02-27 18:07

administrator   ~0028056

Dear APN,

Please check request of APL


2014-03-04 10:44

administrator   ~0028113

Problem is not reproduced on current occt master with modified "GeometryView.cpp" on MFC Geometry sample.

Issue History

Date Modified Username Field Change
2013-08-21 03:48 mach22 New Issue
2013-08-21 03:48 mach22 Assigned To => san
2013-08-21 03:48 mach22 File Added: GeometryView.cpp
2014-02-17 16:34 kgv Relationship added related to 0024413
2014-02-17 16:35 kgv Note Added: 0027929
2014-02-17 16:35 kgv Assigned To san => apl
2014-02-17 16:35 kgv Priority urgent => normal
2014-02-17 16:35 kgv Severity major => minor
2014-02-17 16:35 kgv Status new => feedback
2014-02-17 18:07 apl Summary calling the method V3d_View::Eye(...) change the state of the view => Dynamic operations on the v3d view can not be simultaneously used with V3d_View::Eye(...) getter
2014-02-17 18:07 apl Description Updated
2014-02-17 19:07 apl File Added: dynamic_rotation_sample.png
2014-02-17 19:08 apl Assigned To apl => bugmaster
2014-02-17 19:12 apl Note Added: 0027934
2014-02-17 19:16 apl Description Updated
2014-02-17 19:22 apl Note Edited: 0027934
2014-02-27 18:07 bugmaster Note Added: 0028056
2014-02-27 18:08 bugmaster Assigned To bugmaster => apn
2014-03-04 10:44 apn Note Added: 0028113
2014-03-04 10:44 apn Assigned To apn => mach22
2014-03-04 10:44 apn Status feedback => closed
2014-03-04 10:44 apn Resolution open => fixed
2014-03-04 10:44 apn Fixed in Version => 6.7.0
2014-03-04 10:44 apn Target Version => 6.7.0
2014-03-04 10:44 apn Test case number => Not needed