View Issue Details

IDProjectCategoryView StatusLast Update
0029395CommunityOCCT:Visualizationpublic2018-06-29 21:19
Reporterdipts Assigned Tokgv  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
PlatformWindowsOSVC++ 2015 
Product Version7.1.0 
Target Version7.3.0Fixed in Version7.3.0 
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

  • RaytracingGrid.tcl (171 bytes)

Activities

kgv

2017-12-20 12:25

developer   ~0073043

> I found no grid-related commands in DRAW.
It is "vgrid".

dipts

2017-12-20 12:58

developer  

RaytracingGrid.tcl (171 bytes)

dipts

2017-12-20 13:00

developer   ~0073044

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

I have uploaded a test script.

kgv

2018-01-10 14:27

developer   ~0073284

Last edited: 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;
};


git

2018-02-06 00:13

administrator   ~0073828

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.

dipts

2018-02-06 00:20

developer   ~0073829

Dear kgv,
thanks for giving me a point to start off. The branch is ready to review.

kgv

2018-02-08 13:54

developer   ~0073881

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

git

2018-02-08 23:07

administrator   ~0073895

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.

dipts

2018-02-08 23:12

developer   ~0073896

Corrected, please review.

git

2018-02-11 09:51

administrator   ~0073911

Branch CR29395 has been updated forcibly by kgv.

SHA-1: d75a01296138d10101e79234d95ad05818d2b952

git

2018-02-11 11:56

administrator   ~0073918

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.

git

2018-02-11 12:02

administrator   ~0073919

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

git

2018-02-11 12:07

administrator   ~0073920

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.

kgv

2018-02-11 15:08

developer   ~0073924

Please take the patch.

http://jenkins-test-10.nnov.opencascade.com:8080/view/CR29395_1-master-KGV

apn

2018-02-12 17:02

administrator   ~0073940

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

git

2018-03-06 15:50

administrator   ~0074276

Branch CR29395 has been deleted by kgv.

SHA-1: 3ad1671ed20493aaf1ffe772907e7a1e19668ba3

git

2018-03-06 15:50

administrator   ~0074277

Branch CR29395_1 has been deleted by kgv.

SHA-1: 5f6e3a0711c2562b899591b8087cd9ec7024b4eb

Related Changesets

occt: master 5f6e3a07

2018-02-05 21:11:42

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.
Affected Issues
0029395
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
2018-01-10 14:28 kgv Note Edited: 0073284
2018-01-10 14:31 kgv Note Edited: 0073284
2018-01-10 14:32 kgv Note Edited: 0073284
2018-01-10 14:32 kgv Note Edited: 0073284
2018-01-10 14:32 kgv Note Edited: 0073284
2018-01-10 14:33 kgv Note Edited: 0073284
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
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
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
2018-03-06 15:50 git Note Added: 0074276
2018-03-06 15:50 git Note Added: 0074277
2018-06-29 21:15 aiv Fixed in Version => 7.3.0
2018-06-29 21:19 aiv Status verified => closed