From: apl Date: Thu, 9 Oct 2014 12:23:54 +0000 (+0400) Subject: 0024606: DepthFitAll and ZFitAll do not eliminate z-clipping X-Git-Tag: V6_8_0_beta~12 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=4a350f9410242a2f8808f83f0755c053caaac182;p=occt-copy.git 0024606: DepthFitAll and ZFitAll do not eliminate z-clipping Test case for non-regression verification Correction of test case for issue CR24606 --- diff --git a/src/QABugs/QABugs_19.cxx b/src/QABugs/QABugs_19.cxx index 448577f32f..f324843d59 100755 --- a/src/QABugs/QABugs_19.cxx +++ b/src/QABugs/QABugs_19.cxx @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -2709,6 +2710,34 @@ static Standard_Integer OCC25043 (Draw_Interpretor& theDI, return 0; } +//======================================================================= +//function : OCC24606 +//purpose : +//======================================================================= +static Standard_Integer OCC24606 (Draw_Interpretor& theDI, + Standard_Integer theArgNb, + const char** theArgVec) +{ + if (theArgNb > 1) + { + std::cerr << "Error: incorrect number of arguments.\n"; + theDI << "Usage : " << theArgVec[0] << "\n"; + return 1; + } + + Handle(V3d_View) aView = ViewerTest::CurrentView(); + if (aView.IsNull()) + { + std::cerr << "Errro: no active view, please call 'vinit'.\n"; + return 1; + } + + aView->DepthFitAll(); + aView->FitAll(); + + return 0; +} + //======================================================================= //function : OCC23010 //purpose : @@ -2804,5 +2833,6 @@ void QABugs::Commands_19(Draw_Interpretor& theCommands) { __FILE__, OCC24925, group); theCommands.Add ("OCC23010", "OCC23010 STEP_file", __FILE__, OCC23010, group); theCommands.Add ("OCC25043", "OCC25043 shape", __FILE__, OCC25043, group); + theCommands.Add ("OCC24606", "OCC24606 : Tests ::FitAll for V3d view ('vfit' is for NIS view)", __FILE__, OCC24606, group); return; } diff --git a/tests/bugs/vis/bug24606 b/tests/bugs/vis/bug24606 new file mode 100644 index 0000000000..8e261674c0 --- /dev/null +++ b/tests/bugs/vis/bug24606 @@ -0,0 +1,40 @@ +puts "============" +puts "OCC24606" +puts "============" +puts "" +#################################################################################### +# Tests ::FitDepth and ::FitAll implementation of V3d_View. +#################################################################################### + +set check_x 402 +set check_y 320 + +restore [locate_data_file bug24606.brep] shape + +vinit View1 +vautozfit 0 +vsetdispmode 1 +vdisplay shape +OCC24606 +vmoveto $check_x $check_y + +checkcolor $check_x $check_y 0 1 1 + +if {$stat != 1} { + puts "Error : V3d view ::FitAll is broken." +} +vdump ${imagedir}/${casename}_1.png + +vinit View2 +vautozfit 1 +vsetdispmode 1 +vdisplay shape +OCC24606 +vmoveto $check_x $check_y + +checkcolor $check_x $check_y 0 1 1 + +if {$stat != 1} { + puts "Error : V3d view ::FitAll is broken." +} +vdump ${imagedir}/${casename}_2.png