]> OCCT Git - occt.git/commitdiff
0027832: Visualization - Scaled zbuffer trihedron CR27832
authordrochalo <diogo.lopes@opencascade.com>
Fri, 27 Oct 2023 16:18:25 +0000 (17:18 +0100)
committerdrochalo <diogo.lopes@opencascade.com>
Fri, 27 Oct 2023 16:18:25 +0000 (17:18 +0100)
Code cleanup and test case modified.

src/Graphic3d/Graphic3d_TransformPers.hxx
tests/v3d/trihedron/bug27832

index ab444de9a530bb172ad512d768daf012f571dc1d..4475599544de5415b1b96dca707c56e2476058b1 100644 (file)
@@ -415,9 +415,9 @@ void Graphic3d_TransformPers::Apply (const Handle(Graphic3d_Camera)& theCamera,
     Standard_Real anAxialX = anAxialScale.X();
     Standard_Real anAxialY = anAxialScale.Y();
     Standard_Real anAxialZ = anAxialScale.Z();
-    if (anAxialX > 0 && anAxialY > 0 && anAxialZ > 0)
+    if (anAxialX > 0.0 && anAxialY > 0.0 && anAxialZ > 0.0)
     {
-      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);
     }
     
     Graphic3d_TransformUtils::Translate (aWorldView, aCenter.X(), aCenter.Y(), aCenter.Z());
index 9778064a6eaee09c335a95d33f2371369bd86f25..174aefee8d2800344e56ef56305a4a1f3433d726 100644 (file)
@@ -1,16 +1,22 @@
 puts "========"
-puts "0025340: 0027832: Visualization - Scaled zbuffer trihedron"
+puts "0027832: Visualization - Scaled zbuffer trihedron"
 puts "========"
 puts ""
 
-pload ALL
+pload MODELING VISUALIZATION
 vinit
 box b 10 10 10
 vdisplay b
 vfit
 vsetdispmode 1
 vzbufftrihedron -on
+#draw initial picture of box without visual scale
+vdump $imagedir/${casename}_unscaled.png
+
+#draw picture of box after visual scale
+#and zoomed out
 vscale 1 3 10
+vzoom 0.99
 
 set color_1 [vreadpixel 55 360 -rgb -name]
 set color_2 [vreadpixel 50 350 -rgb -name]
@@ -37,4 +43,4 @@ if {$color_3 != "GREEN3"} {
   puts "       current color is:  $color_3"
 }
 
-vdump $imagedir/${casename}.png
\ No newline at end of file
+vdump $imagedir/${casename}_scaled.png