0032155: Tests - remove broken command OCC280
authorkgv <kgv@opencascade.com>
Mon, 22 Feb 2021 15:40:02 +0000 (18:40 +0300)
committerbugmaster <bugmaster@opencascade.com>
Thu, 25 Feb 2021 15:55:30 +0000 (18:55 +0300)
Command OCC280 and a couple of useless tests have been removed.
Test case bug349 has been updated to reproduce scenario using standard commands.

src/QABugs/QABugs_17.cxx
tests/bugs/vis/bug280_2 [deleted file]
tests/bugs/vis/bug280_3 [deleted file]
tests/bugs/vis/bug349
tests/bugs/vis/bug349_1 [deleted file]

index d6ab2d7..a3b0ec8 100644 (file)
@@ -454,48 +454,6 @@ static Standard_Integer OCC353 (Draw_Interpretor& di, Standard_Integer , const c
   return 0;
 }
 
-static Standard_Integer OCC280 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
-{
-  Handle(AIS_InteractiveContext) aContext = ViewerTest::GetAISContext();
-  if(aContext.IsNull()) 
-  { 
-    di << "use 'vinit' command before " << argv[0] << "\n";
-    return -1;
-  }
-  if ( argc != 3) {
-    di << "ERROR : Usage : " << argv[0] << " hlr=0/1 setsurfecedetail=0/1; set perspecrive view\n";
-    return 1;
-  }
-
-  Standard_Integer HLR = Draw::Atoi(argv[1]);
-  if (HLR != 0) {
-    HLR = 1;
-  }
-
-  TCollection_AsciiString anOldName = ViewerTest::GetCurrentViewName();
-  Handle(V3d_Viewer) aViewer = ViewerTest::GetViewerFromContext();
-  aViewer->SetDefaultTypeOfView (V3d_PERSPECTIVE);
-  Handle(Aspect_Window) asp = ViewerTest::CurrentView()->Window();
-  Handle(V3d_View) aNewView = aViewer->CreateView();
-  ViewerTest::CurrentView (aNewView);
-  TCollection_AsciiString aNewName=anOldName + "_new";
-  ViewerTest::InitViewName(aNewName,ViewerTest::CurrentView());
-  aNewView->SetWindow (asp);
-  if (!asp->IsMapped()) asp->Map();
-  aNewView->Redraw();
-  ViewerTest::RemoveView(anOldName,false);
-  ViewerTest::UnsetEventManager();
-  ViewerTest::SetEventManager (new ViewerTest_EventManager (aNewView, ViewerTest::GetAISContext()));
-
-  if (HLR == 1)
-  {
-    di << "HLR\n";
-    ViewerTest::CurrentView()->SetComputedMode (Standard_True);
-  }
-
-  return 0;
-}
-
 static Standard_Integer  OCC138LC (Draw_Interpretor& di, Standard_Integer /*argc*/, const char ** argv)
 {
   Handle(AIS_InteractiveContext) aContext = ViewerTest::GetAISContext();
@@ -1522,7 +1480,6 @@ void QABugs::Commands_17(Draw_Interpretor& theCommands) {
   theCommands.Add ("BUC60915", "BUC60915", __FILE__, BUC60915_1, group);
   theCommands.Add ("OCC138", "OCC138", __FILE__, OCC138, group);
   theCommands.Add ("OCC353","OCC353",__FILE__,OCC353,group);
-  theCommands.Add ("OCC280","OCC280 hlr=0/1 setsurfecedetail=0/1; set perspecrive view",__FILE__,OCC280,group);
   theCommands.Add ("OCC138LC", "OCC138LC", __FILE__, OCC138LC, group);
   theCommands.Add ("OCC566", "OCC566 shape [ xmin ymin zmin xmax ymax zmax] ; print bounding box", __FILE__, OCC566, group);
   theCommands.Add ("OCC570", "OCC570 result", __FILE__, OCC570, group);
diff --git a/tests/bugs/vis/bug280_2 b/tests/bugs/vis/bug280_2
deleted file mode 100755 (executable)
index af7949c..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-puts "========"
-puts "OCC280"
-puts "2. Highlighting the object, by moving mouse cursor on it does not highlight the object"
-puts "========"
-
-vinit
-box b 100 900 300
-vdisplay b
-
-OCC280 0 0
-
-# selected point
-set x_coord 22
-set y_coord 241
-
-vfit
-
-# There is not selection
-puts "There is not selection"
-
-checkcolor $x_coord $y_coord 1 1 0
-
-# Move a mouse
-puts "Move a mouse"
-vmoveto $x_coord $y_coord
-
-# There is a selection
-puts "There is a selection"
-
-checkcolor $x_coord $y_coord 0 1 1
-
-checkview -screenshot -3d -path ${imagedir}/${test_image}.png
-
diff --git a/tests/bugs/vis/bug280_3 b/tests/bugs/vis/bug280_3
deleted file mode 100755 (executable)
index 7712a12..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-puts "========"
-puts "OCC280"
-puts "3. Fitall on perspective view does not fit all properly"
-puts "========"
-
-vinit
-box b 100 900 300
-vdisplay b
-vsetdispmode b 1
-
-OCC280 0 1
-
-set x_coord 22
-set y_coord 241
-
-puts "Before View->FitAll()"
-
-checkcolor $x_coord $y_coord 0 0 0
-
-vfit
-
-puts "After View->FitAll()"
-
-checkcolor $x_coord $y_coord 0.78 0.55 0.9
-
-if { $stat != 1 } {
-    puts "Error : Function vfit works wrongly"
-}
-
-checkview -screenshot -3d -path ${imagedir}/${test_image}.png
index ca48f48..322f12f 100755 (executable)
@@ -1,14 +1,14 @@
 puts "========"
-puts "OCC349"
-puts "1. Hidden line removal algorithm works incorrect in the perspective view"
+puts "OCC349 - Hidden line removal algorithm works incorrect in the perspective view"
 puts "========"
+puts ""
 
-vinit
+pload MODELING VISUALIZATION
+vinit View1
 box b 100 900 300
+vcamera -persp
 vdisplay b
-
-OCC280 1 0
-
+vhlr 1
 vfit
 
 set yellow_coords {{135 119} {387 33} {172 144} {28 190} {212 272} {60 343} {26 255} {389 113} {60 276}}
@@ -66,4 +66,4 @@ foreach i $black_coords {
   }
 }
 
-checkview -screenshot -3d -path ${imagedir}/${test_image}.png
+vdump ${imagedir}/${test_image}.png
diff --git a/tests/bugs/vis/bug349_1 b/tests/bugs/vis/bug349_1
deleted file mode 100755 (executable)
index 1de6ef5..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-puts "========"
-puts "OCC349"
-puts "========"
-puts ""
-puts "2. Fitall with hidden line removal algorithm works incorrect in the perspective view"
-
-vinit
-box b 100 900 300
-vdisplay b
-
-OCC280 1 1
-
-vfit
-
-set yellow_coords {{135 119} {387 33} {172 144} {28 190} {212 272} {60 343} {26 255} {389 113} {60 276}}
-
-set black_coords {{160 257} {365 150} {353 99}}
-
-#
-#              ___________2________________
-#             /|                          /|
-#            / |                         / |
-#           /  |                        /  |
-#          /   |                       /   |
-#         /    |                      /    |
-#        1     |                     3     |
-#       /      |                    /      |
-#      /       |                   /       |
-#     /        |                  /        |
-#    /         |                 /         |
-#   ----------------4------------          |
-#   |          |                |          |
-#   |          |                |          |
-#   |          |                |          |
-#   |         10                |         11
-#   |          |                |          |
-#   |          |                |          |
-#   |          |                |          |
-#   |          |                |          |
-#   |          |                |          |
-#   9          |               12          |
-#   |          |___________6____|__________|
-#   |         /                 |         /
-#   |        /                  |        /
-#   |       /                   |       /
-#   |      /                    |      /
-#   |     5                     |     /
-#   |    /                      |    7
-#   |   /                       |   /
-#   |  /                        |  /
-#   | /                         | /
-#   |/                          |/
-#   |--------------8------------|
-#
-#
-
-vaspects -setwidth 5
-
-foreach i $yellow_coords {
-  if {"[vreadpixel [lindex $i 0] [lindex $i 1] rgb name]" != "YELLOW" } {
-    puts "Error : ${i} is not yellow"
-  }
-}
-
-foreach i $black_coords {
-  if {"[vreadpixel [lindex $i 0] [lindex $i 1] rgb name]" != "BLACK" } {
-    puts "Error : ${i} is not black"
-  }
-}
-
-checkview -screenshot -3d -path ${imagedir}/${test_image}.png