MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0029395Community[OCCT] OCCT:Visualizationpublic2017-12-20 12:082018-02-20 12:58
Reporterdipts 
Assigned Tokgv 
PrioritynormalSeverityminor 
StatusverifiedResolutionfixed 
PlatformWindowsOSVC++ 2015OS Version64 bit
Product Version[OCCT] 7.1.0 
Target Version[OCCT] 7.3.0Fixed in Version 
Summary0029395: Visualization, V3d_View - Grid disappears forever after enabling RayTracing
DescriptionAfter switching to raytracing (V3d_View::ChangeRenderingParams().Method = Graphic3d_RM_RAYTRACING) the grid disappears. It can never be reenabled, even after switching back to Graphic3d_RM_RASTERIZATION.

This does not happen if the grid was not enabled when switching to raytracing the first time. After that, the grid can be enabled or disabled, it is always shown correctly in all modes and after all switches.

This behaviour was found in OCCT 7.2.0 (can't select this version) with both rectangular and circular grid.

Steps To Reproducebugs vis bug29395

pload VISUALIZATION

# Rectangular Grid
vclear
vinit View1
vraytrace 0
vgrid r
vraytrace 1
checkcolor 198 197 0.5 0.5 0.5 
vclose

# Circular Grid
vclear
vinit View1
vraytrace 0
vgrid c
vraytrace 1
checkcolor 198 197 0.5 0.5 0.5
TagsNo tags attached.
Test case numberbugs vis bug29395
Attached Files? file icon RaytracingGrid.tcl (171 bytes) 2017-12-20 12:58

- Relationships

-  Notes
(0073043)
kgv (developer)
2017-12-20 12:25

> I found no grid-related commands in DRAW.
It is "vgrid".
(0073044)
dipts (developer)
2017-12-20 13:00

> It is "vgrid".
Sorry, my fault (and undocumented :) ).

I have uploaded a test script.
(0073284)
kgv (developer)
2018-01-10 14:27
edited on: 2018-01-10 14:33

The problem is that V3d_RectangularGrid/V3d_CircularGrid do not implement automatic re-compute logic.

If you would like providing a patch - you can correct V3d_RectangularGrid/V3d_CircularGrid to follow the same logic
as V3d_Trihedron (specifically - see V3d_Trihedron::TrihedronStructure implementation in V3d_Trihedron.cxx):

//! Dummy implementation of Graphic3d_Structure overriding
//! ::Compute() method for handling Device Lost.
class V3d_Trihedron::TrihedronStructure : public Graphic3d_Structure
{
public:
  //! Main constructor.
  TrihedronStructure (const Handle(Graphic3d_StructureManager)& theManager,
                      V3d_Trihedron* theTrihedron)
  : Graphic3d_Structure (theManager), myTrihedron (theTrihedron) {}

  //! Override method to redirect to V3d_Trihedron.
  virtual void Compute() Standard_OVERRIDE { myTrihedron->compute(); }

private:
  V3d_Trihedron* myTrihedron;
};


(0073828)
git (administrator)
2018-02-06 00:13

Branch CR29395 has been created by dipts.

SHA-1: 8c1599baa57936a45f2ae7f50fe8b11648824da3


Detailed log of new commits:

Author: dipts
Date: Mon Feb 5 22:11:42 2018 +0100

    0029395: Grid disappears forever after enabling raytracing
    
    Custom Graphic3d_Structure implementation has been added to V3d_RectangularGrid and V3d_CircularGrid to trigger recompute in case of device lost.
(0073829)
dipts (developer)
2018-02-06 00:20

Dear kgv,
thanks for giving me a point to start off. The branch is ready to review.
(0073881)
kgv (developer)
2018-02-08 13:54

New warnings appears: 2
 
Type : MSBuild
Category : C4355
File Name : c:/builds/CR29395-master-KGV/OCCT_SRC/src/V3d/V3d_CircularGrid.cxx
Line : 65
Message : this : used in base member initializer list

Type : MSBuild
Category : C4355
File Name : c:/builds/CR29395-master-KGV/OCCT_SRC/src/V3d/V3d_RectangularGrid.cxx
Line : 64
Message : this : used in base member initializer list
(0073895)
git (administrator)
2018-02-08 23:07

Branch CR29395 has been updated by dipts.

SHA-1: 55e0c37779ef2fdfcf6000529411b908724ecafe


Detailed log of new commits:

Author: dipts
Date: Thu Feb 8 21:05:54 2018 +0100

    # Moved initialization of structure member to constructor code to avoid warning C4355.

(0073896)
dipts (developer)
2018-02-08 23:12

Corrected, please review.
(0073911)
git (administrator)
2018-02-11 09:51

Branch CR29395 has been updated forcibly by kgv.

SHA-1: d75a01296138d10101e79234d95ad05818d2b952
(0073918)
git (administrator)
2018-02-11 11:56

Branch CR29395 has been updated by kgv.

SHA-1: d4b08decf93af8f4312bf554f0a6f4585fe7a4ea


Detailed log of new commits:

Author: kgv
Date: Sun Feb 11 11:56:53 2018 +0300

    Do not compute primitive arrays before displaying the grid.

(0073919)
git (administrator)
2018-02-11 12:02

Branch CR29395 has been updated by kgv.

SHA-1: 3ad1671ed20493aaf1ffe772907e7a1e19668ba3


Detailed log of new commits:

Author: kgv
Date: Sun Feb 11 12:02:09 2018 +0300

    # adjust test case

