mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-09-07 21:28:11 +08:00
0025229: Cappings have gray tint if setting color with vclipplane command
-Now in ViewerTest_ViewerCommands's method VClipPlane() Graphic3d_TypeOfMaterial::SetAmbientColor() and
Graphic3d_TypeOfMaterial::SetDiffuseColor() are used instead of
Graphic3d_TypeOfMaterial::SetColor()
-New test case added: tests\bugs\vis\bug25229
-Formatting
This commit is contained in:
@@ -5451,7 +5451,9 @@ static int VClipPlane (Draw_Interpretor& theDi, Standard_Integer theArgsNb, cons
|
||||
Standard_Real aBlu = atof (theArgVec [7]);
|
||||
|
||||
Graphic3d_MaterialAspect aMat = aClipPlane->CappingMaterial();
|
||||
aMat.SetColor (Quantity_Color (aRed, aGrn, aBlu, Quantity_TOC_RGB));
|
||||
Quantity_Color aColor (aRed, aGrn, aBlu, Quantity_TOC_RGB);
|
||||
aMat.SetAmbientColor (aColor);
|
||||
aMat.SetDiffuseColor (aColor);
|
||||
aClipPlane->SetCappingMaterial (aMat);
|
||||
}
|
||||
else if (aCappingArg == "texname") // texture name
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
puts "============"
|
||||
puts "CR25229"
|
||||
puts "============"
|
||||
puts ""
|
||||
#######################################################################
|
||||
# Cappings have gray tint if setting color with vclipplane command.
|
||||
#######################################################################
|
||||
box b 100 100 100
|
||||
vinit
|
||||
vsetdispmode 1
|
||||
vdisplay b
|
||||
vclipplane create pln1
|
||||
vclipplane change pln1 equation 0 0 -1 20
|
||||
vclipplane set pln1 object b
|
||||
vclipplane change pln1 capping on
|
||||
vclipplane change pln1 capping color 1.0 1.0 1.0
|
||||
vtop
|
||||
vfit
|
||||
|
||||
set x_coord 100
|
||||
set y_coord 100
|
||||
checkcolor $x_coord $y_coord 1 1 1
|
||||
if { $stat != 1 } {
|
||||
puts "Error : Capping color is broken."
|
||||
}
|
||||
|
||||
set only_screen 1
|
||||
Reference in New Issue
Block a user