mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-04 13:13:25 +03:00
0024606: DepthFitAll and ZFitAll do not eliminate z-clipping
Test case for non-regression verification Correction of test case for issue CR24606
This commit is contained in:
parent
e2fd181c29
commit
4a350f9410
@ -19,6 +19,7 @@
|
|||||||
#include <DBRep.hxx>
|
#include <DBRep.hxx>
|
||||||
#include <DrawTrSurf.hxx>
|
#include <DrawTrSurf.hxx>
|
||||||
#include <ViewerTest.hxx>
|
#include <ViewerTest.hxx>
|
||||||
|
#include <V3d_View.hxx>
|
||||||
#include <TopoDS_Shape.hxx>
|
#include <TopoDS_Shape.hxx>
|
||||||
#include <AIS_InteractiveContext.hxx>
|
#include <AIS_InteractiveContext.hxx>
|
||||||
#include <AIS_TexturedShape.hxx>
|
#include <AIS_TexturedShape.hxx>
|
||||||
@ -2709,6 +2710,34 @@ static Standard_Integer OCC25043 (Draw_Interpretor& theDI,
|
|||||||
return 0;
|
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
|
//function : OCC23010
|
||||||
//purpose :
|
//purpose :
|
||||||
@ -2804,5 +2833,6 @@ void QABugs::Commands_19(Draw_Interpretor& theCommands) {
|
|||||||
__FILE__, OCC24925, group);
|
__FILE__, OCC24925, group);
|
||||||
theCommands.Add ("OCC23010", "OCC23010 STEP_file", __FILE__, OCC23010, group);
|
theCommands.Add ("OCC23010", "OCC23010 STEP_file", __FILE__, OCC23010, group);
|
||||||
theCommands.Add ("OCC25043", "OCC25043 shape", __FILE__, OCC25043, 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;
|
return;
|
||||||
}
|
}
|
||||||
|
40
tests/bugs/vis/bug24606
Normal file
40
tests/bugs/vis/bug24606
Normal file
@ -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
|
Loading…
x
Reference in New Issue
Block a user