(0073920)
git (administrator)
2018-02-11 12:07

Branch CR29395_1 has been created by kgv.

SHA-1: 5f6e3a0711c2562b899591b8087cd9ec7024b4eb


Detailed log of new commits:

Author: dipts
Date: Mon Feb 5 22:11:42 2018 +0100

    0029395: Visualization, V3d_View - Grid disappears forever after enabling RayTracing
    
    Custom Graphic3d_Structure implementation has been added to V3d_RectangularGrid and V3d_CircularGrid to trigger recompute in case of device lost.
    Primitive arrays are no more (re)computed while grid is not actually displayed.
(0073924)
kgv (developer)
2018-02-11 15:08

Please take the patch.

http://jenkins-test-10.nnov.opencascade.com:8080/view/CR29395_1-master-KGV [^]
(0073940)
apn (administrator)
2018-02-12 17:02

Combination -
OCCT branch : CR29395_1 SHA - 5f6e3a0711c2562b899591b8087cd9ec7024b4eb
Products branch : master SHA - 41720ba4c544483d56753d7b5ec17b6a72bfac64
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.

Number of compiler warnings:
No new/fixed warnings

Regressions/Differences/Improvements:
No regressions/differences

Test case:
bugs vis bug29395 - OK

CPU differences:
Debian70-64:
OCCT
Total CPU difference: 18308.899999999656 / 18375.13999999976 [-0.36%]
Products
Total CPU difference: 7488.24 / 7504.959999999995 [-0.22%]
Windows-64-VC10:
OCCT
Total CPU difference: 17676.11450769864 / 17692.572613198507 [-0.09%]
Products
Total CPU difference: 8067.061311599993 / 8097.855908999923 [-0.38%]

Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention

- Related Changesets
occt: master 5f6e3a07
Timestamp: 2018-02-05 21:11:42
Author: dipts
Committer: kgv
Details ] Diff ]
0029395: Visualization, V3d_View - Grid disappears forever after enabling RayTracing

Custom Graphic3d_Structure implementation has been added to V3d_RectangularGrid and V3d_CircularGrid to trigger recompute in case of device lost.
Primitive arrays are no more (re)computed while grid is not actually displayed.
mod - src/V3d/V3d_CircularGrid.cxx Diff ] File ]
mod - src/V3d/V3d_CircularGrid.hxx Diff ] File ]
mod - src/V3d/V3d_RectangularGrid.cxx Diff ] File ]
mod - src/V3d/V3d_RectangularGrid.hxx Diff ] File ]
add - tests/bugs/vis/bug29395 Diff ] File ]

- Issue History
Date Modified Username Field Change
2017-12-20 12:08 dipts New Issue
2017-12-20 12:08 dipts Assigned To => kgv
2017-12-20 12:25 kgv Note Added: 0073043
2017-12-20 12:58 dipts File Added: RaytracingGrid.tcl
2017-12-20 13:00 dipts Note Added: 0073044
2018-01-10 14:27 kgv Note Added: 0073284
2018-01-10 14:27 kgv Assigned To kgv => dipts
2018-01-10 14:27 kgv Status new => feedback
2018-01-10 14:28 kgv Note Edited: 0073284 View Revisions
2018-01-10 14:28 kgv Note Edited: 0073284 View Revisions
2018-01-10 14:31 kgv Note Edited: 0073284 View Revisions
2018-01-10 14:32 kgv Note Edited: 0073284 View Revisions
2018-01-10 14:32 kgv Note Edited: 0073284 View Revisions
2018-01-10 14:32 kgv Note Edited: 0073284 View Revisions
2018-01-10 14:33 kgv Note Edited: 0073284 View Revisions
2018-02-06 00:03 dipts Status feedback => assigned
2018-02-06 00:13 git Note Added: 0073828
2018-02-06 00:20 dipts Note Added: 0073829
2018-02-06 00:20 dipts Assigned To dipts => kgv
2018-02-06 00:20 dipts Status assigned => resolved
2018-02-06 00:20 dipts Steps to Reproduce Updated View Revisions
2018-02-08 13:54 kgv Note Added: 0073881
2018-02-08 13:54 kgv Target Version => 7.4.0*
2018-02-08 23:07 git Note Added: 0073895
2018-02-08 23:12 dipts Note Added: 0073896
2018-02-11 09:51 git Note Added: 0073911
2018-02-11 11:56 git Note Added: 0073918
2018-02-11 11:59 kgv Summary Grid disappears forever after enabling raytracing => Visualization, V3d_View - Grid disappears forever after enabling RayTracing
2018-02-11 12:00 kgv Steps to Reproduce Updated View Revisions
2018-02-11 12:02 git Note Added: 0073919
2018-02-11 12:07 git Note Added: 0073920
2018-02-11 15:08 kgv Note Added: 0073924
2018-02-11 15:08 kgv Assigned To kgv => bugmaster
2018-02-11 15:08 kgv Status resolved => reviewed
2018-02-12 17:02 apn Test case number => bugs vis bug29395
2018-02-12 17:02 apn Note Added: 0073940
2018-02-12 17:02 apn Status reviewed => tested
2018-02-18 13:00 kgv Changeset attached => occt master 5f6e3a07
2018-02-18 13:00 kgv Assigned To bugmaster => kgv
2018-02-18 13:00 kgv Status tested => verified
2018-02-18 13:00 kgv Resolution open => fixed
2018-02-20 12:58 aiv Target Version 7.4.0* => 7.3.0


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker