mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-06-30 12:14:08 +03:00
AIS_ColoredShape::Compute() - improve logic to split input shape into Closed and Open volumes with back-face culling enabled when possible. Change last argument of method StdPrs_ShadedShape::Add() from boolean to enumeration StdPrs_Volume which controls parsing of Closed/Open volumes within input shape. Make method StdPrs_ShadedShape::ExploreSolids() public. Extend Draw Harness command vaspects with option -setvisibility to hide subshape (using AIS_ColoredShape). Add new test cases bugs/bis/bug25687_1 and bugs/bis/bug25687_2. the logic of bindSubShapes method clarified Conflicts: src/AIS/AIS_ColoredShape.cxx AIS_ColoredShape::dispatchColors considers the colors of displayed shapes in connection with specific priority the color of specific shape can be exported from several ways: the color of this shape, the color of a compound containing this shape. The highest priority has the color of shape than the one of the compound. The color with highest priority will be displayed. This patch accounts for the highest priority of the shape color. For example: w - wire has GREEN color; e - edge has RED color; "w" contains "e"; all edges of "w" will be displayed in GREEN color except "e" edge, it will be displayed in RED color Added sample generating model of Intel i7-4790 CPU on which the problem can be reproduced
30 lines
561 B
Plaintext
30 lines
561 B
Plaintext
puts "============"
|
|
puts "OCC25687"
|
|
puts "AIS_ColoredShape should disable back-face culling for Solids with hidden Face"
|
|
puts "============"
|
|
puts ""
|
|
|
|
set x_check_coord 200
|
|
set y_check_coord 200
|
|
|
|
box b 10 10 10
|
|
explode b f
|
|
|
|
vinit View1
|
|
vclear
|
|
vaxo
|
|
vsetdispmode 1
|
|
|
|
vdisplay b
|
|
vviewparams -proj 0.5 0.3 0.1
|
|
vfit
|
|
|
|
vaspects b -subshapes b_1 -setcolor GREEN
|
|
vaspects b -subshapes b_2 -setvis 0
|
|
|
|
if {"[vreadpixel ${x_check_coord} ${y_check_coord} rgb name]" != "GREEN"} {
|
|
puts "Error: back-face culling should be disabled, but seems to be not."
|
|
}
|
|
|
|
set only_screen 1
|