1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-18 14:27:39 +03:00

0002883: It is impossible to set material, color and transparency to compound

Fast shading presentation update on setting color, material and transparency for AIS_Shape:
- Iterate through all groups not only last one.
- Iterate through all presentation (to change presentations in all viewers).

Added test cases bugs/vis/bug2883_1 and bugs/vis/bug2883_2
This commit is contained in:
aba
2014-05-22 17:33:02 +04:00
committed by apn
parent 5ad539d2e0
commit 48cc825e83
3 changed files with 171 additions and 69 deletions

26
tests/bugs/vis/bug2883_1 Normal file
View File

@@ -0,0 +1,26 @@
puts "=========="
puts "OCC2883"
puts "=========="
puts ""
########################################################################
# It is impossible to set material, color and transparency to compound
########################################################################
vertex v -20 10 -30
vertex ve1 -10 10 10
vertex ve2 0 10 10
edge e ve1 ve2
sphere s -80 0 0 150
mkface f s 0.1 0.7 0.2 0.9
box s -60 0 0 30 60 40
compound v e f s c
vinit View1
vclear
vaxo
vsetdispmode 1
vdisplay c
vfit
vsetmaterial c JADE
set only_screen 1

31
tests/bugs/vis/bug2883_2 Normal file
View File

@@ -0,0 +1,31 @@
puts "=========="
puts "OCC2883"
puts "=========="
puts ""
########################################################################
# It is impossible to set material, color and transparency to compound
########################################################################
box b1 0 0 0 1 2 3
box b2 4 0 0 3 1 2
vinit drv1/v1/v1
vsetdispmode 1
vdisplay b1 b2
vfit
vinit drv1/v2/v1
vsetdispmode 1
vdisplay b1 b2
vfit
vsetcolor b1 RED
vactivate drv1/v1/v1
vdump v1.png
vactivate drv1/v2/v1
vdump v2.png
set info [diffimage v1.png v2.png 0 0 0]
if { $info != 0 } {
puts "Error: images v1 and v2 are different"
} else {
puts "OK: images v1 and v2 are similar"
}
set only_screen 1