mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0027832: Visualization - Scaled zbuffer trihedron
Minor update on axial scale test
This commit is contained in:
@@ -415,9 +415,7 @@ void Graphic3d_TransformPers::Apply (const Handle(Graphic3d_Camera)& theCamera,
|
|||||||
Standard_Real anAxialX = anAxialScale.X();
|
Standard_Real anAxialX = anAxialScale.X();
|
||||||
Standard_Real anAxialY = anAxialScale.Y();
|
Standard_Real anAxialY = anAxialScale.Y();
|
||||||
Standard_Real anAxialZ = anAxialScale.Z();
|
Standard_Real anAxialZ = anAxialScale.Z();
|
||||||
if ((anAxialX > Precision::Confusion() &&
|
if (anAxialX > 0 && anAxialY > 0 && anAxialZ > 0)
|
||||||
anAxialY > Precision::Confusion() &&
|
|
||||||
anAxialZ > Precision::Confusion()))
|
|
||||||
{
|
{
|
||||||
Graphic3d_TransformUtils::Scale(aWorldView, 1.0 / anAxialX, 1.0 / anAxialY, 1.0 / anAxialZ);
|
Graphic3d_TransformUtils::Scale(aWorldView, 1.0 / anAxialX, 1.0 / anAxialY, 1.0 / anAxialZ);
|
||||||
}
|
}
|
||||||
|
40
tests/v3d/trihedron/bug27832
Normal file
40
tests/v3d/trihedron/bug27832
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
puts "========"
|
||||||
|
puts "0025340: 0027832: Visualization - Scaled zbuffer trihedron"
|
||||||
|
puts "========"
|
||||||
|
puts ""
|
||||||
|
|
||||||
|
pload ALL
|
||||||
|
vinit
|
||||||
|
box b 10 10 10
|
||||||
|
vdisplay b
|
||||||
|
vfit
|
||||||
|
vsetdispmode 1
|
||||||
|
vzbufftrihedron -on
|
||||||
|
vscale 1 3 10
|
||||||
|
|
||||||
|
set color_1 [vreadpixel 55 360 -rgb -name]
|
||||||
|
set color_2 [vreadpixel 50 350 -rgb -name]
|
||||||
|
set color_3 [vreadpixel 55 355 -rgb -name]
|
||||||
|
|
||||||
|
if {$color_1 != "RED3"} {
|
||||||
|
puts "ERROR: trihedron does not maintain position"
|
||||||
|
puts " additional investigation is needed"
|
||||||
|
puts " expected color is: RED3"
|
||||||
|
puts " current color is: $color_1"
|
||||||
|
}
|
||||||
|
|
||||||
|
if {$color_2 != "BLUE3"} {
|
||||||
|
puts "ERROR: trihedron does not maintain position"
|
||||||
|
puts " additional investigation is needed"
|
||||||
|
puts " expected color is: BLUE3"
|
||||||
|
puts " current color is: $color_2"
|
||||||
|
}
|
||||||
|
|
||||||
|
if {$color_3 != "GREEN3"} {
|
||||||
|
puts "ERROR: trihedron does not maintain position"
|
||||||
|
puts " additional investigation is needed"
|
||||||
|
puts " expected color is: GREEN3"
|
||||||
|
puts " current color is: $color_3"
|
||||||
|
}
|
||||||
|
|
||||||
|
vdump $imagedir/${casename}.png
|
Reference in New Issue
Block a user