]> OCCT Git - occt-copy.git/commitdiff
0028621: Visualization - AIS_ColoredShape::UnsetTransparency() is not implemented
authorkgv <kgv@opencascade.com>
Sat, 17 Mar 2018 11:13:59 +0000 (14:13 +0300)
committerkgv <kgv@opencascade.com>
Sat, 17 Mar 2018 12:30:04 +0000 (15:30 +0300)
# Conflicts:
# src/AIS/AIS_ColoredShape.cxx

src/AIS/AIS_ColoredShape.hxx
tests/bugs/vis/bug28621 [new file with mode: 0644]

index 4c0af91ead402cc34ba6c17f43fe539e50268426..c713ce1d122ccb1d7d40682046f960b3b455cae6 100644 (file)
@@ -77,6 +77,9 @@ public: //! @name global aspects
   //! Sets transparency value.
   Standard_EXPORT virtual void SetTransparency (const Standard_Real theValue) Standard_OVERRIDE;
 
+  //! Removes the setting for transparency in the reconstructed compound shape.
+  Standard_EXPORT virtual void UnsetTransparency() Standard_OVERRIDE;
+
   //! Sets the material aspect.
   Standard_EXPORT virtual void SetMaterial (const Graphic3d_MaterialAspect& theAspect) Standard_OVERRIDE;
 
diff --git a/tests/bugs/vis/bug28621 b/tests/bugs/vis/bug28621
new file mode 100644 (file)
index 0000000..fc3d9fa
--- /dev/null
@@ -0,0 +1,28 @@
+puts "================================================================================================="
+puts "0028621: Visualization - AIS_ColoredShape::UnsetTransparency() is not implemented"
+puts "================================================================================================="
+
+pload VISUALIZATION MODELING
+box b 1 2 3
+vclear
+vinit View1
+vdisplay -noupdate -dispMode 1 b
+vfit
+
+# OK
+set aColor11 [vreadpixel 250 250 rgb name]
+vsettransparency b 0.8
+vunsettransparency b
+set aColor12 [vreadpixel 250 250 rgb name]
+if { "$aColor11" != "$aColor12" } { puts "Error: color is not set back" }
+
+explode b F
+vaspects b -subShapes b_2 -setColor RED
+
+set aColor21 [vreadpixel 250 250 rgb name]
+vsettransparency b 0.8
+vunsettransparency b
+set aColor22 [vreadpixel 250 250 rgb name]
+if { "$aColor21" != "$aColor22" } { puts "Error: color is not set back" }
+
+vdump $imagedir/${casename}.png