MantisBT - Open CASCADE
View Issue Details
0029388Open CASCADE[OCCT] OCCT:Visualizationpublic2017-12-15 11:142019-08-15 17:50
abv 
bugmaster 
normalminor 
verifiedfixed 
[OCCT] 6.8.0 
[OCCT] 7.4.0* 
Not required
0029388: Visualization - Setting camera eye position to (0,0,0) kills the application
Setting camera eye position in 3d viewer to (0,0,0) kills the application.

The reason is that "eye" and "center" of the camera are parameters manipulated independently, and center is at (0,0,0) by default. Vector from the eye to the center defines view direction. When eye is set to (0,0,0), this direction becomes indefinite (see Graphic3d_Camera::Direction()). (In debug mode, exception is thown by gp_Dir constructor.)

It sounds reasonable storing Direction() within Graphic3d_Camera independently from Center/Eye, so that it remains always valid.
Setting Eye directly:
pload AISV MODELING
box b 10 10 10
vdisplay b
vviewparams -eye 0 0 0 


Eye becomes equals to Center within Fit All due to floating point precision limitations (crashes in Debug mode):
pload MODELING VISUALIZATION
box b 5.0e+21 1000.0 350.0
vclear
vinit View1
vaxo
vcamera -persp
vdisplay -dispMode 1 b
vfit

No tags attached.
related to 0028033new  Visualization - Graphic3d_Camera::ZFitAll() throws exception on camera rotation 
related to 0029837verified bugmaster Visualization, Graphic3d_Camera - Fit All operation works incorrectly on flat object 
Issue History
2017-12-15 11:14abvNew Issue
2017-12-15 11:14abvAssigned To => kgv
2017-12-15 11:37kgvRelationship addedrelated to 0028033
2018-03-25 12:05kgvTarget Version7.3.0 => 7.4.0*
2018-06-14 17:51kgvRelationship addedrelated to 0029837
2018-06-14 17:56kgvDescription Updatedbug_revision_view_page.php?rev_id=19284#r19284
2018-06-14 17:56kgvSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=19286#r19286
2019-06-26 08:13kgvAssigned Tokgv => tizmaylo
2019-06-26 08:13kgvStatusnew => assigned
2019-08-12 14:31kgvNote Added: 0086189
2019-08-12 14:31kgvAssigned Totizmaylo => abv
2019-08-12 14:31kgvStatusassigned => resolved
2019-08-12 14:36abvAssigned Toabv => bugmaster
2019-08-12 14:36abvStatusresolved => reviewed
2019-08-12 14:36abvStatusreviewed => verified
2019-08-12 14:36abvResolutionopen => fixed
2019-08-15 17:50bugmasterTest case number => Not required

Notes
(0086189)
kgv   
2019-08-12 14:31   
Proposed change (store direction instead of a point) has been implemented in scope of 0029837, therefore test case will not throw exception.