1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-09 18:50:54 +03:00
occt/tests/bugs/modalg_2/bug20785
apl 197ac94e72 0024413: Visualization - get rid of projection shift from orthographic camera definition
From now on, the panning behavior of V3d_View completely corresponds to equal operations with camera. There is no more confusing "Center" property and "ProjectionShift" which were used to introduce composite panning, while respecting view referential points: At, Eye unchanged. The V3d_View::FitAll approach has been rewritten to do "fit all" geometrically, operating with frustum, to make it working for both orthographic and perspective projections.

1) Getting rid of ProjectionShift and Center property:
- Removed ProjectionShift property of Graphic3d_Camera.
- Removed confusing Center property of V3d_View (related to projection shift).
- Removed redundant code related to the Center property of V3d_View.
- Removed WindowLimit method of Graphic3d_Camera - no more used.

2) Improvements of fit all and selector:
- Improved FitAll operation of V3d_View and reused it in NIS_View - the perspective projection is now handled correctly.
- Revised code of Select3D_Projector class - can be defined with any given projection and model-view matrices.
- Modified StdSelect_ViewerSelector3d and ensured that panning, zooming and going into the view do not lead to unwanted re-projection of sensitives. The handling of perspective selection is revised.
- Take into account graphical boundaries of infinite structure on ZFitAll.

3) Improvements of camera:
- Introduced new z range scale parameter for V3d_View::AutoZFit. See, V3d_View::AutoZFitMode.
- Allow negative ZNear, ZFar for orthographic camera to avoid clipping of viewed model.
- Moved camera ZNear, ZFar validity checks to V3d_View level.
- Use more meaningful Standard_ShortReal relative precision for ZNear, ZFar ranges computed by ZFitAll.
- Use Standard_Real type for camera projection and orientation matrices.
- Extended camera to generate both Standard_Real and Standard_ShortReal transformation matrices using the same matrix evaluation methods and converted input parameters.

Correcting picking tests for perspective view

Modify v3d face test cases for 1px changes in face picking

Modified test cases for new arguments of vviewparams DRAWEXE command
2014-03-06 15:50:33 +04:00

48 lines
1.0 KiB
Plaintext
Executable File

puts "========"
puts "OCC20785"
puts "========"
puts ""
######################################################
# Surfaces are empty after shading
######################################################
set BugNumber OCC20785
restore [locate_data_file OCC20785.brep] result
set square 322688
set nb_v_good 119
set nb_e_good 199
set nb_w_good 96
set nb_f_good 87
set nb_sh_good 1
set nb_sol_good 1
set nb_compsol_good 0
set nb_compound_good 0
set nb_shape_good 503
vinit
vdisplay res
vsetdispmode 1
vfit
set only_screen 0
set scale 2.7840527693872859
set center_X 3.7559505017270567e-07
set proj_X -0.89892524480819702
set proj_Y -0.37323716282844543
set proj_Z -0.22940616309642792
set up_X -0.41990724205970764
set up_Y 0.58468854427337646
set up_Z 0.69413024187088013
set at_X -44.6832661344329
set at_Y -21.4529078187916
set at_Z -95.9601818852522
vviewparams -scale ${scale} -proj ${proj_X} ${proj_Y} ${proj_Z} -up ${up_X} ${up_Y} ${up_Z} -at ${at_X} ${at_Y} ${at_Z}
set only_screen 0