View Issue Details

IDProjectCategoryView StatusLast Update
0028036Open CASCADEOCCT:Visualizationpublic2017-01-19 19:30
Reporterkgv Assigned Toabv 
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version6.9.0 
Target Version7.1.0Fixed in Version7.1.0 
Summary0028036: Visualization, AIS_ColoredShape - handle correctly nested compounds within Shaded display mode
DescriptionCurrent logic of colors dispatcher has been broken by 0025687 for Shaded display mode in case when colors have been defined by nested compounds.

The reason is that StdPrs_ShadedShape::ExploreSolids() returns two compounds without correct hierarchy (e.g. information about parent Compound(s) is lost). isFirstCmpContainSecondOne() check returns false for shapes returned by StdPrs_ShadedShape::ExploreSolids() and therefore alternative logic is applied for colors, which is meant to be used in other way, producing wrong / unstable (due to usage of non-indexed NCollection_DataMap) result.
Steps To ReproduceTest case 1 [simple]:
pload MODELING VISUALIZATION
box b1 0 0 0 1 2 3
box b2 0 3 0 2 1 3
box b3 3 0 0 3 2 1
compound b1 b2 c12
compound c12 b3 c

vclear
vinit View1
vdisplay -dispMode 1 c
vfit

vaspects c                -setColor BLUE1
vaspects c -subshapes b1  -setColor RED
vaspects c -subshapes c12 -setColor GREEN

if { [vreadpixel 100 100 rgb name] != "RED3"   } { puts "Error: wrong color" }
if { [vreadpixel 200 100 rgb name] != "GREEN3" } { puts "Error: wrong color" }
if { [vreadpixel 200 300 rgb name] != "BLUE3"  } { puts "Error: wrong color" }


Result is stable for Wireframe display mode and unstable for Shaded display mode - the RED color is missing from time to time.

Test case 2 [complex]:
pload MODELING VISUALIZATION

clear
box b1   0  0 0 100 200 1
box b2 150  0 0 100  50 1
box b3 150 50 0 100 150 1

for {set i 1} {$i <= 3} {incr i} { tcopy b${i} b1_${i}; ttranslate b1_${i} 0 -300 0 }
for {set i 1} {$i <= 3} {incr i} { tcopy b${i} b2_${i}; ttranslate b2_${i} 0    0 0 }
for {set i 1} {$i <= 3} {incr i} { tcopy b${i} b3_${i}; ttranslate b3_${i} 0  300 0 }

vclear
vinit View1
vsetdispmode 1
vaxo

vdisplay b1_1 b1_2 b1_3
vsetcolor b1_1 RED 
vsetcolor b1_2 GREEN
vsetcolor b1_3 BLUE1

vdisplay b2_1 b2_2 b2_3
vsetcolor b2_1 RED 
vsetcolor b2_2 GREEN
vsetcolor b2_3 BLUE1

vdisplay b3_1 b3_2 b3_3
vsetcolor b3_1 RED 
vsetcolor b3_2 GREEN
vsetcolor b3_3 BLUE1

vfit

vclear
vinit View1
vsetdispmode 1
vaxo

for {set j 1} {$j <= 3} {incr j} { compound b${j}_2 b${j}_3  b${j}_23  }
for {set j 1} {$j <= 3} {incr j} { compound b${j}_1 b${j}_23 b${j}_123 }
compound b1_123 b2_123 b3_123 b123_123

vdisplay b123_123

compound b1_23 b2_23 b3_23 b123_23
vaspects b123_123 -subshapes b123_23  -setColor GREEN
#vaspects b123_123 -subshapes b1_23  -setColor GREEN
#vaspects b123_123 -subshapes b2_23  -setColor GREEN
#vaspects b123_123 -subshapes b3_23  -setColor GREEN

vaspects b123_123 -subshapes b1_123 -setColor RED
vaspects b123_123 -subshapes b2_123 -setColor RED
vaspects b123_123 -subshapes b3_123 -setColor RED

compound b2_3 b3_3 b23_3
vaspects b123_123 -subshapes b1_3   -setColor BLUE1
vaspects b123_123 -subshapes b23_3  -setColor BLUE1

vfit

if { [vreadpixel  50 250 rgb name] != "RED3"  } { puts "Error: wrong color" }
if { [vreadpixel 175 175 rgb name] != "RED3"  } { puts "Error: wrong color" }
if { [vreadpixel 300 100 rgb name] != "RED3"  } { puts "Error: wrong color" }

if { [vreadpixel 100 310 rgb name] != "GREEN3"} { puts "Error: wrong color" }
if { [vreadpixel 200 230 rgb name] != "GREEN3"} { puts "Error: wrong color" }
if { [vreadpixel 320 170 rgb name] != "GREEN3"} { puts "Error: wrong color" }

if { [vreadpixel 130 280 rgb name] != "BLUE3" } { puts "Error: wrong color" }
if { [vreadpixel 250 200 rgb name] != "BLUE3" } { puts "Error: wrong color" }
if { [vreadpixel 350 150 rgb name] != "BLUE3" } { puts "Error: wrong color" }
TagsNo tags attached.
Test case numberbugs vis bug28036_1, bug28036_2

Attached Files

  • bug28036_2.svg (25,956 bytes)
  • bug28036_2.png (14,455 bytes)

Relationships

related to 0025687 closedbugmaster Open CASCADE Visualization, XCAF - eliminate visual artifacts at the edges of faces 
parent of 0028376 closedapn Open CASCADE Visualization, AIS_ColoredShape - fix endless recursion due to misprint 

Activities

git

2016-11-01 20:19

administrator   ~0059730

Branch CR28036 has been created by kgv.

SHA-1: c5caa3c2d765fedaae7eff3e46f720106b6f2c12


Detailed log of new commits:

Author: kgv
Date: Tue Nov 1 20:18:09 2016 +0300

    0028036: Visualization, AIS_ColoredShape - handle correctly nested compounds within Shaded display mode

kgv

2016-11-01 20:20

developer   ~0059731

Patch is ready for review.

git

2016-11-01 21:34

administrator   ~0059732

Branch CR28036 has been updated by kgv.

SHA-1: 9145d446fb2f86a8fccfd9bd856c56377722baac


Detailed log of new commits:

Author: kgv
Date: Tue Nov 1 21:32:30 2016 +0300

    AIS_ColoredShape - make logic more straightforward

git

2016-11-01 21:37

administrator   ~0059733

Branch CR28036_1 has been created by kgv.

SHA-1: 56a7cea2a51bb9efb7561d732a9c4a7a70c450ba


Detailed log of new commits:

Author: kgv
Date: Tue Nov 1 21:36:24 2016 +0300

    0028036: Visualization, AIS_ColoredShape - handle correctly nested compounds within Shaded display mode

san

2016-11-01 22:45

developer   ~0059734

Branch CR28036_1 reviewed without remarks, ready for testing.

git

2016-11-02 17:42

administrator   ~0059806

Branch CR28036_1 has been updated forcibly by mkv.

SHA-1: d73e4a34d52bd0edfd67176fa439ae3179ab0448

mkv

2016-11-03 17:02

tester   ~0059866

Dear BugMaster,
Branch CR28036_1 was rebased on IR-2016-11-02 of occt git-repository.
SHA-1: d73e4a34d52bd0edfd67176fa439ae3179ab0448

mkv

2016-11-03 17:03

tester   ~0059867

Last edited: 2016-11-03 17:07

