#include <DBRep.hxx>
#include <DrawTrSurf.hxx>
#include <ViewerTest.hxx>
+#include <V3d_View.hxx>
#include <TopoDS_Shape.hxx>
#include <AIS_InteractiveContext.hxx>
#include <AIS_TexturedShape.hxx>
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 :
__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;
}
--- /dev/null
+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