0032208: Tests - refactor visualization tests to cover several graphic drivers
[occt.git] / tests / v3d / bugs / bug25459_coloredshape
diff --git a/tests/v3d/bugs/bug25459_coloredshape b/tests/v3d/bugs/bug25459_coloredshape
new file mode 100644 (file)
index 0000000..a8611c0
--- /dev/null
@@ -0,0 +1,23 @@
+puts "========"
+puts "OCC25459 AIS_ColoredShape::SetMaterial() should not reset custom colors"
+puts "========"
+
+pload MODELING VISUALIZATION
+box b 0 0 0 1 2 3
+
+# prepare view
+vclear
+vinit View1
+vglinfo
+vaxo
+vdisplay -dispMode 1 b
+vfit
+
+# customize object
+explode b F
+vaspects b -subshapes b_3 -setcolor RED
+vaspects b -setmaterial PLASTIC
+
+# validate results
+if { [vreadpixel 128 256 -rgb -name] != "RED4"} { puts "Error: wrong Face color" }
+vdump $imagedir/${casename}.png