Dear BugMaster,
Branch CR28036_1 from occt git-repository (and IR-2016-11-02 from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
SHA-1: d73e4a34d52bd0edfd67176fa439ae3179ab0448

Number of compiler warnings:

occt component :
Linux: 0 (0 on master)
Windows: 0 (0 on master)
MacOS : 0 (0 on master)

products component :
Linux: 63 (63 on master)
Windows: 0 (0 on master)
MacOS : 1126

Regressions/Differences/Improvements:
No regressions/differences

Testing cases:
http://occt-tests/CR28036_1-master-OCCT/Debian70-64/bugs/vis/bug28036.html
http://occt-tests/CR28036_1-master-OCCT/Windows-64-VC10/bugs/vis/bug28036.html
bugs vis bug28036: OK

Testing on Linux:
occt component :
Total MEMORY difference: 91027031 / 91239675 [-0.23%]
Total CPU difference: 19308.119999999763 / 19514.21000000008 [-1.06%]
products component :
Total MEMORY difference: 30442717 / 30480629 [-0.12%]
Total CPU difference: 5212.66999999998 / 5176.859999999965 [+0.69%]

Testing on Windows:
occt component :
Total MEMORY difference: 57448363 / 57451773 [-0.01%]
Total CPU difference: 18465.94757069853 / 17672.82288659874 [+4.49%]
products component :
Total MEMORY difference: 21510299 / 21473188 [+0.17%]
Total CPU difference: 5263.2865387999545 / 5107.691141399945 [+3.05%]

There are following differences in images found by testdiff.
http://occt-tests/CR28036_1-master-Products/Debian70-64/diff-Debian70-64.html
http://occt-tests/CR28036_1-master-Products/Windows-64-VC10/diff-Windows-64-VC10-image.html
IMAGE dxf read bug23611: bug23611.png differs
IMAGE dxf read bug26769: bug26769.png differs
IMAGE dxf read F2: F2.png differs

mkv

2016-11-03 17:03

tester   ~0059868

Dear kgv,
Branch CR28036_1 has been rejected due to:
- differences in images

kgv

2016-11-04 18:56

developer  

bug28036_2.svg (25,956 bytes)

kgv

2016-11-04 18:56

developer  

bug28036_2.png (14,455 bytes)

git

2016-11-04 21:25

administrator   ~0059900

Branch CR28036_1 has been updated by kgv.

SHA-1: f0bf53d4f4ec97edfac6cca377e73116f7f26694


Detailed log of new commits:

Author: kgv
Date: Fri Nov 4 21:22:51 2016 +0300

    AIS_ColoredShape::Compute() now parses nested compounds in two passes.
    
    XCAFPrs::CollectStyleSettings() now does not override previously set style.

git

2016-11-04 21:28

administrator   ~0059901

Branch CR28036_2 has been created by kgv.

SHA-1: 9bd1031249b979a595b55150e4f458abf5ce74cb


Detailed log of new commits:

Author: kgv
Date: Tue Nov 1 21:36:24 2016 +0300

    0028036: Visualization, AIS_ColoredShape - handle correctly nested compounds within Shaded display mode
    
    AIS_ColoredShape::Compute() now parses nested compounds in two passes
    to handle complex cases with compounds used for grouping styles.
    
    XCAFPrs::CollectStyleSettings() now does not override previously set style.

kgv

2016-11-04 21:56

developer   ~0059902

Please test updated patch.

The image difference in these DXF test cases is expected (new image is correct).

git

2016-11-05 18:56

administrator   ~0059906

Branch CR28036_2 has been updated by kgv.

SHA-1: 597e6be35fa8debf7ae8125a814f97817af9a05d


Detailed log of new commits:

Author: kgv
Date: Sat Nov 5 18:54:55 2016 +0300

    revise dispatching logic

git

2016-11-05 18:59

administrator   ~0059907

Branch CR28036_3 has been created by kgv.

SHA-1: efbf296663bbcbd4b10073258bcde722526875dd


Detailed log of new commits:

Author: kgv
Date: Tue Nov 1 21:36:24 2016 +0300

    0028036: Visualization, AIS_ColoredShape - handle correctly nested compounds within Shaded display mode
    
    AIS_ColoredShape::Compute() now parses nested compounds in two passes
    to handle complex cases with compounds used for grouping styles.
    
    XCAFPrs::CollectStyleSettings() now does not override previously set style.

git

2016-11-07 11:54

administrator   ~0059917

Branch CR28036_3 has been updated forcibly by kgv.

SHA-1: d2fdf1bab2328ac31220cf11da4a6a223ac8f26a

mkv

2016-11-07 18:19

tester   ~0059947

Dear BugMaster,
Branch CR28036_3 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
SHA-1: d2fdf1bab2328ac31220cf11da4a6a223ac8f26a

Number of compiler warnings:

occt component :
Linux: 0 (0 on master)
Windows: 0 (0 on master)
MacOS : 0 (0 on master)

products component :
Linux: 63 (63 on master)
Windows: 0 (0 on master)
MacOS : 1144

Regressions/Differences/Improvements:
No regressions/differences

Testing cases:
http://occt-tests/CR28036_3-master-OCCT/Debian70-64/bugs/vis/bug28036_1.html
http://occt-tests/CR28036_3-master-OCCT/Windows-64-VC10/bugs/vis/bug28036_1.html
bugs vis bug28036_1: OK
http://occt-tests/CR28036_3-master-OCCT/Debian70-64/bugs/vis/bug28036_2.html
http://occt-tests/CR28036_3-master-OCCT/Windows-64-VC10/bugs/vis/bug28036_2.html
bugs vis bug28036_2: OK

Testing on Linux:
occt component :
Total MEMORY difference: 91349345 / 90850951 [+0.55%]
Total CPU difference: 19334.599999999777 / 19283.83999999988 [+0.26%]
products component :
Total MEMORY difference: 30591160 / 30609346 [-0.06%]
Total CPU difference: 5323.799999999977 / 5334.54999999997 [-0.20%]

Testing on Windows:
occt component :
Total MEMORY difference: 57448800 / 57454639 [-0.01%]
Total CPU difference: 18320.92904109853 / 18371.254963698717 [-0.27%]
products component :
Total MEMORY difference: 21510326 / 21473188 [+0.17%]
Total CPU difference: 5269.3081773999575 / 5107.691141399945 [+3.16%]

There are following differences in images found by testdiff.
http://occt-tests/CR28036_3-master-Products/Debian70-64/diff-Debian70-64.html
http://occt-tests/CR28036_3-master-Products/Windows-64-VC10/diff-Windows-64-VC10-image.html
IMAGE dxf read bug23611: bug23611.png differs
IMAGE dxf read G2: G2.png differs
IMAGE dxf read bug25375: bug25375.png differs
IMAGE dxf read bug26769: bug26769.png differs
IMAGE dxf read F2: F2.png differs

http://occt-tests/CR28036_3-master-OCCT/Debian70-64/diff-Debian70-64.html
http://occt-tests/CR28036_3-master-OCCT/Windows-64-VC10/diff-Windows-64-VC10-image.html
IMAGE demo samples xde: xde.png differs

mkv

2016-11-07 18:19

tester   ~0059948

Dear kgv,
Branch CR28036_3 has been rejected due to:
- differences in images

git

2016-11-07 18:59

administrator   ~0059951

Branch CR28036_3 has been updated forcibly by kgv.

SHA-1: 28776954eb13cebf956165cacb2677ad9b62104c

kgv

2016-11-07 19:00

developer   ~0059952

Please test updated patch.

mkv

2016-11-08 18:16

tester   ~0060058

Dear BugMaster,
Branch CR28036_3 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
SHA-1: 28776954eb13cebf956165cacb2677ad9b62104c

Number of compiler warnings:

occt component :
Linux: 0 (0 on master)
Windows: 0 (0 on master)
MacOS : 0 (0 on master)

products component :
Linux: 63 (63 on master)
Windows: 0 (0 on master)
MacOS : 1131

Regressions/Differences/Improvements:
No regressions/differences

Testing cases:
http://occt-tests/CR28036_3-master-OCCT/Debian70-64/bugs/vis/bug28036_1.html
http://occt-tests/CR28036_3-master-OCCT/Windows-64-VC10/bugs/vis/bug28036_1.html
bugs vis bug28036_1: OK
http://occt-tests/CR28036_3-master-OCCT/Debian70-64/bugs/vis/bug28036_2.html
http://occt-tests/CR28036_3-master-OCCT/Windows-64-VC10/bugs/vis/bug28036_2.html
bugs vis bug28036_2: OK

Testing on Linux:
occt component :
Total MEMORY difference: 90789509 / 90853355 [-0.07%]
Total CPU difference: 19451.199999999913 / 19283.57999999988 [+0.87%]
products component :
Total MEMORY difference: 30555562 / 30596748 [-0.13%]
Total CPU difference: 5341.169999999967 / 5332.989999999971 [+0.15%]

Testing on Windows:
occt component :
Total MEMORY difference: 57448955 / 57454639 [-0.01%]
Total CPU difference: 18330.257900898625 / 18371.254963698717 [-0.22%]
products component :
Total MEMORY difference: 21510419 / 21473993 [+0.17%]
Total CPU difference: 5257.6081023999595 / 5159.514673599959 [+1.90%]

There are following differences in images found by testdiff.

http://occt-tests/CR28036_3-master-Products/Debian70-64/diff-Debian70-64.html
http://occt-tests/CR28036_3-master-Products/Windows-64-VC10/diff-Windows-64-VC10-image.html
IMAGE dxf read bug23611: bug23611.png differs
IMAGE dxf read bug25375: bug25375.png differs
IMAGE dxf read bug26769: bug26769.png differs
IMAGE dxf read F2: F2.png differs

mkv

2016-11-08 18:16

tester   ~0060059

Dear kgv,
Branch CR28036_3 has been rejected due to:
- differences in images

kgv

2016-11-08 19:11

developer   ~0060062

The image difference is OK, please switch to TESTED.

apv

2016-11-09 11:55

tester   ~0060085

Tested in scope of CR0-IR-2016-11-08

git

2016-12-07 11:25

administrator   ~0061224

Branch CR28036 has been deleted by kgv.

SHA-1: 9145d446fb2f86a8fccfd9bd856c56377722baac

git

2016-12-07 11:30

administrator   ~0061259

Branch CR28036_1 has been deleted by kgv.

SHA-1: f0bf53d4f4ec97edfac6cca377e73116f7f26694

git

2016-12-07 11:30

administrator   ~0061260

Branch CR28036_2 has been deleted by kgv.

SHA-1: 597e6be35fa8debf7ae8125a814f97817af9a05d

git

2016-12-07 11:30

administrator   ~0061261

Branch CR28036_3 has been deleted by kgv.

SHA-1: 28776954eb13cebf956165cacb2677ad9b62104c

Related Changesets

occt: master 9c86076b

2016-11-01 18:36:24

abv


Committer: abv Details Diff
0028036: Visualization, AIS_ColoredShape - handle correctly nested compounds within Shaded display mode

AIS_ColoredShape::Compute() now parses nested compounds in two passes
to handle complex cases with compounds used for grouping styles.
Affected Issues
0028036
mod - src/AIS/AIS_ColoredShape.cxx Diff File
mod - src/AIS/AIS_ColoredShape.hxx Diff File
mod - src/StdPrs/StdPrs_ShadedShape.cxx Diff File
mod - src/StdPrs/StdPrs_ShadedShape.hxx Diff File
mod - src/XCAFPrs/XCAFPrs.cxx Diff File
add - tests/bugs/vis/bug28036_1 Diff File
add - tests/bugs/vis/bug28036_2 Diff File

Issue History

Date Modified Username Field Change
2016-11-01 19:27 kgv New Issue
2016-11-01 19:27 kgv Assigned To => kgv
2016-11-01 19:28 kgv Relationship added related to 0025687
2016-11-01 19:28 kgv Product Version 7.0.0 => 6.9.0
2016-11-01 19:58 kgv Steps to Reproduce Updated
2016-11-01 20:00 kgv Steps to Reproduce Updated
2016-11-01 20:19 git Note Added: 0059730
2016-11-01 20:20 kgv Note Added: 0059731
2016-11-01 20:20 kgv Assigned To kgv => san
2016-11-01 20:20 kgv Status new => resolved
2016-11-01 21:34 git Note Added: 0059732
2016-11-01 21:37 git Note Added: 0059733
2016-11-01 22:45 san Note Added: 0059734
2016-11-01 22:45 san Assigned To san => bugmaster
2016-11-01 22:45 san Status resolved => reviewed
2016-11-02 16:57 mkv Assigned To bugmaster => mkv
2016-11-02 17:42 git Note Added: 0059806
2016-11-03 17:02 mkv Note Added: 0059866
2016-11-03 17:03 mkv Note Added: 0059867
2016-11-03 17:03 mkv Note Added: 0059868
2016-11-03 17:03 mkv Assigned To mkv => kgv
2016-11-03 17:03 mkv Status reviewed => assigned
2016-11-03 17:03 mkv Test case number => bugs vis bug28036
2016-11-03 17:07 mkv Note Edited: 0059867
2016-11-04 13:55 kgv Steps to Reproduce Updated
2016-11-04 18:56 kgv Steps to Reproduce Updated
2016-11-04 18:56 kgv File Added: bug28036_2.svg
2016-11-04 18:56 kgv File Added: bug28036_2.png
2016-11-04 21:25 git Note Added: 0059900
2016-11-04 21:28 git Note Added: 0059901
2016-11-04 21:56 kgv Note Added: 0059902
2016-11-04 21:56 kgv Assigned To kgv => bugmaster
2016-11-04 21:56 kgv Status assigned => resolved
2016-11-04 21:56 kgv Status resolved => reviewed
2016-11-05 18:56 git Note Added: 0059906
2016-11-05 18:59 git Note Added: 0059907
2016-11-07 11:54 git Note Added: 0059917
2016-11-07 12:03 mkv Assigned To bugmaster => mkv
2016-11-07 18:19 mkv Note Added: 0059947
2016-11-07 18:19 mkv Note Added: 0059948
2016-11-07 18:19 mkv Assigned To mkv => kgv
2016-11-07 18:19 mkv Status reviewed => feedback
2016-11-07 18:59 git Note Added: 0059951
2016-11-07 19:00 kgv Note Added: 0059952
2016-11-07 19:00 kgv Assigned To kgv => bugmaster
2016-11-07 19:00 kgv Status feedback => reviewed
2016-11-07 19:14 mkv Assigned To bugmaster => mkv
2016-11-08 18:16 mkv Note Added: 0060058
2016-11-08 18:16 mkv Note Added: 0060059
2016-11-08 18:16 mkv Assigned To mkv => kgv
2016-11-08 18:16 mkv Status reviewed => feedback
2016-11-08 19:11 kgv Note Added: 0060062
2016-11-08 19:11 kgv Assigned To kgv => bugmaster
2016-11-09 11:55 apv Test case number bugs vis bug28036 => bugs vis bug28036_1, bug28036_2
2016-11-09 11:55 apv Note Added: 0060085
2016-11-09 11:55 apv Status feedback => tested
2016-11-09 17:43 abv Changeset attached => occt master 9c86076b
2016-11-09 17:43 abv Assigned To bugmaster => abv
2016-11-09 17:43 abv Status tested => verified
2016-11-09 17:43 abv Resolution open => fixed
2016-12-07 11:25 git Note Added: 0061224
2016-12-07 11:30 git Note Added: 0061259
2016-12-07 11:30 git Note Added: 0061260
2016-12-07 11:30 git Note Added: 0061261
2016-12-09 16:30 aiv Status verified => closed
2016-12-09 16:39 aiv Fixed in Version => 7.1.0
2017-01-19 19:30 kgv Relationship added parent of 0028376