]> OCCT Git - occt-copy.git/commitdiff
0023539: QASelect and QAShiftSelect commands
authoraba <aba@opencascade.com>
Fri, 18 Jan 2013 10:22:14 +0000 (14:22 +0400)
committeraba <aba@opencascade.com>
Fri, 18 Jan 2013 10:22:14 +0000 (14:22 +0400)
Replaced QAMoveTo, QASelect and QAShiftSelect draw commands with vmoveto and vselect
Moved vselect and vmoveto draw commands to ViewerTest_ViewerCommands.cxx
Replaced  QAMoveTo and QASelect in test cases. Corrected returned error case result in vselect and vmoveto.
Added commands in ViewerTest_ViewerCommands from QADraw. Edited tests.
QACommands in tests were replaced with ViewerTest commands.
QAxwd command was removed from QADraw. Edited command wzoom and commands from ViewerTest.
Help for ViewerTest commands was edited
Small corrections. Added test cases for polygonal selection.
Small correction of test cases

89 files changed:
src/Draw/Draw_GraphicCommands.cxx
src/QADraw/QADraw.cxx
src/ViewerTest/ViewerTest.cdl
src/ViewerTest/ViewerTest.cxx
src/ViewerTest/ViewerTest_EventManager.cdl
src/ViewerTest/ViewerTest_EventManager.cxx
src/ViewerTest/ViewerTest_ViewerCommands.cxx
tests/bugs/modalg/bug397
tests/bugs/modalg/bug625
tests/bugs/modalg/bug794
tests/bugs/modalg/bug895
tests/bugs/moddata/bug20
tests/bugs/moddata/bug332
tests/bugs/vis/buc60547
tests/bugs/vis/buc60574
tests/bugs/vis/buc60587
tests/bugs/vis/buc60614
tests/bugs/vis/buc60632_1
tests/bugs/vis/buc60632_2
tests/bugs/vis/buc60688
tests/bugs/vis/buc60738
tests/bugs/vis/buc60740
tests/bugs/vis/buc60814
tests/bugs/vis/buc60876
tests/bugs/vis/buc60920
tests/bugs/vis/bug10702
tests/bugs/vis/bug10781
tests/bugs/vis/bug11095
tests/bugs/vis/bug112
tests/bugs/vis/bug113 [changed mode: 0644->0755]
tests/bugs/vis/bug11615
tests/bugs/vis/bug1174 [changed mode: 0644->0755]
tests/bugs/vis/bug1188 [changed mode: 0644->0755]
tests/bugs/vis/bug128
tests/bugs/vis/bug137_1
tests/bugs/vis/bug137_10 [changed mode: 0644->0755]
tests/bugs/vis/bug137_11 [changed mode: 0644->0755]
tests/bugs/vis/bug137_2
tests/bugs/vis/bug137_3
tests/bugs/vis/bug137_4
tests/bugs/vis/bug137_5
tests/bugs/vis/bug137_9 [changed mode: 0644->0755]
tests/bugs/vis/bug173_1
tests/bugs/vis/bug173_2
tests/bugs/vis/bug173_3
tests/bugs/vis/bug185
tests/bugs/vis/bug2066 [changed mode: 0644->0755]
tests/bugs/vis/bug215
tests/bugs/vis/bug218
tests/bugs/vis/bug223 [changed mode: 0644->0755]
tests/bugs/vis/bug232
tests/bugs/vis/bug23539_1 [new file with mode: 0644]
tests/bugs/vis/bug23539_2 [new file with mode: 0644]
tests/bugs/vis/bug23652
tests/bugs/vis/bug270_1 [changed mode: 0644->0755]
tests/bugs/vis/bug270_2 [changed mode: 0644->0755]
tests/bugs/vis/bug280_2
tests/bugs/vis/bug280_3
tests/bugs/vis/bug281_1 [changed mode: 0644->0755]
tests/bugs/vis/bug319
tests/bugs/vis/bug349 [changed mode: 0644->0755]
tests/bugs/vis/bug362 [changed mode: 0644->0755]
tests/bugs/vis/bug443
tests/bugs/vis/bug544 [changed mode: 0644->0755]
tests/bugs/vis/bug591
tests/bugs/vis/bug597_1
tests/bugs/vis/bug597_2
tests/bugs/vis/bug597_3
tests/bugs/vis/bug597_4
tests/bugs/vis/bug597_5
tests/bugs/vis/bug597_6
tests/bugs/vis/bug597_7
tests/bugs/vis/bug60 [changed mode: 0644->0755]
tests/bugs/vis/bug61 [changed mode: 0644->0755]
tests/bugs/vis/bug6145
tests/bugs/vis/bug64
tests/bugs/vis/bug6652
tests/bugs/vis/bug71 [changed mode: 0644->0755]
tests/bugs/vis/bug7186
tests/bugs/vis/bug727
tests/bugs/vis/bug74 [changed mode: 0644->0755]
tests/bugs/vis/bug85_1
tests/bugs/vis/ger61351_1
tests/bugs/vis/ger61351_2
tests/bugs/vis/ger61351_3
tests/bugs/vis/ger61351_4
tests/bugs/vis/ger61351_5
tests/bugs/vis/ger61351_6
tests/bugs/xde/bug23193

index c87081c6c4076aba5301d8d591069b3ed23bee61..f36ba2ca47225bd64fa652fc70dcb1004e44d810 100755 (executable)
@@ -136,69 +136,94 @@ static Standard_Integer zoom(Draw_Interpretor& , Standard_Integer n, const char*
 //purpose  :
 //=======================================================================
 
-static Standard_Integer wzoom(Draw_Interpretor& di, Standard_Integer, const char**)
+static Standard_Integer wzoom(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
 {
-  Standard_Integer id1,X1,Y1,b;
-  Standard_Integer X2,Y2;
-  Standard_Real dX1,dY1,dX2,dY2;
-  di << "Pick first corner"<<"\n";
-  dout.Select(id1,X1,Y1,b);
+  Standard_Integer id,X,Y,W,H,X1,Y1,X2,Y2,b;
+  Standard_Real dX1,dY1,dX2,dY2,zx,zy;
+  if(argc != 1 && argc != 6)
+  {
+    di<<"Usage : " << argv[0] << " [view-id X1 Y1 X2 Y2]\n";
+    return 1;
+  }
+  if(argc == 1)
+  {
+    di << "Pick first corner"<<"\n";
+    dout.Select(id,X1,Y1,b);
 
-  gp_Trsf T;
-  gp_Pnt P0(0,0,0);
-  dout.GetTrsf(id1,T);
-  T.Invert();
-  P0.Transform(T);
-  Standard_Real z = dout.Zoom(id1);
-
-  dX1=X1;       dY1=Y1;
-  dX1-=P0.X();  dY1-=P0.Y();
-  dX1/=z;       dY1/=z;
-
-  if (b != 1) return 0;
-  if (id1 < 0) return 0;
-  Draw_Display d = dout.MakeDisplay(id1);
-  d.SetColor(Draw_blanc);
-  d.SetMode(10);
-  Standard_Real dOX2 = dX1;
-  Standard_Real dOY2 = dY1;
-  d.Draw(gp_Pnt2d(dX1,dY1),gp_Pnt2d(dX1,dOY2));
-  d.Draw(gp_Pnt2d(dX1,dOY2),gp_Pnt2d(dOX2,dOY2));
-  d.Draw(gp_Pnt2d(dOX2,dOY2),gp_Pnt2d(dOX2,dY1));
-  d.Draw(gp_Pnt2d(dOX2,dY1),gp_Pnt2d(dX1,dY1));
-  d.Flush();
-  Standard_Real zx,zy;
-  Standard_Integer X,Y,W,H;
-  dout.GetPosSize(id1,X,Y,W,H);
-  di << "Pick second corner"<<"\n";
-  b = 0;
-  while (b == 0) {
-    dout.Select(id1,X2,Y2,b,Standard_False);
-    dX2=X2;          dY2=Y2;
-    dX2-=P0.X();     dY2-=P0.Y();
-    dX2/=z;          dY2/=z;
+    gp_Trsf T;
+    gp_Pnt P0(0,0,0);
+    dout.GetTrsf(id,T);
+    T.Invert();
+    P0.Transform(T);
+    Standard_Real z = dout.Zoom(id);
 
+    dX1=X1;       dY1=Y1;
+    dX1-=P0.X();  dY1-=P0.Y();
+    dX1/=z;       dY1/=z;
+
+    if (b != 1) return 0;
+    if (id < 0) return 0;
+    Draw_Display d = dout.MakeDisplay(id);
+    d.SetColor(Draw_blanc);
+    d.SetMode(10);
+    Standard_Real dOX2 = dX1;
+    Standard_Real dOY2 = dY1;
     d.Draw(gp_Pnt2d(dX1,dY1),gp_Pnt2d(dX1,dOY2));
     d.Draw(gp_Pnt2d(dX1,dOY2),gp_Pnt2d(dOX2,dOY2));
     d.Draw(gp_Pnt2d(dOX2,dOY2),gp_Pnt2d(dOX2,dY1));
     d.Draw(gp_Pnt2d(dOX2,dY1),gp_Pnt2d(dX1,dY1));
-    d.Draw(gp_Pnt2d(dX1,dY1),gp_Pnt2d(dX1,dY2));
-    d.Draw(gp_Pnt2d(dX1,dY2),gp_Pnt2d(dX2,dY2));
-    d.Draw(gp_Pnt2d(dX2,dY2),gp_Pnt2d(dX2,dY1));
-    d.Draw(gp_Pnt2d(dX2,dY1),gp_Pnt2d(dX1,dY1));
     d.Flush();
-    dOX2 = dX2;
-    dOY2 = dY2;
+    dout.GetPosSize(id,X,Y,W,H);
+    di << "Pick second corner"<<"\n";
+    b = 0;
+    while (b == 0) {
+      dout.Select(id,X2,Y2,b,Standard_False);
+      dX2=X2;          dY2=Y2;
+      dX2-=P0.X();     dY2-=P0.Y();
+      dX2/=z;          dY2/=z;
+
+      d.Draw(gp_Pnt2d(dX1,dY1),gp_Pnt2d(dX1,dOY2));
+      d.Draw(gp_Pnt2d(dX1,dOY2),gp_Pnt2d(dOX2,dOY2));
+      d.Draw(gp_Pnt2d(dOX2,dOY2),gp_Pnt2d(dOX2,dY1));
+      d.Draw(gp_Pnt2d(dOX2,dY1),gp_Pnt2d(dX1,dY1));
+      d.Draw(gp_Pnt2d(dX1,dY1),gp_Pnt2d(dX1,dY2));
+      d.Draw(gp_Pnt2d(dX1,dY2),gp_Pnt2d(dX2,dY2));
+      d.Draw(gp_Pnt2d(dX2,dY2),gp_Pnt2d(dX2,dY1));
+      d.Draw(gp_Pnt2d(dX2,dY1),gp_Pnt2d(dX1,dY1));
+      d.Flush();
+      dOX2 = dX2;
+      dOY2 = dY2;
+    }
+    d.Draw(gp_Pnt2d(dX1,dY1),gp_Pnt2d(dX1,dOY2));
+    d.Draw(gp_Pnt2d(dX1,dOY2),gp_Pnt2d(dOX2,dOY2));
+    d.Draw(gp_Pnt2d(dOX2,dOY2),gp_Pnt2d(dOX2,dY1));
+    d.Draw(gp_Pnt2d(dOX2,dY1),gp_Pnt2d(dX1,dY1));
+    d.Flush();
+    if (b != 1) return 0;
+    d.SetMode(0);
   }
-  d.Draw(gp_Pnt2d(dX1,dY1),gp_Pnt2d(dX1,dOY2));
-  d.Draw(gp_Pnt2d(dX1,dOY2),gp_Pnt2d(dOX2,dOY2));
-  d.Draw(gp_Pnt2d(dOX2,dOY2),gp_Pnt2d(dOX2,dY1));
-  d.Draw(gp_Pnt2d(dOX2,dY1),gp_Pnt2d(dX1,dY1));
-  d.Flush();
-  if (b != 1) return 0;
+  else
+  {
+    id = atoi(argv[1]); 
+    if ((id < 0) || (id >= MAXVIEW)) 
+    {
+      cout << "Incorrect view-id, must be in 0.."<<MAXVIEW-1<<endl;
+      return 1;
+    }
+    if (!dout.HasView(id))
+    {
+      cout <<"View "<<id<<" does not exist."<<endl;
+      return 1;
+    }
+    X1 = atoi (argv [2]);
+    Y1 = atoi (argv [3]);
+    X2 = atoi (argv [4]);
+    Y2 = atoi (argv [5]);
 
-  if ((X1 == X2) || (Y1 == Y2)) return 0;
+    dout.GetPosSize(id,X,Y,W,H);
+  }
 
+  if ((X1 == X2) || (Y1 == Y2)) return 0;
   zx = (Standard_Real) Abs(X2-X1) / (Standard_Real) W;
   zy = (Standard_Real) Abs(Y2-Y1) / (Standard_Real) H;
   if (zy > zx) zx = zy;
@@ -207,11 +232,10 @@ static Standard_Integer wzoom(Draw_Interpretor& di, Standard_Integer, const char
   if (Y2 > Y1) Y1 = Y2;
   X1 = (Standard_Integer ) (X1*zx);
   Y1 = (Standard_Integer ) (Y1*zx);
-  d.SetMode(0);
-  dout.SetZoom(id1,zx*dout.Zoom(id1));
-  dout.SetPan(id1,-X1,-Y1);
-  dout.RepaintView(id1);
-  SetTitle(id1);
+  dout.SetZoom(id,zx*dout.Zoom(id));
+  dout.SetPan(id,-X1,-Y1);
+  dout.RepaintView(id);
+  SetTitle(id);
   return 0;
 }
 
@@ -947,8 +971,11 @@ void Draw::GraphicCommands(Draw_Interpretor& theCommands)
                  __FILE__,zoom,g);
   theCommands.Add("2dzoom","2dzoom [view-id] z, or zoom2d z for all 2d views",
                  __FILE__,zoom,g);
-  theCommands.Add("wzoom","zoom on a window",
-                 __FILE__,wzoom,g);
+  theCommands.Add("wzoom","wzoom [view-id X1 Y1 X2 Y2]\n"
+      "- fits the contents of a given rectangle into a view window.\n"
+      "- The view window and rectangle corners are specified through the arguments\n"
+      "- or selected interactively by the user if no arguments are given",
+      __FILE__,wzoom,g);
   theCommands.Add("view","view view-id type X(0) Y(0) W(500) H(500)",
                  __FILE__,view,g);
   theCommands.Add("delete","delete [view-id]",
index 9a8b6a27e67ed9bc2b8e9a9f6c5078282aa08857..8d27f07c3a37fbe4b255ec036e5b7b5d524a7d0b 100755 (executable)
@@ -306,126 +306,6 @@ static Standard_Integer QARebuild (Draw_Interpretor& di, Standard_Integer /*n*/,
   return 0;
 }
 
-static Standard_Integer QAUpdateLights(Draw_Interpretor& di, Standard_Integer argc, const char ** argv )
-{
-  if(argc != 1) {
-    di << "Usage : " << argv[0] << "\n";
-    return -1;
-  }
-
-  Handle(AIS_InteractiveContext) myAIScontext = ViewerTest::GetAISContext();
-  if(myAIScontext.IsNull()) {
-    di << "use 'vinit' command before " << argv[0] << "\n";
-    return -1;
-  }
-  ViewerTest::CurrentView()->UpdateLights();
-  ViewerTest::CurrentView()->Update();
-  return 0;
-}
-
-static Standard_Integer QAxwd_3d(Draw_Interpretor& di, Standard_Integer argc, const char** argv )
-{
-  if(argc != 2) {
-    di << "Usage : " << argv[0] << " filename" << "\n";
-    return -1;
-  }
-
-  Handle(AIS_InteractiveContext) myAIScontext = ViewerTest::GetAISContext();
-  if(myAIScontext.IsNull()) {
-    di << "use 'vinit' command before " << argv[0] << "\n";
-    return -1;
-  }
-  Handle(V3d_View) myV3dView = ViewerTest::CurrentView();
-  //cout << myV3dView->Dump(argv[1]) << endl;
-  myV3dView->Dump(argv[1]);
-  return 0;
-}
-
-
-static Standard_Integer QAMoveTo(Draw_Interpretor& di, Standard_Integer argc, const char ** argv )
-{
-  if(argc != 3) {
-    di << "Usage : " << argv[0] << " x y" << "\n";
-    return -1;
-  }
-
-  Handle(AIS_InteractiveContext) myAIScontext = ViewerTest::GetAISContext();
-  if(myAIScontext.IsNull()) {
-    di << "use 'vinit' command before " << argv[0] << "\n";
-    return -1;
-  }
-  ViewerTest::CurrentEventManager()->MoveTo(atoi(argv[1]),atoi(argv[2]));
-  return 0;
-}
-
-static Standard_Integer QASelect(Draw_Interpretor& di, Standard_Integer argc, const char ** argv )
-{
-  if(argc != 3) {
-    di << "Usage : " << argv[0] << " x y" << "\n";
-    return -1;
-  }
-
-  Handle(AIS_InteractiveContext) myAIScontext = ViewerTest::GetAISContext();
-  if(myAIScontext.IsNull()) {
-    di << "use 'vinit' command before " << argv[0] << "\n";
-    return -1;
-  }
-  ViewerTest::CurrentEventManager()->MoveTo(atoi(argv[1]),atoi(argv[2]));
-  ViewerTest::CurrentEventManager()->Select();
-  return 0;
-}
-
-static Standard_Integer QAShiftSelect(Draw_Interpretor& di, Standard_Integer argc, const char ** argv )
-{
-  if(argc != 3) {
-    di << "Usage : " << argv[0] << " x y" << "\n";
-    return -1;
-  }
-
-  Handle(AIS_InteractiveContext) myAIScontext = ViewerTest::GetAISContext();
-  if(myAIScontext.IsNull()) {
-    di << "use 'vinit' command before " << argv[0] << "\n";
-    return -1;
-  }
-  ViewerTest::CurrentEventManager()->MoveTo(atoi(argv[1]),atoi(argv[2]));
-  ViewerTest::CurrentEventManager()->ShiftSelect();
-  return 0;
-}
-
-static Standard_Integer QASetAntialiasing(Draw_Interpretor& di, Standard_Integer argc, const char ** argv )
-{
-  if(argc > 2) {
-    di << "Usage : " << argv[0] << " [1/0]" << "\n";
-    return -1;
-  }
-
-  Handle(AIS_InteractiveContext) myAIScontext = ViewerTest::GetAISContext();
-  if(myAIScontext.IsNull()) {
-    di << "use 'vinit' command before " << argv[0] << "\n";
-    return -1;
-  }
-
-  Handle(V3d_View) myV3dView = ViewerTest::CurrentView();
-
-  if((argc == 2) && (atof(argv[1]) == 0))
-    myV3dView->SetAntialiasingOff();
-  else
-    myV3dView->SetAntialiasingOn();
-  myV3dView->Update();
-  return 0;
-}
-
-static Standard_Integer QAvzfit(Draw_Interpretor& di, Standard_Integer /*argc*/, const char ** argv )
-{
-  Handle(V3d_View) V = ViewerTest::CurrentView();
-  if ( V.IsNull() ) {
-    di << "use 'vinit' command before " << argv[0] << "\n";
-    return -1;
-  }
-  V->ZFitAll();
-  return 0;
-}
-
 Handle(TColStd_HSequenceOfReal) GetColorOfPixel (const Image_PixMap&    theImage,
                                                  const Standard_Integer theCoordinateX,
                                                  const Standard_Integer theCoordinateY,
@@ -468,165 +348,78 @@ static Standard_Integer QAAISGetPixelColor (Draw_Interpretor& theDi,
                                             Standard_Integer  theArgsNb,
                                             const char**      theArgs)
 {
-  if (theArgsNb != 3 && theArgsNb != 6)
-  {
-    theDi << "Usage : " << theArgs[0] << " coordinate_X coordinate_Y [color_R color_G color_B]" << "\n";
-    return 1; // TCL_ERROR
-  }
-
-  Handle(V3d_View) aView3d = ViewerTest::CurrentView();
-  if (aView3d.IsNull())
-  {
-    theDi << "You must initialize AISViewer before this command.\n";
-    return 1; // TCL_ERROR
-  }
-
-  const Handle(Aspect_Window) anAISWindow = aView3d->Window();
-  Standard_Integer aWindowSizeX = 0;
-  Standard_Integer aWindowSizeY = 0;
-  anAISWindow->Size (aWindowSizeX, aWindowSizeY);
-
-  Standard_Integer anArgIter = 1;
-  const Standard_Integer aPickCoordX = atoi (theArgs[anArgIter++]);
-  const Standard_Integer aPickCoordY = atoi (theArgs[anArgIter++]);
-  const Standard_Integer aRadius = (theArgsNb == 3) ? 0 : 1;
-
-  Image_ColorRGBF aColorInput = {{ 0.0f, 0.0f, 0.0f }};
-  if (theArgsNb == 6)
-  {
-    aColorInput.r() = (Standard_ShortReal )atof (theArgs[anArgIter++]);
-    aColorInput.g() = (Standard_ShortReal )atof (theArgs[anArgIter++]);
-    aColorInput.b() = (Standard_ShortReal )atof (theArgs[anArgIter++]);
-  }
-
-  Image_PixMap anImage;
-  aView3d->ToPixMap (anImage, aWindowSizeX, aWindowSizeY);
-  const Handle(TColStd_HSequenceOfReal) aSeq = GetColorOfPixel (anImage, aPickCoordX, aPickCoordY, aRadius);
-  cout << "Length = " << aSeq->Length() << endl;
-
-  Image_ColorRGBF aColorPicked = {{ 0.0f, 0.0f, 0.0f }};
-  Standard_Boolean isNotEqual = Standard_True;
-  for (Standard_Integer i = 1; i <= aSeq->Length(); i += 3)
-  {
-    aColorPicked.r() = (Standard_ShortReal )aSeq->Value (i + 0);
-    aColorPicked.g() = (Standard_ShortReal )aSeq->Value (i + 1);
-    aColorPicked.b() = (Standard_ShortReal )aSeq->Value (i + 2);
-
-    if (theArgsNb == 3 ||
-        ((Abs (aColorPicked.r() - aColorInput.r()) <= Precision::Confusion())
-      && (Abs (aColorPicked.g() - aColorInput.g()) <= Precision::Confusion())
-      && (Abs (aColorPicked.b() - aColorInput.b()) <= Precision::Confusion())))
-    {
-      isNotEqual = Standard_False;
-      break;
-    }
-  }
-
-  theDi << "RED :   " << aColorPicked.r() << " "
-        << "GREEN : " << aColorPicked.g() << " "
-        << "BLUE :  " << aColorPicked.b() << "\n";
-
-  if (theArgsNb == 6)
-  {
-    theDi << "User color: \n"
-          << "RED :   " << aColorInput.r() << " "
-          << "GREEN : " << aColorInput.g() << " "
-          << "BLUE :  " << aColorInput.b() << "\n";
-  }
-
-  if (isNotEqual)
-  {
-    theDi << "Faulty : colors are not equal.\n";
-    return 1; // TCL_ERROR
-  }
-  return 0;
-}
-
-static Standard_Boolean IsSelectionModeCurrentlyON (Standard_Integer theMode) {
-  Handle(AIS_InteractiveContext) aContext = ViewerTest::GetAISContext();
-  if(!aContext->HasOpenedContext()) {
-    return Standard_False ;
-  }
-  const TColStd_ListOfInteger& List = aContext->ActivatedStandardModes();
-  TColStd_ListIteratorOfListOfInteger it;
-  Standard_Boolean Found=Standard_False;
-  for (it.Initialize(List); it.More()&&!Found; it.Next() ) {
-    if (it.Value()==theMode ) Found=Standard_True;
-  }
-  return Found;
-}
-
-static Standard_Integer QAAISSetChoiceMode (Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
-{
-  if ( argc != 3 ) {
-    di << "Usage : " << argv[0] << " mode switch" << "\n";
-    di << "      mode:                         " << "\n";
-    // cout << "              SHAPE                 " << endl;
-    di << "              VERTEX                " << "\n";
-    di << "              EDGE                  " << "\n";
-    di << "              WIRE                  " << "\n";
-    di << "              FACE                  " << "\n";
-    di << "              SHELL                 " << "\n";
-    di << "              SOLID                 " << "\n";
-    di << "              COMPOUND              " << "\n";
-    di << "      switch:                       " << "\n";
-    di << "              ON                    " << "\n";
-    di << "              OFF                   " << "\n";
-    return 1;
-  }
-  Handle (V3d_View) QAAISView = ViewerTest::CurrentView ();
-  if ( QAAISView.IsNull () ) {
-    di << "You must initialize AISViewer before this command." << "\n";
-    return 1;
-  }
-  Standard_Integer QAChoosingMode = -1;
-  // if ( strcmp (sc [1], "SHAPE") == 0 ) {
-  //   QAChoosingMode = 0;
-  // }
-  if ( strcmp (argv [1], "VERTEX") == 0 ) {
-    QAChoosingMode = 1;
-  }
-  if ( strcmp (argv [1], "EDGE") == 0 ) {
-    QAChoosingMode = 2;
-  }
-  if ( strcmp (argv [1], "WIRE") == 0 ) {
-    QAChoosingMode = 3;
-  }
-  if ( strcmp (argv [1], "FACE") == 0 ) {
-    QAChoosingMode = 4;
-  }
-  if ( strcmp (argv [1], "SHELL") == 0 ) {
-    QAChoosingMode = 5;
-  }
-  if ( strcmp (argv [1], "SOLID") == 0 ) {
-    QAChoosingMode = 6;
-  }
-  if ( strcmp (argv [1], "COMPOUND") == 0 ) {
-    QAChoosingMode = 7;
-  }
-  if ( QAChoosingMode == -1 ) {
-    di << "Use - QAAISSetChoiceMode mode switch" << "\n";
-    return 1;
-  }
-
-  if ( strcmp (argv [2], "ON") == 0 ) {
-    if ( IsSelectionModeCurrentlyON (QAChoosingMode)) {
-      di << "Mode already ON." << "\n";
-      return 1;
-    }
-    ViewerTest::StandardModeActivation (QAChoosingMode);
-    return 0;
-  }
-  if ( strcmp (argv [2], "OFF") == 0 ) {
-    if (!IsSelectionModeCurrentlyON (QAChoosingMode)) {
-      di << "Mode already OFF." << "\n";
-      return 1;
-    }
-    ViewerTest::StandardModeActivation (QAChoosingMode);
-    return 0;
-  }
-  di << "Usage : " << argv[0] << " mode switch" << "\n";
-  return 1;
+ if (theArgsNb != 3 && theArgsNb != 6)
+ {
+   theDi << "Usage : " << theArgs[0] << " coordinate_X coordinate_Y [color_R color_G color_B]" << "\n";
+   return 1; // TCL_ERROR
+ }
+
+ Handle(V3d_View) aView3d = ViewerTest::CurrentView();
+ if (aView3d.IsNull())
+ {
+   theDi << "You must initialize AISViewer before this command.\n";
+   return 1; // TCL_ERROR
+ }
+
+ const Handle(Aspect_Window) anAISWindow = aView3d->Window();
+ Standard_Integer aWindowSizeX = 0;
+ Standard_Integer aWindowSizeY = 0;
+ anAISWindow->Size (aWindowSizeX, aWindowSizeY);
+
+ Standard_Integer anArgIter = 1;
+ const Standard_Integer aPickCoordX = atoi (theArgs[anArgIter++]);
+ const Standard_Integer aPickCoordY = atoi (theArgs[anArgIter++]);
+ const Standard_Integer aRadius = (theArgsNb == 3) ? 0 : 1;
+
+ Image_ColorRGBF aColorInput = {{ 0.0f, 0.0f, 0.0f }};
+ if (theArgsNb == 6)
+ {
+   aColorInput.r() = (Standard_ShortReal )atof (theArgs[anArgIter++]);
+   aColorInput.g() = (Standard_ShortReal )atof (theArgs[anArgIter++]);
+   aColorInput.b() = (Standard_ShortReal )atof (theArgs[anArgIter++]);
+ }
+
+ Image_PixMap anImage;
+ aView3d->ToPixMap (anImage, aWindowSizeX, aWindowSizeY);
+ const Handle(TColStd_HSequenceOfReal) aSeq = GetColorOfPixel (anImage, aPickCoordX, aPickCoordY, aRadius);
+ cout << "Length = " << aSeq->Length() << endl;
+
+ Image_ColorRGBF aColorPicked = {{ 0.0f, 0.0f, 0.0f }};
+ Standard_Boolean isNotEqual = Standard_True;
+ for (Standard_Integer i = 1; i <= aSeq->Length(); i += 3)
+ {
+   aColorPicked.r() = (Standard_ShortReal )aSeq->Value (i + 0);
+   aColorPicked.g() = (Standard_ShortReal )aSeq->Value (i + 1);
+   aColorPicked.b() = (Standard_ShortReal )aSeq->Value (i + 2);
+
+   if (theArgsNb == 3 ||
+       ((Abs (aColorPicked.r() - aColorInput.r()) <= Precision::Confusion())
+     && (Abs (aColorPicked.g() - aColorInput.g()) <= Precision::Confusion())
+     && (Abs (aColorPicked.b() - aColorInput.b()) <= Precision::Confusion())))
+   {
+     isNotEqual = Standard_False;
+     break;
+   }
+ }
+
+ theDi << "RED :   " << aColorPicked.r() << " "
+       << "GREEN : " << aColorPicked.g() << " "
+       << "BLUE :  " << aColorPicked.b() << "\n";
+
+ if (theArgsNb == 6)
+ {
+   theDi << "User color: \n"
+         << "RED :   " << aColorInput.r() << " "
+         << "GREEN : " << aColorInput.g() << " "
+         << "BLUE :  " << aColorInput.b() << "\n";
+ }
+
+ if (isNotEqual)
+ {
+   theDi << "Faulty : colors are not equal.\n";
+   return 1; // TCL_ERROR
+ }
+ return 0;
 }
 
 #if ! defined(WNT)
@@ -642,93 +435,26 @@ Standard_EXPORT int ViewerMainLoop2d (Standard_Integer argc, const char ** argv)
 
 static Standard_Integer QAAISGetMousePoint (Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
 {
-  if ( argc != 1 ) {
-    di << "Usage : " << argv[0] << "\n";
-    return 1;
-  }
-  Handle (V3d_View) QAAISView = ViewerTest::CurrentView ();
-  if ( QAAISView.IsNull () ) {
-    di << "You must initialize AISViewer before this command." << "\n";
-    return 1;
-  }
-  Standard_Integer QAAISMouseCoordinateX = 0;
-  Standard_Integer QAAISMouseCoordinateY = 0;
-  Standard_Integer argccc = 5;
-  const char *bufff[] = { "A", "B", "C", "D", "E" };
-  const char **argvvv = (const char **) bufff;
-  while ( ViewerMainLoop (argccc, argvvv) ) {
-    ViewerTest::GetMousePosition (QAAISMouseCoordinateX, QAAISMouseCoordinateY);
-  }
-  ViewerTest::GetMousePosition (QAAISMouseCoordinateX, QAAISMouseCoordinateY);
-  di << "X-coordinate: " << QAAISMouseCoordinateX << "; Y-coordinate: " << QAAISMouseCoordinateY << "\n";
-  return 0;
-}
-
-static Standard_Integer QAAISGetViewCharac (Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
-{
-  if ( argc != 1 ) {
-    di << "Usage : " << argv[0] << "\n";
-    return 1;
-  }
-  Handle (V3d_View) QAAISView = ViewerTest::CurrentView ();
-  if ( QAAISView.IsNull () ) {
-    di << "You must initialize AISViewer before this command." << "\n";
-    return 1;
-  }
-  Quantity_Factor QAAISViewScale = QAAISView -> V3d_View::Scale ();
-  Standard_Real QAAISViewCenterCoordinateX = 0.0;
-  Standard_Real QAAISViewCenterCoordinateY = 0.0;
-  QAAISView -> V3d_View::Center (QAAISViewCenterCoordinateX, QAAISViewCenterCoordinateY);
-  Standard_Real QAAISViewProjX = 0.0;
-  Standard_Real QAAISViewProjY = 0.0;
-  Standard_Real QAAISViewProjZ = 0.0;
-  QAAISView -> V3d_View::Proj (QAAISViewProjX, QAAISViewProjY, QAAISViewProjZ);
-  Standard_Real QAAISViewUpX = 0.0;
-  Standard_Real QAAISViewUpY = 0.0;
-  Standard_Real QAAISViewUpZ = 0.0;
-  QAAISView -> V3d_View::Up (QAAISViewUpX, QAAISViewUpY, QAAISViewUpZ);
-  Standard_Real QAAISViewAtX = 0.0;
-  Standard_Real QAAISViewAtY = 0.0;
-  Standard_Real QAAISViewAtZ = 0.0;
-  QAAISView -> V3d_View::At (QAAISViewAtX, QAAISViewAtY, QAAISViewAtZ);
-  di << "Scale of current view: " << QAAISViewScale << "\n";
-  di << "Center on X : "<< QAAISViewCenterCoordinateX << "; on Y: " << QAAISViewCenterCoordinateY << "\n";
-  di << "Proj on X : " << QAAISViewProjX << "; on Y: " << QAAISViewProjY << "; on Z: " << QAAISViewProjZ << "\n";
-  di << "Up on X : " << QAAISViewUpX << "; on Y: " << QAAISViewUpY << "; on Z: " << QAAISViewUpZ << "\n";
-  di << "At on X : " << QAAISViewAtX << "; on Y: " << QAAISViewAtY << "; on Z: " << QAAISViewAtZ << "\n";
-  return 0;
-}
-
-static Standard_Integer QAAISSetViewCharac (Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
-{
-  if ( argc != 13 ) {
-    di << "Usage : " << argv[0] << " scale center_X center_Y proj_X proj_Y proj_Z up_X up_Y up_Z at_X at_Y at_Z" << "\n";
-    return 1;
-  }
-  Handle (V3d_View) QAAISView = ViewerTest::CurrentView ();
-  if ( QAAISView.IsNull () ) {
-    di << "You must initialize AISViewer before this command." << "\n";
-    return 1;
-  }
-  Quantity_Factor QAAISViewScale = atof (argv [1]);
-  Standard_Real QAAISViewCenterCoordinateX = atof (argv [2]);
-  Standard_Real QAAISViewCenterCoordinateY = atof (argv [3]);
-  Standard_Real QAAISViewProjX = atof (argv [4]);
-  Standard_Real QAAISViewProjY = atof (argv [5]);
-  Standard_Real QAAISViewProjZ = atof (argv [6]);
-  Standard_Real QAAISViewUpX = atof (argv [7]);
-  Standard_Real QAAISViewUpY = atof (argv [8]);
-  Standard_Real QAAISViewUpZ = atof (argv [9]);
-  Standard_Real QAAISViewAtX = atof (argv [10]);
-  Standard_Real QAAISViewAtY = atof (argv [11]);
-  Standard_Real QAAISViewAtZ = atof (argv [12]);
-  QAAISView -> V3d_View::SetScale (QAAISViewScale);
-  QAAISView -> V3d_View::SetCenter (QAAISViewCenterCoordinateX, QAAISViewCenterCoordinateY);
-  QAAISView -> V3d_View::SetAt (QAAISViewAtX, QAAISViewAtY, QAAISViewAtZ);
-  QAAISView -> V3d_View::SetProj (QAAISViewProjX, QAAISViewProjY, QAAISViewProjZ);
-  QAAISView -> V3d_View::SetUp (QAAISViewUpX, QAAISViewUpY, QAAISViewUpZ);
-  QAAISView -> V3d_View::SetProj (QAAISViewProjX, QAAISViewProjY, QAAISViewProjZ);
-  return 0;
+ if ( argc != 1 ) {
+   di << "Usage : " << argv[0] << "\n";
+   return 1;
+ }
+ Handle (V3d_View) QAAISView = ViewerTest::CurrentView ();
+ if ( QAAISView.IsNull () ) {
+   di << "You must initialize AISViewer before this command." << "\n";
+   return 1;
+ }
+ Standard_Integer QAAISMouseCoordinateX = 0;
+ Standard_Integer QAAISMouseCoordinateY = 0;
+ Standard_Integer argccc = 5;
+ const char *bufff[] = { "A", "B", "C", "D", "E" };
+ const char **argvvv = (const char **) bufff;
+ while ( ViewerMainLoop (argccc, argvvv) ) {
+   ViewerTest::GetMousePosition (QAAISMouseCoordinateX, QAAISMouseCoordinateY);
+ }
+ ViewerTest::GetMousePosition (QAAISMouseCoordinateX, QAAISMouseCoordinateY);
+ di << "X-coordinate: " << QAAISMouseCoordinateX << "; Y-coordinate: " << QAAISMouseCoordinateY << "\n";
+ return 0;
 }
 
 static Standard_Integer QAAISGetColorCoord (Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
@@ -1175,61 +901,12 @@ static int QAxwd_2d (Draw_Interpretor& di, int argc, const char ** argv)
 
 #ifndef WNT
 extern Draw_Viewer dout;
-extern XW_STATUS Xw_save_image_adv (Display *aDisplay,Window aWindow,XWindowAttributes aWinAttr,XImage *aPximage,Colormap aColormap,int aNcolors,char *filename);
 extern Display*         Draw_WindowDisplay;
 extern Colormap         Draw_WindowColorMap;
 #else
 Standard_IMPORT Draw_Viewer dout;
-int __WNT_API SaveWindowToFile (Handle( WNT_GraphicDevice )& gDev,
-                               HWND hWnd, char* fName, int x, int y, int w, int h);
 #endif
 
-//=======================================================================
-//function : QAxwd
-//purpose  :
-//=======================================================================
-static int QAxwd (Draw_Interpretor& di, int argc, const char ** argv)
-{
-  if (argc < 2)
-  {
-    di << "Usage : " << argv[0] << " [id=1] filename" << "\n";
-    return -1;
-  }
-
-  // enforce repaint if necessary
-  Standard_Integer id = 1;
-  const char* file = argv[1];
-  if (argc > 2) {
-    id  = atoi(argv[1]);
-    file = argv[2];
-  }
-
-  after(id);
-
-  dout.Flush();
-  if(dout.HasView(id)) {
-#if defined (WNT)
-    Handle(WNT_GraphicDevice) aGd = new WNT_GraphicDevice(Standard_False);
-    RECT rc;
-    GetClientRect((HWND)dout.GetWindow(id), &rc);
-    SaveWindowToFile(aGd,(HWND)dout.GetWindow(id),(char*)file,rc.left, rc.top,rc.right-rc.left, rc.bottom-rc.top);
-#else
-    XSync(Draw_WindowDisplay,True);
-
-    XWindowAttributes winAttr;
-    XGetWindowAttributes (Draw_WindowDisplay, dout.GetWindow(id), &winAttr);
-
-    XImage *pximage = XGetImage(Draw_WindowDisplay,dout.GetWindow(id),
-                               0,0,winAttr.width,winAttr.height,
-                               AllPlanes,ZPixmap);
-
-    Xw_save_image_adv(Draw_WindowDisplay,dout.GetWindow(id),winAttr,pximage,Draw_WindowColorMap,256,(char*)file);
-#endif
-  }
-
-  return 0;
-}
-
 //=======================================================================
 //function : QA2dGetIndexes
 //purpose  :
@@ -1329,138 +1006,6 @@ static int VTrihedronOrigins(Draw_Interpretor& di,
   return 0;
 }
 
-//=======================================================================
-//function : QAAddOrRemoveSelected
-//purpose  :
-//=======================================================================
-static Standard_Integer QAAddOrRemoveSelected (Draw_Interpretor& di, Standard_Integer n, const char ** a)
-{
-  if( n != 2)
-  {
-    di<<"Usage : QAAddOrRemoveSelected shape \n";
-    return 1;
-  }
-  //get AIS_Shape:
-  Handle(AIS_InteractiveContext) anAISCtx = ViewerTest::GetAISContext();
-
-  //ViewerTest_DoubleMapOfInteractiveAndName& aMap =
-  //                       ViewerTest::GetDataMapOfAIS ();
-  ViewerTest_DoubleMapOfInteractiveAndName& aMap = GetMapOfAIS();
-
-  TCollection_AsciiString aName(a[1]);
-  Handle(AIS_InteractiveObject) AISObj;
-
-  if(aMap.IsBound2(aName)){
-    AISObj = Handle(AIS_InteractiveObject)::DownCast(aMap.Find2(aName));
-    if(AISObj.IsNull()){
-      di<<"No interactive object \n";
-      return 1;
-    }
-
-    if(anAISCtx->HasOpenedContext()){
-      anAISCtx->InitSelected();
-      anAISCtx->AddOrRemoveSelected(AISObj);
-    }
-    else {
-      anAISCtx->InitCurrent();
-      anAISCtx->AddOrRemoveCurrentObject(AISObj);
-    }
-    return 0;
-  }
-  //select this shape:
-  else {
-    di<<"Use 'vdisplay' before";
-    return 1;
-  }
-}
-
-//=======================================================================
-//function : QASetZClippingMode
-//purpose  :
-//=======================================================================
-static Standard_Integer QASetZClippingMode (Draw_Interpretor& di, int argc, const char ** argv)
-{
-  if (argc != 2) {
-    di << "Usage : " << argv[0] << " mode(OFF/BACK/FRONT/SLICE)" << "\n";
-    return -1;
-  }
-
-  Handle(AIS_InteractiveContext) AIScontext = ViewerTest::GetAISContext();
-  if(AIScontext.IsNull()) {
-    di << "use 'vinit' command before " << argv[0] << "\n";
-    return -1;
-  }
-
-  Standard_Integer aStatus = 0;
-  V3d_TypeOfZclipping ZClippingMode;
-  if ( strcmp (argv [1], "OFF") == 0 ) {
-    aStatus = 1;
-    ZClippingMode = V3d_OFF;
-  }
-  if ( strcmp (argv [1], "BACK") == 0 ) {
-    aStatus = 1;
-    ZClippingMode = V3d_BACK;
-  }
-  if ( strcmp (argv [1], "FRONT") == 0 ) {
-    aStatus = 1;
-    ZClippingMode = V3d_FRONT;
-  }
-  if ( strcmp (argv [1], "SLICE") == 0 ) {
-    aStatus = 1;
-    ZClippingMode = V3d_SLICE;
-  }
-  if (aStatus != 1)
-  {
-    di << "Bad mode; Usage : " << argv[0] << " mode(OFF/BACK/FRONT/SLICE)" << "\n";
-    return -1;
-  }
-
-  Handle(V3d_View) aView = ViewerTest::CurrentView();
-  aView->SetZClippingType(ZClippingMode);
-  aView->Redraw();
-
-  return 0;
-}
-
-//=======================================================================
-//function : QAGetZClippingMode
-//purpose  :
-//=======================================================================
-static Standard_Integer QAGetZClippingMode (Draw_Interpretor& di, int /*argc*/, const char ** argv)
-{
-  Handle(AIS_InteractiveContext) AIScontext = ViewerTest::GetAISContext();
-  if(AIScontext.IsNull()) {
-    di << "use 'vinit' command before " << argv[0] << "\n";
-    return -1;
-  }
-
-  Handle(V3d_View) aView = ViewerTest::CurrentView();
-  TCollection_AsciiString ZClippingModeString;
-  Quantity_Length Depth, Width;
-  V3d_TypeOfZclipping ZClippingMode = aView->ZClipping(Depth, Width);
-  switch (ZClippingMode)
-  {
-  case V3d_OFF:
-    ZClippingModeString.Copy("OFF");
-    break;
-  case V3d_BACK:
-    ZClippingModeString.Copy("BACK");
-    break;
-  case V3d_FRONT:
-    ZClippingModeString.Copy("FRONT");
-    break;
-  case V3d_SLICE:
-    ZClippingModeString.Copy("SLICE");
-    break;
-  default:
-    ZClippingModeString.Copy(TCollection_AsciiString(ZClippingMode));
-    break;
-  }
-  di << "ZClippingMode = " << ZClippingModeString.ToCString() << "\n";
-
-  return 0;
-}
-
 #include <V2d_View.hxx>
 #include <AIS2D_InteractiveObject.hxx>
 #include <Graphic2d_Circle.hxx>
@@ -1539,144 +1084,8 @@ static Standard_Integer ViewId(const Standard_CString a)
   return id;
 }
 
-//=======================================================================
-//function : QAwzoom
-//purpose  :
-//=======================================================================
-
-static Standard_Integer QAwzoom(Draw_Interpretor& di, Standard_Integer argc, const char ** argv) {
-  if(argc < 6){
-    di<<"Usage : " << argv[0] << " view-id X1 Y1 X2 Y2\n";
-    return -1;
-  }
-
-  Standard_Integer id = ViewId(argv [1]);
-  if (id < 0) {
-    return -1;
-  }
-
-  Standard_Integer X1 = atoi (argv [2]);
-  Standard_Integer Y1 = atoi (argv [3]);
-  Standard_Integer X2 = atoi (argv [4]);
-  Standard_Integer Y2 = atoi (argv [5]);
-
-  Standard_Real zx,zy;
-
-  Standard_Integer X,Y,W,H;
-  dout.GetPosSize(id,X,Y,W,H);
-
-  if ((X1 == X2) || (Y1 == Y2)) return 0;
-
-  zx = (Standard_Real) Abs(X2-X1) / (Standard_Real) W;
-  zy = (Standard_Real) Abs(Y2-Y1) / (Standard_Real) H;
-  if (zy > zx) zx = zy;
-  zx = 1/zx;
-  if (X2 < X1) X1 = X2;
-  if (Y2 > Y1) Y1 = Y2;
-  X1 = (Standard_Integer ) (X1*zx);
-  Y1 = (Standard_Integer ) (Y1*zx);
-  dout.SetZoom(id,zx*dout.Zoom(id));
-  dout.SetPan(id,-X1,-Y1);
-  dout.RepaintView(id);
-  if (dout.HasView(id)) {
-    char title[255];
-    sprintf(title,"%d : %s - Zoom %f",id,dout.GetType(id),dout.Zoom(id));
-    dout.SetTitle(id,title);
-  }
-  return 0;
-}
-
 #include <Draw_Display.hxx>
 
-//=======================================================================
-//function : QAGetCoordinatesWzoom
-//purpose  :
-//=======================================================================
-
-static Standard_Integer QAGetCoordinatesWzoom(Draw_Interpretor& di, Standard_Integer, const char **)
-{
-  Standard_Integer id1,X1,Y1,b;
-  Standard_Integer X2,Y2;
-  Standard_Real dX1,dY1,dX2,dY2;
-  di << "Pick first corner"<<"\n";
-  dout.Select(id1,X1,Y1,b);
-
-  gp_Trsf T;
-  gp_Pnt P0(0,0,0);
-  dout.GetTrsf(id1,T);
-  T.Invert();
-  P0.Transform(T);
-  Standard_Real z = dout.Zoom(id1);
-
-  dX1=X1;       dY1=Y1;
-  dX1-=P0.X();  dY1-=P0.Y();
-  dX1/=z;       dY1/=z;
-
-  if (b != 1) return 0;
-  if (id1 < 0) return 0;
-  Draw_Display d = dout.MakeDisplay(id1);
-  d.SetColor(Draw_blanc);
-  d.SetMode(10);
-  Standard_Real dOX2 = dX1;
-  Standard_Real dOY2 = dY1;
-  d.Draw(gp_Pnt2d(dX1,dY1),gp_Pnt2d(dX1,dOY2));
-  d.Draw(gp_Pnt2d(dX1,dOY2),gp_Pnt2d(dOX2,dOY2));
-  d.Draw(gp_Pnt2d(dOX2,dOY2),gp_Pnt2d(dOX2,dY1));
-  d.Draw(gp_Pnt2d(dOX2,dY1),gp_Pnt2d(dX1,dY1));
-  d.Flush();
-  Standard_Real zx,zy;
-  Standard_Integer X,Y,W,H;
-  dout.GetPosSize(id1,X,Y,W,H);
-  di << "Pick second corner"<<"\n";
-  b = 0;
-  while (b == 0) {
-    dout.Select(id1,X2,Y2,b,Standard_False);
-    dX2=X2;          dY2=Y2;
-    dX2-=P0.X();     dY2-=P0.Y();
-    dX2/=z;          dY2/=z;
-
-    d.Draw(gp_Pnt2d(dX1,dY1),gp_Pnt2d(dX1,dOY2));
-    d.Draw(gp_Pnt2d(dX1,dOY2),gp_Pnt2d(dOX2,dOY2));
-    d.Draw(gp_Pnt2d(dOX2,dOY2),gp_Pnt2d(dOX2,dY1));
-    d.Draw(gp_Pnt2d(dOX2,dY1),gp_Pnt2d(dX1,dY1));
-    d.Draw(gp_Pnt2d(dX1,dY1),gp_Pnt2d(dX1,dY2));
-    d.Draw(gp_Pnt2d(dX1,dY2),gp_Pnt2d(dX2,dY2));
-    d.Draw(gp_Pnt2d(dX2,dY2),gp_Pnt2d(dX2,dY1));
-    d.Draw(gp_Pnt2d(dX2,dY1),gp_Pnt2d(dX1,dY1));
-    d.Flush();
-    dOX2 = dX2;
-    dOY2 = dY2;
-  }
-  d.Draw(gp_Pnt2d(dX1,dY1),gp_Pnt2d(dX1,dOY2));
-  d.Draw(gp_Pnt2d(dX1,dOY2),gp_Pnt2d(dOX2,dOY2));
-  d.Draw(gp_Pnt2d(dOX2,dOY2),gp_Pnt2d(dOX2,dY1));
-  d.Draw(gp_Pnt2d(dOX2,dY1),gp_Pnt2d(dX1,dY1));
-  d.Flush();
-  if (b != 1) return 0;
-
-  if ((X1 == X2) || (Y1 == Y2)) return 0;
-
-  di << "X1=" << X1 << " Y1=" << Y1 <<"\n";
-  di << "X2=" << X2 << " Y2=" << Y2 <<"\n";
-
-  zx = (Standard_Real) Abs(X2-X1) / (Standard_Real) W;
-  zy = (Standard_Real) Abs(Y2-Y1) / (Standard_Real) H;
-  if (zy > zx) zx = zy;
-  zx = 1/zx;
-  if (X2 < X1) X1 = X2;
-  if (Y2 > Y1) Y1 = Y2;
-  X1 = (Standard_Integer ) (X1*zx);
-  Y1 = (Standard_Integer ) (Y1*zx);
-  dout.SetZoom(id1,zx*dout.Zoom(id1));
-  dout.SetPan(id1,-X1,-Y1);
-  dout.RepaintView(id1);
-  //SetTitle(id1);
-  char title[255];
-  sprintf(title,"%d : %s - Zoom %f",id1,dout.GetType(id1),dout.Zoom(id1));
-  dout.SetTitle(id1,title);
-  return 0;
-}
-
 //=======================================================================
 // QArename
 //=======================================================================
@@ -1703,21 +1112,6 @@ static Standard_Integer QArename(Draw_Interpretor& di, Standard_Integer n, const
   return 0;
 }
 
-static Standard_Integer QANbSelected (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
-{
-  if(argc != 1) {
-    di << "Usage : " << argv[0] << "\n";
-    return 1;
-  }
-  Handle(AIS_InteractiveContext) aContext = ViewerTest::GetAISContext();
-  if(aContext.IsNull()) {
-    di << "use 'vinit' command before " << argv[0] << "\n";
-    return 1;
-  }
-  di << aContext->NbSelected() << "\n";
-  return 0;
-}
-
 //#if defined(V2D)
 //#include <AIS2D_InteractiveContext.hxx>
 //static Standard_Integer QANbSelected2d (Draw_Interpretor& /*di*/, Standard_Integer argc, char** argv)
@@ -1736,189 +1130,6 @@ static Standard_Integer QANbSelected (Draw_Interpretor& di, Standard_Integer arg
 //}
 //#endif
 
-static Standard_Integer QAPurgeDisplay (Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
-{
-  if (argc > 2) {
-    di << "Usage : " << argv[0] << " [CollectorToo=0/1]" << "\n";
-    return 1;
-  }
-  Standard_Boolean CollectorTooBoolean = Standard_False;
-  if (argc == 2) {
-    Standard_Integer CollectorTooInteger = atoi (argv [1]);
-    if (CollectorTooInteger != 0)
-      CollectorTooBoolean = Standard_True;
-  }
-  Handle(AIS_InteractiveContext) aContext = ViewerTest::GetAISContext();
-  if (aContext.IsNull()) {
-    di << "use 'vinit' command before " << argv[0] << "\n";
-    return 1;
-  }
-  aContext->CloseAllContexts(Standard_False);
-  di << aContext->PurgeDisplay(CollectorTooBoolean) << "\n";
-  return 0;
-}
-
-static Standard_Integer QACloseLocalContext (Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
-{
-  if (argc > 3) {
-    di << "Usage : " << argv[0] << " [Index [updateviewer=1/0]]" << "\n";
-    return 1;
-  }
-  Standard_Integer Index = -1;
-  if (argc > 1) {
-    Index = atoi (argv [1]);
-  }
-  //cout << "Index = " << Index << endl;
-  Standard_Boolean updateviewerBoolean = Standard_True;
-  if (argc == 3) {
-    Standard_Integer updateviewerInteger = atoi (argv [2]);
-    if (updateviewerInteger == 0)
-      updateviewerBoolean = Standard_False;
-  }
-  //if (updateviewerBoolean)
-  //  cout << "updateviewer = Standard_True" << endl;
-  //else
-  //  cout << "updateviewer = Standard_False" << endl;
-  Handle(AIS_InteractiveContext) aContext = ViewerTest::GetAISContext();
-  if (aContext.IsNull()) {
-    di << "use 'vinit' command before " << argv[0] << "\n";
-    return 1;
-  }
-  aContext->CloseLocalContext(Index, updateviewerBoolean);
-  return 0;
-}
-
-static Standard_Integer QACloseAllContexts (Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
-{
-  if (argc > 2) {
-    di << "Usage : " << argv[0] << " [updateviewer=1/0]" << "\n";
-    return 1;
-  }
-  Standard_Boolean updateviewerBoolean = Standard_True;
-  if (argc == 2) {
-    Standard_Integer updateviewerInteger = atoi (argv [1]);
-    if (updateviewerInteger == 0)
-      updateviewerBoolean = Standard_False;
-  }
-  //if (updateviewerBoolean)
-  //  cout << "updateviewer = Standard_True" << endl;
-  //else
-  //  cout << "updateviewer = Standard_False" << endl;
-  Handle(AIS_InteractiveContext) aContext = ViewerTest::GetAISContext();
-  if (aContext.IsNull()) {
-    di << "use 'vinit' command before " << argv[0] << "\n";
-    return 1;
-  }
-  aContext->CloseAllContexts(updateviewerBoolean);
-  return 0;
-}
-
-static Standard_Integer QAIndexOfCurrentLocal (Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
-{
-  if (argc > 1) {
-    di << "Usage : " << argv[0] << "\n";
-    return 1;
-  }
-  Handle(AIS_InteractiveContext) aContext = ViewerTest::GetAISContext();
-  if (aContext.IsNull()) {
-    di << "use 'vinit' command before " << argv[0] << "\n";
-    return 1;
-  }
-  di << aContext->IndexOfCurrentLocal() << "\n";
-  return 0;
-}
-
-#include <AIS_ListOfInteractive.hxx>
-static Standard_Integer QADisplayedObjects (Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
-{
-  if (argc > 2) {
-    di << "Usage : " << argv[0] << " [OnlyFromNeutral=0/1]" << "\n";
-    return 1;
-  }
-
-  Standard_Boolean OnlyFromNeutralBoolean = Standard_False;
-  if (argc == 2) {
-    Standard_Integer OnlyFromNeutralInteger = atoi (argv [1]);
-    if (OnlyFromNeutralInteger != 0)
-      OnlyFromNeutralBoolean = Standard_True;
-  }
-  //if (OnlyFromNeutralBoolean)
-  //  cout << "OnlyFromNeutral = Standard_True" << endl;
-  //else
-  //  cout << "OnlyFromNeutral = Standard_False" << endl;
-
-  Handle(AIS_InteractiveContext) aContext = ViewerTest::GetAISContext();
-  if (aContext.IsNull()) {
-    di << "use 'vinit' command before " << argv[0] << "\n";
-    return 1;
-  }
-  Standard_Integer ListOfInteractiveExtent = 0;
-  if(!aContext->HasOpenedContext()) {
-    ListOfInteractiveExtent = 0;
-  } else {
-    AIS_ListOfInteractive ListOfInteractive;
-    aContext->DisplayedObjects(ListOfInteractive, OnlyFromNeutralBoolean);
-    ListOfInteractiveExtent = ListOfInteractive.Extent();
-  }
-  di << ListOfInteractiveExtent << "\n";
-  return 0;
-}
-
-static Standard_Integer QASelectRectangle(Draw_Interpretor& di, Standard_Integer argc, const char ** argv )
-{
-  if(argc != 5) {
-    di << "Usage : " << argv[0] << " x1 y1 x2 y2" << "\n";
-    return -1;
-  }
-
-  Handle(AIS_InteractiveContext) myAIScontext = ViewerTest::GetAISContext();
-  if(myAIScontext.IsNull()) {
-    di << "use 'vinit' command before " << argv[0] << "\n";
-    return -1;
-  }
-
-  Standard_Integer x1 = atoi(argv[1]);
-  Standard_Integer y1 = atoi(argv[2]);
-  Standard_Integer x2 = atoi(argv[3]);
-  Standard_Integer y2 = atoi(argv[4]);
-
-  Handle(ViewerTest_EventManager) aCurrentEventManager = ViewerTest::CurrentEventManager();
-//  Handle(V3d_View) aCurrentView = ViewerTest::CurrentView();
-
-  aCurrentEventManager->MoveTo(x1,y1);
-  aCurrentEventManager->Select(x1,y1,x2,y2);
-  aCurrentEventManager->MoveTo(x2,y2);
-
-  return 0;
-}
-
-static Standard_Integer QAShiftSelectRectangle(Draw_Interpretor& di, Standard_Integer argc, const char ** argv )
-{
-  if(argc != 5) {
-    di << "Usage : " << argv[0] << " x1 y1 x2 y2" << "\n";
-    return -1;
-  }
-
-  Handle(AIS_InteractiveContext) myAIScontext = ViewerTest::GetAISContext();
-  if(myAIScontext.IsNull()) {
-    di << "use 'vinit' command before " << argv[0] << "\n";
-    return -1;
-  }
-  Standard_Integer x1 = atoi(argv[1]);
-  Standard_Integer y1 = atoi(argv[2]);
-  Standard_Integer x2 = atoi(argv[3]);
-  Standard_Integer y2 = atoi(argv[4]);
-
-  Handle(ViewerTest_EventManager) aCurrentEventManager = ViewerTest::CurrentEventManager();
-//  Handle(V3d_View) aCurrentView = ViewerTest::CurrentView();
-
-  aCurrentEventManager->MoveTo(x1,y1);
-  aCurrentEventManager->ShiftSelect(x1,y1,x2,y2);
-  aCurrentEventManager->MoveTo(x2,y2);
-
-  return 0;
-}
-
 static int QASelect2dRectangle (Draw_Interpretor& di, int argc, const char ** argv)
 {
   if (argc != 5)
@@ -1979,239 +1190,6 @@ static int QAShiftSelect2dRectangle (Draw_Interpretor& di, int argc, const char
   return 0;
 }
 
-//=======================================================================
-//function : QARotateV3dView
-//purpose  :
-//=======================================================================
-static Standard_Integer QARotateV3dView (Draw_Interpretor& di, int argc, const char ** argv)
-{
-  Handle(AIS_InteractiveContext) AIScontext = ViewerTest::GetAISContext();
-  if(AIScontext.IsNull()) {
-    di << "use 'vinit' command before " << argv[0] << "\n";
-    return -1;
-  }
-  if(argc < 4 || argc > 5){
-    di<<"Usage : " << argv[0] << " Ax Ay Az [Start(1/0)]\n";
-    return -1;
-  }
-  Standard_Real Ax = atof(argv[1]);
-  Standard_Real Ay = atof(argv[2]);
-  Standard_Real Az = atof(argv[3]);
-  Standard_Boolean Start = Standard_True;
-  if (argc == 5) {
-    Standard_Integer StartInteger = atoi(argv[4]);
-    if (StartInteger > 0) {
-      Start = Standard_True;
-    } else {
-      Start = Standard_False;
-    }
-  }
-
-  Handle(V3d_View) aView = ViewerTest::CurrentView();
-  aView->Rotate(Ax,Ay,Az,Start);
-  return 0;
-}
-
-//=======================================================================
-//function : QAMoveV3dView
-//purpose  :
-//=======================================================================
-static Standard_Integer QAMoveV3dView (Draw_Interpretor& di, int argc, const char ** argv)
-{
-  Handle(AIS_InteractiveContext) AIScontext = ViewerTest::GetAISContext();
-  if(AIScontext.IsNull()) {
-    di << "use 'vinit' command before " << argv[0] << "\n";
-    return -1;
-  }
-  if(argc < 4 || argc > 5){
-    di<<"Usage : " << argv[0] << " Dx Dy Dz [Start(1/0)]\n";
-    return -1;
-  }
-  Standard_Real Dx = atof(argv[1]);
-  Standard_Real Dy = atof(argv[2]);
-  Standard_Real Dz = atof(argv[3]);
-  Standard_Boolean Start = Standard_True;
-  if (argc == 5) {
-    Standard_Integer StartInteger = atoi(argv[4]);
-    if (StartInteger > 0) {
-      Start = Standard_True;
-    } else {
-      Start = Standard_False;
-    }
-  }
-
-  Handle(V3d_View) aView = ViewerTest::CurrentView();
-  aView->Move(Dx,Dy,Dz,Start);
-  return 0;
-}
-
-//=======================================================================
-//function : QATranslateV3dView
-//purpose  :
-//=======================================================================
-static Standard_Integer QATranslateV3dView (Draw_Interpretor& di, int argc, const char ** argv)
-{
-  Handle(AIS_InteractiveContext) AIScontext = ViewerTest::GetAISContext();
-  if(AIScontext.IsNull()) {
-    di << "use 'vinit' command before " << argv[0] << "\n";
-    return -1;
-  }
-  if(argc < 4 || argc > 5){
-    di<<"Usage : " << argv[0] << " Dx Dy Dz [Start(1/0)]\n";
-    return -1;
-  }
-  Standard_Real Dx = atof(argv[1]);
-  Standard_Real Dy = atof(argv[2]);
-  Standard_Real Dz = atof(argv[3]);
-  Standard_Boolean Start = Standard_True;
-  if (argc == 5) {
-    Standard_Integer StartInteger = atoi(argv[4]);
-    if (StartInteger > 0) {
-      Start = Standard_True;
-    } else {
-      Start = Standard_False;
-    }
-  }
-
-  Handle(V3d_View) aView = ViewerTest::CurrentView();
-  aView->Translate(Dx,Dy,Dz,Start);
-  return 0;
-}
-
-//=======================================================================
-//function : QATurnV3dView
-//purpose  :
-//=======================================================================
-static Standard_Integer QATurnV3dView (Draw_Interpretor& di, int argc, const char ** argv)
-{
-  Handle(AIS_InteractiveContext) AIScontext = ViewerTest::GetAISContext();
-  if(AIScontext.IsNull()) {
-    di << "use 'vinit' command before " << argv[0] << "\n";
-    return -1;
-  }
-  if(argc < 4 || argc > 5){
-    di<<"Usage : " << argv[0] << " Ax Ay Az [Start(1/0)]\n";
-    return -1;
-  }
-  Standard_Real Ax = atof(argv[1]);
-  Standard_Real Ay = atof(argv[2]);
-  Standard_Real Az = atof(argv[3]);
-  Standard_Boolean Start = Standard_True;
-  if (argc == 5) {
-    Standard_Integer StartInteger = atoi(argv[4]);
-    if (StartInteger > 0) {
-      Start = Standard_True;
-    } else {
-      Start = Standard_False;
-    }
-  }
-
-  Handle(V3d_View) aView = ViewerTest::CurrentView();
-  aView->Turn(Ax,Ay,Az,Start);
-  return 0;
-}
-
-//=======================================================================
-//function : QAPanningV3dView
-//purpose  :
-//=======================================================================
-static Standard_Integer QAPanningV3dView (Draw_Interpretor& di, int argc, const char ** argv)
-{
-  Handle(AIS_InteractiveContext) AIScontext = ViewerTest::GetAISContext();
-  if(AIScontext.IsNull()) {
-    di << "use 'vinit' command before " << argv[0] << "\n";
-    return -1;
-  }
-  if(argc < 3 || argc > 5){
-    di<<"Usage : " << argv[0] << " Dx Dy [Zoom [Start(1/0)]]\n";
-    return -1;
-  }
-  Standard_Real Dx = atof(argv[1]);
-  Standard_Real Dy = atof(argv[2]);
-  Standard_Real Zoom = 1.;
-  if (argc > 3) {
-    Zoom = atof(argv[3]);
-    if (Zoom <= 0.) {
-      di<<"Bad Zoom value  : " << Zoom << "\n";
-      return -1;
-    }
-  }
-  Standard_Boolean Start = Standard_True;
-  if (argc == 5) {
-    Standard_Integer StartInteger = atoi(argv[4]);
-    if (StartInteger > 0) {
-      Start = Standard_True;
-    } else {
-      Start = Standard_False;
-    }
-  }
-
-  Handle(V3d_View) aView = ViewerTest::CurrentView();
-  aView->Panning(Dx,Dy,Zoom,Start);
-  return 0;
-}
-
-//=======================================================================
-//function : QASetZoomV3dView
-//purpose  :
-//=======================================================================
-static Standard_Integer QASetZoomV3dView (Draw_Interpretor& di, int argc, const char ** argv)
-{
-  Handle(AIS_InteractiveContext) AIScontext = ViewerTest::GetAISContext();
-  if(AIScontext.IsNull()) {
-    di << "use 'vinit' command before " << argv[0] << "\n";
-    return -1;
-  }
-  if(argc < 2 || argc > 3){
-    di<<"Usage : " << argv[0] << " Zoom [Start(1/0)]\n";
-    return -1;
-  }
-  Standard_Real Zoom = atof(argv[1]);
-  if (Zoom <= 0.) {
-    di<<"Bad Zoom value  : " << Zoom << "\n";
-    return -1;
-  }
-  Standard_Boolean Start = Standard_True;
-  if (argc == 3) {
-    Standard_Integer StartInteger = atoi(argv[2]);
-    if (StartInteger > 0) {
-      Start = Standard_True;
-    } else {
-      Start = Standard_False;
-    }
-  }
-
-  Handle(V3d_View) aView = ViewerTest::CurrentView();
-  aView->SetZoom(Zoom,Start);
-  return 0;
-}
-
-//=======================================================================
-//function : QASetSizeV3dView
-//purpose  :
-//=======================================================================
-static Standard_Integer QASetSizeV3dView (Draw_Interpretor& di, int argc, const char ** argv)
-{
-  Handle(AIS_InteractiveContext) AIScontext = ViewerTest::GetAISContext();
-  if(AIScontext.IsNull()) {
-    di << "use 'vinit' command before " << argv[0] << "\n";
-    return -1;
-  }
-  if(argc != 2){
-    di<<"Usage : " << argv[0] << " Size\n";
-    return -1;
-  }
-  Standard_Real Size = atof(argv[1]);
-  if (Size <= 0.) {
-    di<<"Bad Size value  : " << Size << "\n";
-    return -1;
-  }
-
-  Handle(V3d_View) aView = ViewerTest::CurrentView();
-  aView->SetSize(Size);
-  return 0;
-}
-
 void QADraw::CommonCommands(Draw_Interpretor& theCommands)
 {
   ios::sync_with_stdio();
@@ -2227,18 +1205,8 @@ void QADraw::CommonCommands(Draw_Interpretor& theCommands)
   const char* group = "QA_Commands";
 
   theCommands.Add("QARebuild","QARebuild command_name",__FILE__,QARebuild,group);
-  theCommands.Add("QAxwd_3d","QAxwd_3d filename",__FILE__,QAxwd_3d,group);
-  theCommands.Add("QAMoveTo","QAMoveTo x y",__FILE__,QAMoveTo,group);
-  theCommands.Add("QASelect","QASelect x y",__FILE__,QASelect,group);
-  theCommands.Add("QAShiftSelect","QAShiftSelect x y",__FILE__,QAShiftSelect,group);
-  theCommands.Add("QAUpdateLights","QAUpdateLights",__FILE__,QAUpdateLights,group);
-  theCommands.Add("QASetAntialiasing","QASetAntialiasing [1/0]",__FILE__,QASetAntialiasing,group);
-  theCommands.Add("QAvzfit","QAvzfit",__FILE__,QAvzfit,group);
   theCommands.Add("QAGetPixelColor", "QAGetPixelColor coordinate_X coordinate_Y [color_R color_G color_B]", __FILE__,QAAISGetPixelColor, group);
-  theCommands.Add("QASetChoiceMode", "QASetChoiceMode mode switch ; Use without params to see a help ", __FILE__,QAAISSetChoiceMode, group);
   theCommands.Add("QAGetMousePoint", "QAGetMousePoint", __FILE__,QAAISGetMousePoint, group);
-  theCommands.Add("QAGetViewCharac", "QAGetViewCharac", __FILE__,QAAISGetViewCharac, group);
-  theCommands.Add("QASetViewCharac", "QASetViewCharac scale center_X center_Y proj_X proj_Y proj_Z up_X up_Y up_Z at_X at_Y at_Z", __FILE__,QAAISSetViewCharac, group);
   theCommands.Add("QAGetColorCoord", "QAGetColorCoord [3d|2d]", __FILE__,QAAISGetColorCoord, group);
 //#ifndef WNT
   theCommands.Add("QAAISGetPixelColor2d",
@@ -2269,57 +1237,23 @@ void QADraw::CommonCommands(Draw_Interpretor& theCommands)
   theCommands.Add("QAMoveTo2d", "QAMoveTo2d x y", __FILE__, QAMoveTo2d, group);
   theCommands.Add("QASelect2d", "QASelect2d x y", __FILE__, QASelect2d, group);
   theCommands.Add("QAShiftSelect2d", "QAShiftSelect2d x y", __FILE__, QAShiftSelect2d, group);
-
   theCommands.Add("QAv2dSetHighlightMode",
                   "QAv2dSetHighlightMode mode", __FILE__, V2dSetHighlightMode, group);
-
   theCommands.Add("QAxwd_2d", "QAxwd_2d filename", __FILE__, QAxwd_2d, group);
-
-  theCommands.Add("QAxwd", "QAxwd [id=1] filename", __FILE__, QAxwd, group);
-
   theCommands.Add("QA2dGetIndexes", "QA2dGetIndexes", __FILE__, QA2dGetIndexes, group);
 
   theCommands.Add("vtri_orig",
                  "vtri_orig         : vtri_orig trihedron_name  -  draws axis origin lines",
                  __FILE__,VTrihedronOrigins,group);
-
-  theCommands.Add("QAAddOrRemoveSelected",
-                  "QAAddOrRemoveSelected shape : selects the shape by AddOrRemoveSelected method",
-                 __FILE__, QAAddOrRemoveSelected, group);
-
-  theCommands.Add("QASetZClippingMode","QASetZClippingMode mode(OFF/BACK/FRONT/SLICE)",__FILE__,QASetZClippingMode,group);
-  theCommands.Add("QAGetZClippingMode","QAGetZClippingMode",__FILE__,QAGetZClippingMode,group);
   theCommands.Add("QAv2dcircle", "QAv2dcircle CircleName X Y Radius Alpha Beta [Color_index]", __FILE__, QAv2dcircle, group);
 
-  theCommands.Add("QAwzoom","QAwzoom view-id X1 Y1 X2 Y2; zoom on a window",__FILE__,QAwzoom,group);
-  theCommands.Add("QAGetCoordinatesWzoom","QAGetCoordinatesWzoom ; Get coordinates for zoom on a window",__FILE__,QAGetCoordinatesWzoom,group);
-
 // adding commands "rename" leads to the fact that QA commands doesn't work properly OCC23410, use function "renamevar"
 // theCommands.Add("rename","rename name1 toname1 name2 toname2 ...",__FILE__,QArename,group);
-
-  theCommands.Add ("QANbSelected", "QANbSelected", __FILE__, QANbSelected, group);
 //#if defined(V2D)
 //  theCommands.Add ("QANbSelected2d", "QANbSelected2d", __FILE__, QANbSelected2d, group);
 //#endif
-
-  theCommands.Add ("QAPurgeDisplay", "QAPurgeDisplay [CollectorToo=0/1]", __FILE__, QAPurgeDisplay, group);
-  theCommands.Add ("QACloseLocalContext", "QACloseLocalContext [Index [updateviewer=1/0]]", __FILE__, QACloseLocalContext, group);
-  theCommands.Add ("QACloseAllContexts", "QACloseAllContexts [updateviewer=1/0]", __FILE__, QACloseAllContexts, group);
-  theCommands.Add ("QAIndexOfCurrentLocal", "QAIndexOfCurrentLocal", __FILE__, QAIndexOfCurrentLocal, group);
-  theCommands.Add ("QADisplayedObjects", "QADisplayedObjects [OnlyFromNeutral=0/1]", __FILE__, QADisplayedObjects, group);
-
-  theCommands.Add("QASelectRectangle","QASelectRectangle x1 y1 x2 y2",__FILE__,QASelectRectangle,group);
-  theCommands.Add("QAShiftSelectRectangle","QAShiftSelectRectangle x1 y1 x2 y2",__FILE__,QAShiftSelectRectangle,group);
   theCommands.Add("QASelect2dRectangle","QASelect2dRectangle x1 y1 x2 y2",__FILE__,QASelect2dRectangle,group);
   theCommands.Add("QAShiftSelect2dRectangle","QAShiftSelect2dRectangle x1 y1 x2 y2",__FILE__,QAShiftSelect2dRectangle,group);
-
-  theCommands.Add("QARotateV3dView","QARotateV3dView Ax Ay Az [Start(1/0)]",__FILE__,QARotateV3dView,group);
-  theCommands.Add("QAMoveV3dView","QAMoveV3dView Dx Dy Dz [Start(1/0)]",__FILE__,QAMoveV3dView,group);
-  theCommands.Add("QATranslateV3dView","QATranslateV3dView Dx Dy Dz [Start(1/0)]",__FILE__,QATranslateV3dView,group);
-  theCommands.Add("QATurnV3dView","QATurnV3dView Ax Ay Az [Start(1/0)]",__FILE__,QATurnV3dView,group);
-  theCommands.Add("QAPanningV3dView","QAPanningV3dView Dx Dy [Zoom [Start(1/0)]]",__FILE__,QAPanningV3dView,group);
-  theCommands.Add("QASetZoomV3dView","QASetZoomV3dView Zoom [Start(1/0)]",__FILE__,QASetZoomV3dView,group);
-  theCommands.Add("QASetSizeV3dView","QASetSizeV3dView Size",__FILE__,QASetSizeV3dView,group);
 }
 /*
 extern "C" int Tkqadraw_Init(Tcl_Interp *);
index e254c54dd1146d1d9604cb95fc0098fdead02e6c..234c67a99c13c422f4484ad04e8fc63f4434760a 100755 (executable)
@@ -29,6 +29,7 @@ uses
     Draw,
     TCollection,
     TColStd,
+    TColgp,
     TopAbs,
     TopTools,
     TopoDS,
index 0efa670d68b6c6a4876d34b0ad6c1426911b75c0..c560ff72b6c9f2dcb12adc6ee809950ea59b9e5f 100755 (executable)
@@ -560,7 +560,8 @@ void ViewerTest::StandardModeActivation(const Standard_Integer mode )
     case 4: cmode = "Face"; break;
     case 5: cmode = "Shell"; break;
     case 6: cmode = "Solid"; break;
-    case 7: cmode = "Compound"; break;
+    case 7: cmode = "Compsolid"; break;
+    case 8: cmode = "Compound"; break;
     }
 
     if(theactivatedmodes.Contains(mode))
@@ -578,128 +579,6 @@ void ViewerTest::StandardModeActivation(const Standard_Integer mode )
   }
 }
 
-//==============================================================================
-//function : SelectFromContext
-//purpose  : pick / select an object from the last MoveTo() on a
-//            ButtonPress event
-//==============================================================================
-
-Handle(AIS_InteractiveObject) Select(Standard_Integer argc,
-                                    const char** argv,
-                                    Standard_Boolean shift,
-                                    Standard_Boolean pick )
-{
-  Handle(AIS_InteractiveObject) ret;
-  Handle (ViewerTest_EventManager) EM = ViewerTest::CurrentEventManager();
-  if ( shift ) {
-    EM->ShiftSelect();
-  }
-  else {
-    EM->Select();
-  }
-  const Handle(AIS_InteractiveContext) aContext = EM->Context();
-
-  if ( !aContext->HasOpenedContext() ) {
-    aContext->InitCurrent();
-    while ( aContext->MoreCurrent() ) {
-      Handle(AIS_InteractiveObject) aisPickedShape =
-       Handle(AIS_InteractiveObject)::DownCast(aContext->Current());
-
-//JR/Hp
-      const char *name = (GetMapOfAIS().IsBound1(aisPickedShape))?
-//      const char *name = (GetMapOfAIS().IsBound1(aisPickedShape))?
-       GetMapOfAIS().Find1(aisPickedShape).ToCString() :
-         "????";
-      Handle(AIS_Shape) TheRealSh = Handle(AIS_Shape)::DownCast(aisPickedShape);
-      if(!TheRealSh.IsNull()){
-       cout << "Current is " << name
-         << " (" << GetTypeNameFromShape(TheRealSh->Shape())
-           << ")" << endl;
-      }
-      ret = aisPickedShape;
-      if(!TheRealSh.IsNull()){
-       if ( pick && argc > 4 ) {
-         DBRep::Set(argv[4], TheRealSh->Shape());
-       }
-      }
-      aContext->NextCurrent();
-    }
-  }
-  else {
-    // A LocalContext is opened, the use xxxxSelected()
-    // to select an object and its SubShape
-    aContext->InitSelected();
-    while ( aContext->MoreSelected() ) {
-      if ( !aContext->HasSelectedShape() ) {
-      }
-      else {
-        TopoDS_Shape PickedShape = aContext->SelectedShape();
-       if ( pick && argc > 5 ) {
-         DBRep::Set(argv[5], PickedShape);
-       }
-      }
-
-      if ( aContext->Interactive().IsNull() ) {
-        cout << "??? (No InteractiveObject selected)" << endl;
-      }
-      else {
-        Handle(AIS_InteractiveObject) aisPicked =
-          Handle(AIS_InteractiveObject)::DownCast(aContext->Interactive());
-        ret = aisPicked;
-       Handle(AIS_Shape) aisPickedShape = Handle(AIS_Shape)::DownCast(aisPicked);
-
-       // Get back its name
-//JR/Hp
-       const char *name = ( GetMapOfAIS().IsBound1(aisPicked) )?
-//     const char *name = ( GetMapOfAIS().IsBound1(aisPicked) )?
-         GetMapOfAIS().Find1(aisPicked).ToCString() :
-           "????";
-
-       if(!aisPickedShape.IsNull()){
-         if ( pick && argc > 4 ) {
-           // Create a draw variable to store the wohole shape
-           // for vpick command
-           DBRep::Set(argv[4], aisPickedShape->Shape());
-         }
-
-         cout << name << " (" << GetTypeNameFromShape(aisPickedShape->Shape())
-           << ")" << endl  ;
-       }
-      }
-      // Goto the next selected object
-      aContext->NextSelected();
-    }
-  }
-  return ret;
-}
-
-//==============================================================================
-//function : DetectedFromContext
-//purpose  : hilight dynamicaly an object from the last MoveTo() on a
-//            MouseMove event
-//==============================================================================
-Handle(AIS_InteractiveObject) DetectedFromContext(
-       Handle(AIS_InteractiveContext) aContext )
-{
-  Handle(AIS_InteractiveObject) ret;
-  if ( aContext->HasDetected() ) {
-    if ( !aContext->HasDetectedShape() ) {
-      //No SubShape selected
-    }
-    else {
-      // Get the detected SubShape
-      TopoDS_Shape PickedShape = aContext->DetectedShape();
-    }
-    if ( !aContext->DetectedInteractive().IsNull() ) {
-      Handle(AIS_InteractiveObject) aisPickedShape =
-       Handle(AIS_InteractiveObject)::DownCast(aContext->DetectedInteractive());
-      ret = aisPickedShape;
-    }
-  }
-  return ret;
-}
-
-
 //==============================================================================
 //function : VDispAreas,VDispSensitive,...
 //purpose  : Redraw the view
index 5fc9a3439e43e2046d91af96d1afa680ea18f5f5..1b4395805f503a76f3199301184dd342e317a0e7 100755 (executable)
@@ -26,8 +26,8 @@ class EventManager from ViewerTest inherits TShared from MMgt
 
 uses
     View                from V3d,
-    InteractiveContext  from AIS
-    
+    InteractiveContext  from AIS,
+    Array1OfPnt2d       from TColgp
 is
 
     Create (aView: View from V3d;
@@ -44,6 +44,10 @@ is
     Select(me:mutable;xmin,ymin,xmax,ymax:Integer) is virtual;
     
     ShiftSelect(me:mutable;xmin,ymin,xmax,ymax:Integer) is virtual;
+    
+    Select(me:mutable;thePolyline:Array1OfPnt2d from TColgp) is virtual;
+    
+    ShiftSelect(me:mutable;thePolyline:Array1OfPnt2d from TColgp) is virtual;
 
     Context(me) returns InteractiveContext from AIS;
     ---C++: inline
index 7cffdaf919b10ca20d5e7e95b3a57f32d0d2655e..fd6c5700111b43d5bc55f3f07b77bae10386d19f 100755 (executable)
@@ -118,3 +118,47 @@ void ViewerTest_EventManager::ShiftSelect()
   if (!aView.IsNull())
     aView->Select(myX, myY, Standard_True);
 }
+
+//=======================================================================
+//function : Select
+//purpose  : Selection with polyline
+//=======================================================================
+
+void ViewerTest_EventManager::Select(const TColgp_Array1OfPnt2d& thePolyline)
+{
+  if(!myCtx.IsNull() && !myView.IsNull())
+    myCtx->Select(thePolyline,myView);
+  const Handle(NIS_View) aView = Handle(NIS_View)::DownCast(myView);
+  if (!aView.IsNull())
+  {
+    NCollection_List<gp_XY> aPolylist;
+    for(Standard_Integer anIter = thePolyline.Lower();anIter <= thePolyline.Upper();++anIter)
+    {
+      aPolylist.Append(gp_XY(thePolyline.Value(anIter).X(),
+        thePolyline.Value(anIter).Y()));
+    }
+    aView->Select(aPolylist);
+  }
+}
+
+//=======================================================================
+//function : ShiftSelect
+//purpose  : Selection with polyline without erasing of current selection
+//=======================================================================
+
+void ViewerTest_EventManager::ShiftSelect(const TColgp_Array1OfPnt2d& thePolyline)
+{
+  if(!myCtx.IsNull() && !myView.IsNull())
+    myCtx->ShiftSelect(thePolyline,myView);
+  const Handle(NIS_View) aView = Handle(NIS_View)::DownCast(myView);
+  if (!aView.IsNull())
+  {
+    NCollection_List<gp_XY> aPolylist;
+    for(Standard_Integer anIter = thePolyline.Lower();anIter <= thePolyline.Upper();++anIter)
+    {
+      aPolylist.Append(gp_XY(thePolyline.Value(anIter).X(),
+        thePolyline.Value(anIter).Y()));
+    }
+    aView->Select(aPolylist, Standard_True);
+  }
+}
index cb4a9dcc01d399ce64cd994803465d7e9cebbdf9..ededd567c4140e4d29373727cb7510b7c1eab2b5 100755 (executable)
@@ -34,6 +34,7 @@
 #include <Graphic3d_ExportFormat.hxx>
 #include <ViewerTest.hxx>
 #include <ViewerTest_EventManager.hxx>
+#include <ViewerTest_DoubleMapOfInteractiveAndName.hxx>
 #include <Visual3d_View.hxx>
 #include <Visual3d_ViewManager.hxx>
 #include <V3d_LayerMgr.hxx>
@@ -48,6 +49,8 @@
 #include <Image_AlienPixMap.hxx>
 #include <OSD_Timer.hxx>
 #include <TColStd_SequenceOfInteger.hxx>
+#include <TColStd_HSequenceOfReal.hxx>
+#include <TColgp_Array1OfPnt2d.hxx>
 #include <Visual3d_LayerItem.hxx>
 #include <V3d_LayerMgr.hxx>
 #include <V3d_LayerMgrPointer.hxx>
@@ -94,6 +97,7 @@ Standard_IMPORT Standard_Boolean Draw_VirtualWindows;
 
 Standard_EXPORT int ViewerMainLoop(Standard_Integer , const char** argv);
 extern const Handle(NIS_InteractiveContext)& TheNISContext();
+extern ViewerTest_DoubleMapOfInteractiveAndName& GetMapOfAIS();
 
 #if defined(_WIN32) || defined(__WIN32__)
 static Handle(Graphic3d_WNTGraphicDevice)& GetG3dDevice(){
@@ -3097,6 +3101,526 @@ static int VDiffImage (Draw_Interpretor& theDI, Standard_Integer theArgNb, const
   return 0;
 }
 
+//=======================================================================
+//function : VSelect
+//purpose  : Emulates different types of selection by mouse:
+//           1) single click selection
+//           2) selection with rectangle having corners at pixel positions (x1,y1) and (x2,y2)
+//           3) selection with polygon having corners at
+//           pixel positions (x1,y1),...,(xn,yn) 
+//           4) any of these selections with shift button pressed
+//=======================================================================
+static Standard_Integer VSelect (Draw_Interpretor& di,
+                                 Standard_Integer argc,
+                                 const char ** argv)
+{
+  if(argc < 3) 
+  {
+    di << "Usage : " << argv[0] << " x1 y1 [x2 y2 [... xn yn]] [shift_selection = 1|0]" << "\n";
+    return 1;
+  }
+
+  Handle(AIS_InteractiveContext) myAIScontext = ViewerTest::GetAISContext();
+  if(myAIScontext.IsNull()) 
+  {
+    di << "use 'vinit' command before " << argv[0] << "\n";
+    return 1;
+  }
+  const Standard_Boolean isShiftSelection = (argc>3 && !(argc%2) && (atoi(argv[argc-1])==1));
+  Handle(ViewerTest_EventManager) aCurrentEventManager = ViewerTest::CurrentEventManager();
+  aCurrentEventManager->MoveTo(atoi(argv[1]),atoi(argv[2]));
+  if(argc <= 4)
+  {
+    if(isShiftSelection)
+      aCurrentEventManager->ShiftSelect();
+    else
+      aCurrentEventManager->Select();
+  }
+  else if(argc <= 6)
+  {
+    if(isShiftSelection)
+      aCurrentEventManager->ShiftSelect(atoi(argv[1]),atoi(argv[2]),atoi(argv[3]),atoi(argv[4]));
+    else
+      aCurrentEventManager->Select(atoi(argv[1]),atoi(argv[2]),atoi(argv[3]),atoi(argv[4]));
+  }
+  else
+  {
+    Standard_Integer anUpper = 0;
+
+    if(isShiftSelection)
+      anUpper = (argc-1)/2;
+    else
+      anUpper = argc/2;
+    TColgp_Array1OfPnt2d aPolyline(1,anUpper);
+
+    for(Standard_Integer i=1;i<=anUpper;++i)
+      aPolyline.SetValue(i,gp_Pnt2d(atoi(argv[2*i-1]),atoi(argv[2*i])));
+
+    if(isShiftSelection)
+      aCurrentEventManager->ShiftSelect(aPolyline);
+    else
+      aCurrentEventManager->Select(aPolyline);
+  }
+  return 0;
+}
+
+//=======================================================================
+//function : VMoveTo
+//purpose  : Emulates cursor movement to defined pixel position     
+//=======================================================================
+static Standard_Integer VMoveTo (Draw_Interpretor& di,
+                                Standard_Integer argc,
+                                const char ** argv)
+{
+  if(argc != 3) 
+  {
+    di << "Usage : " << argv[0] << " x y" << "\n";
+    return 1;
+  }
+
+  Handle(AIS_InteractiveContext) aContext = ViewerTest::GetAISContext();
+  if(aContext.IsNull()) 
+  {
+    di << "use 'vinit' command before " << argv[0] << "\n";
+    return 1;
+  }
+  ViewerTest::CurrentEventManager()->MoveTo(atoi(argv[1]),atoi(argv[2]));
+  return 0;
+}
+
+//=======================================================================
+//function : VViewParams
+//purpose  : Gets or sets AIS View characteristics      
+//=======================================================================
+static Standard_Integer VViewParams (Draw_Interpretor& di,
+                                Standard_Integer argc,
+                                const char ** argv)
+{
+  if ( argc != 1 && argc != 13) 
+  {
+    di << "Usage : " << argv[0] << "\n";
+    return 1;
+  }
+  Handle (V3d_View) anAISView = ViewerTest::CurrentView ();
+  if ( anAISView.IsNull () ) 
+  {
+    di << "use 'vinit' command before " << argv[0] << "\n";
+    return 1;
+  }
+  if(argc==1){
+    Quantity_Factor anAISViewScale = anAISView -> V3d_View::Scale ();
+    Standard_Real anAISViewCenterCoordinateX = 0.0;
+    Standard_Real anAISViewCenterCoordinateY = 0.0;
+    anAISView -> V3d_View::Center (anAISViewCenterCoordinateX, anAISViewCenterCoordinateY);
+    Standard_Real anAISViewProjX = 0.0;
+    Standard_Real anAISViewProjY = 0.0;
+    Standard_Real anAISViewProjZ = 0.0;
+    anAISView -> V3d_View::Proj (anAISViewProjX, anAISViewProjY, anAISViewProjZ);
+    Standard_Real anAISViewUpX = 0.0;
+    Standard_Real anAISViewUpY = 0.0;
+    Standard_Real anAISViewUpZ = 0.0;
+    anAISView -> V3d_View::Up (anAISViewUpX, anAISViewUpY, anAISViewUpZ);
+    Standard_Real anAISViewAtX = 0.0;
+    Standard_Real anAISViewAtY = 0.0;
+    Standard_Real anAISViewAtZ = 0.0;
+    anAISView -> V3d_View::At (anAISViewAtX, anAISViewAtY, anAISViewAtZ);
+    di << "Scale of current view: " << anAISViewScale << "\n";
+    di << "Center on X : "<< anAISViewCenterCoordinateX << "; on Y: " << anAISViewCenterCoordinateY << "\n";
+    di << "Proj on X : " << anAISViewProjX << "; on Y: " << anAISViewProjY << "; on Z: " << anAISViewProjZ << "\n";
+    di << "Up on X : " << anAISViewUpX << "; on Y: " << anAISViewUpY << "; on Z: " << anAISViewUpZ << "\n";
+    di << "At on X : " << anAISViewAtX << "; on Y: " << anAISViewAtY << "; on Z: " << anAISViewAtZ << "\n";
+  }
+  else
+  {
+    Quantity_Factor anAISViewScale = atof (argv [1]);
+    Standard_Real anAISViewCenterCoordinateX = atof (argv [2]);
+    Standard_Real anAISViewCenterCoordinateY = atof (argv [3]);
+    Standard_Real anAISViewProjX = atof (argv [4]);
+    Standard_Real anAISViewProjY = atof (argv [5]);
+    Standard_Real anAISViewProjZ = atof (argv [6]);
+    Standard_Real anAISViewUpX = atof (argv [7]);
+    Standard_Real anAISViewUpY = atof (argv [8]);
+    Standard_Real anAISViewUpZ = atof (argv [9]);
+    Standard_Real anAISViewAtX = atof (argv [10]);
+    Standard_Real anAISViewAtY = atof (argv [11]);
+    Standard_Real anAISViewAtZ = atof (argv [12]);
+    anAISView -> V3d_View::SetScale (anAISViewScale);
+    anAISView -> V3d_View::SetCenter (anAISViewCenterCoordinateX, anAISViewCenterCoordinateY);
+    anAISView -> V3d_View::SetAt (anAISViewAtX, anAISViewAtY, anAISViewAtZ);
+    anAISView -> V3d_View::SetProj (anAISViewProjX, anAISViewProjY, anAISViewProjZ);
+    anAISView -> V3d_View::SetUp (anAISViewUpX, anAISViewUpY, anAISViewUpZ);
+  }
+  return 0;
+}
+
+//=======================================================================
+//function : VChangeSelected
+//purpose  : Adds the shape to selection or remove one from it    
+//=======================================================================
+static Standard_Integer VChangeSelected (Draw_Interpretor& di,
+                                Standard_Integer argc,
+                                const char ** argv)
+{
+  if(argc != 2)
+  {
+    di<<"Usage : " << argv[0] << " shape \n";
+    return 1;
+  }
+  //get AIS_Shape:
+  Handle(AIS_InteractiveContext) aContext = ViewerTest::GetAISContext();
+  ViewerTest_DoubleMapOfInteractiveAndName& aMap = GetMapOfAIS();
+  TCollection_AsciiString aName(argv[1]);
+  Handle(AIS_InteractiveObject) anAISObject;
+
+  if(!aMap.IsBound2(aName))
+  {
+    di<<"Use 'vdisplay' before";
+    return 1;
+  }
+  else
+  {
+    anAISObject = Handle(AIS_InteractiveObject)::DownCast(aMap.Find2(aName));
+    if(anAISObject.IsNull()){
+      di<<"No interactive object \n";
+      return 1;
+    }
+
+    if(aContext->HasOpenedContext())
+    {
+      aContext->AddOrRemoveSelected(anAISObject);
+    }
+    else 
+    {
+      aContext->AddOrRemoveCurrentObject(anAISObject);
+    }
+  }
+  return 0;
+}
+
+//=======================================================================
+//function : VZClipping
+//purpose  : Gets or sets ZClipping mode, width and depth   
+//=======================================================================
+static Standard_Integer VZClipping (Draw_Interpretor& di,
+                                Standard_Integer argc,
+                                const char ** argv)
+{
+  if(argc>4) 
+  {
+    di << "Usage : " << argv[0] << " [mode] [depth  width]" << "\n"
+      <<"mode = OFF|BACK|FRONT|SLICE depth = [0..1] width = [0..1]" << "\n";
+    return -1;
+  }
+  Handle(AIS_InteractiveContext) aContext = ViewerTest::GetAISContext();
+  if(aContext.IsNull()) 
+  {
+    di << "use 'vinit' command before " << argv[0] << "\n";
+    return 1;
+  }
+  Handle(V3d_View) aView = ViewerTest::CurrentView();
+  V3d_TypeOfZclipping aZClippingMode;
+  if(argc==1)
+  {
+    TCollection_AsciiString aZClippingModeString;
+    Quantity_Length aDepth, aWidth;
+    aZClippingMode = aView->ZClipping(aDepth, aWidth);
+    switch (aZClippingMode)
+    {
+    case V3d_OFF:
+      aZClippingModeString.Copy("OFF");
+      break;
+    case V3d_BACK:
+      aZClippingModeString.Copy("BACK");
+      break;
+    case V3d_FRONT:
+      aZClippingModeString.Copy("FRONT");
+      break;
+    case V3d_SLICE:
+      aZClippingModeString.Copy("SLICE");
+      break;
+    default:
+      aZClippingModeString.Copy(TCollection_AsciiString(aZClippingMode));
+      break;
+    }
+    di << "ZClippingMode = " << aZClippingModeString.ToCString() << "\n"
+      << "ZClipping depth = " << aDepth << "\n"
+      << "ZClipping width = " << aWidth << "\n";
+  }
+  else
+  {
+    if(argc !=3)
+    {
+      Standard_Integer aStatus = 0;
+      if ( strcmp (argv [1], "OFF") == 0 ) {
+        aStatus = 1;
+        aZClippingMode = V3d_OFF;
+      }
+      if ( strcmp (argv [1], "BACK") == 0 ) {
+        aStatus = 1;
+        aZClippingMode = V3d_BACK;
+      }
+      if ( strcmp (argv [1], "FRONT") == 0 ) {
+        aStatus = 1;
+        aZClippingMode = V3d_FRONT;
+      }
+      if ( strcmp (argv [1], "SLICE") == 0 ) {
+        aStatus = 1;
+        aZClippingMode = V3d_SLICE;
+      }
+      if (aStatus != 1)
+      {
+        di << "Bad mode; Usage : " << argv[0] << " [mode] [depth width]" << "\n"
+          << "mode = OFF|BACK|FRONT|SLICE depth = [0..1] width = [0..1]" << "\n";
+        return 1;
+      } 
+      aView->SetZClippingType(aZClippingMode);
+    }
+    if(argc >2)
+    {
+      Quantity_Length aDepth = 0., aWidth = 1.;
+      if(argc == 3)
+      {
+        aDepth = atof(argv[1]);
+        aWidth = atof(argv[2]);
+      }
+      else if(argc == 4)
+      {
+        aDepth = atof(argv[2]);
+        aWidth = atof(argv[3]);
+      }
+      
+      if(aDepth<0. || aDepth>1.)
+      {
+        di << "Bad depth; Usage : " << argv[0] << " [mode] [depth width]" << "\n"
+        << "mode = OFF|BACK|FRONT|SLICE depth = [0..1] width = [0..1]" << "\n";
+        return 1;
+      }
+      if(aWidth<0. || aWidth>1.)
+      {
+        di << "Bad width; Usage : " << argv[0] << " [mode] [depth width]" << "\n"
+        << "mode = OFF|BACK|FRONT|SLICE depth = [0..1] width = [0..1]" << "\n";
+        return 1;
+      }
+
+      aView->SetZClippingDepth(aDepth);
+      aView->SetZClippingWidth(aWidth);
+    }
+    aView->Redraw();
+  }
+  return 0;
+}
+
+//=======================================================================
+//function : VNbSelected
+//purpose  : Returns number of selected objects  
+//=======================================================================
+static Standard_Integer VNbSelected (Draw_Interpretor& di,
+                                Standard_Integer argc,
+                                const char ** argv)
+{
+  if(argc != 1)
+  {
+    di << "Usage : " << argv[0] << "\n";
+    return 1;
+  }
+  Handle(AIS_InteractiveContext) aContext = ViewerTest::GetAISContext();
+  if(aContext.IsNull())
+  {
+    di << "use 'vinit' command before " << argv[0] << "\n";
+    return 1;
+  }
+  di << aContext->NbSelected() << "\n";
+  return 0;
+}
+
+//=======================================================================
+//function : VAntialiasing
+//purpose  : Switches altialiasing on or off  
+//=======================================================================
+static Standard_Integer VAntialiasing (Draw_Interpretor& di,
+                                Standard_Integer argc,
+                                const char ** argv)
+{
+  if(argc > 2)
+  {
+    di << "Usage : " << argv[0] << " [1|0]" << "\n";
+    return 1;
+  }
+
+  Handle(AIS_InteractiveContext) aContext = ViewerTest::GetAISContext();
+  if(aContext.IsNull())
+  {
+    di << "use 'vinit' command before " << argv[0] << "\n";
+    return 1;
+  }
+
+  Handle(V3d_View) aView = ViewerTest::CurrentView();
+
+  if((argc == 2) && (atof(argv[1]) == 0))
+    aView->SetAntialiasingOff();
+  else
+    aView->SetAntialiasingOn();
+  aView->Update();
+  return 0;
+}
+
+//=======================================================================
+//function : VPurgeDisplay
+//purpose  : Switches altialiasing on or off  
+//=======================================================================
+static Standard_Integer VPurgeDisplay (Draw_Interpretor& di,
+                                Standard_Integer argc,
+                                const char ** argv)
+{
+  if (argc > 2)
+  {
+    di << "Usage : " << argv[0] << " [CollectorToo = 0|1]" << "\n";
+    return 1;
+  }
+  Standard_Boolean isCollectorToo = Standard_False;
+  if (argc == 2)
+  {
+      isCollectorToo = (atoi(argv [1]) != 0);
+  }
+  Handle(AIS_InteractiveContext) aContext = ViewerTest::GetAISContext();
+  if (aContext.IsNull())
+  {
+    di << "use 'vinit' command before " << argv[0] << "\n";
+    return 1;
+  }
+  aContext->CloseAllContexts(Standard_False);
+  di << aContext->PurgeDisplay(isCollectorToo) << "\n";
+  return 0;
+}
+
+//=======================================================================
+//function : VSetViewSize
+//purpose  :
+//=======================================================================
+static Standard_Integer VSetViewSize (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 != 2)
+  {
+    di<<"Usage : " << argv[0] << " Size\n";
+    return 1;
+  }
+  Standard_Real aSize = atof(argv[1]);
+  if (aSize <= 0.)
+  {
+    di<<"Bad Size value  : " << aSize << "\n";
+    return 1;
+  }
+
+  Handle(V3d_View) aView = ViewerTest::CurrentView();
+  aView->SetSize(aSize);
+  return 0;
+}
+
+//=======================================================================
+//function : VMoveView
+//purpose  :
+//=======================================================================
+static Standard_Integer VMoveView (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 < 4 || argc > 5)
+  {
+    di<<"Usage : " << argv[0] << " Dx Dy Dz [Start = 1|0]\n";
+    return 1;
+  }
+  Standard_Real Dx = atof(argv[1]);
+  Standard_Real Dy = atof(argv[2]);
+  Standard_Real Dz = atof(argv[3]);
+  Standard_Boolean aStart = Standard_True;
+  if (argc == 5)
+  {
+      aStart = (atoi(argv[4]) > 0);
+  }
+
+  Handle(V3d_View) aView = ViewerTest::CurrentView();
+  aView->Move(Dx,Dy,Dz,aStart);
+  return 0;
+}
+
+//=======================================================================
+//function : VTranslateView
+//purpose  :
+//=======================================================================
+static Standard_Integer VTranslateView (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 < 4 || argc > 5)
+  {
+    di<<"Usage : " << argv[0] << " Dx Dy Dz [Start = 1|0]\n";
+    return 1;
+  }
+  Standard_Real Dx = atof(argv[1]);
+  Standard_Real Dy = atof(argv[2]);
+  Standard_Real Dz = atof(argv[3]);
+  Standard_Boolean aStart = Standard_True;
+  if (argc == 5) 
+  {
+      aStart = (atoi(argv[4]) > 0);
+  }
+
+  Handle(V3d_View) aView = ViewerTest::CurrentView();
+  aView->Translate(Dx,Dy,Dz,aStart);
+  return 0;
+}
+
+//=======================================================================
+//function : VTurnView
+//purpose  :
+//=======================================================================
+static Standard_Integer VTurnView (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 < 4 || argc > 5){
+    di<<"Usage : " << argv[0] << " Ax Ay Az [Start = 1|0]\n";
+    return 1;
+  }
+  Standard_Real Ax = atof(argv[1]);
+  Standard_Real Ay = atof(argv[2]);
+  Standard_Real Az = atof(argv[3]);
+  Standard_Boolean aStart = Standard_True;
+  if (argc == 5) 
+  {
+      aStart = (atoi(argv[4]) > 0);
+  }
+
+  Handle(V3d_View) aView = ViewerTest::CurrentView();
+  aView->Turn(Ax,Ay,Az,aStart);
+  return 0;
+}
+
 //=======================================================================
 //function : ViewerCommands
 //purpose  :
@@ -3230,4 +3754,50 @@ void ViewerTest::ViewerCommands(Draw_Interpretor& theCommands)
   theCommands.Add("diffimage",
     "diffimage     : diffimage imageFile1 imageFile2 toleranceOfColor(0..1) blackWhite(1|0) borderFilter(1|0) [diffImageFile]",
     __FILE__, VDiffImage, group);
+  theCommands.Add ("vselect",
+    "vselect x1 y1 [x2 y2 [x3 y3 ... xn yn]] [shift_selection = 0|1]\n"
+    "- emulates different types of selection:\n"
+    "- 1) single click selection\n"
+    "- 2) selection with rectangle having corners at pixel positions (x1,y1) and (x2,y2)\n"
+    "- 3) selection with polygon having corners in pixel positions (x1,y1), (x2,y2),...,(xn,yn)\n"
+    "- 4) any of these selections with shift button pressed",
+    __FILE__, VSelect, group);
+  theCommands.Add ("vmoveto",
+    "vmoveto x y"
+    "- emulates cursor movement to pixel postion (x,y)",
+    __FILE__, VMoveTo, group);
+  theCommands.Add("vviewparams",
+    "vviewparams [scale center_X center_Y proj_X proj_Y proj_Z up_X up_Y up_Z at_X at_Y at_Z]"
+    "- gets or sets current view characteristics",
+    __FILE__,VViewParams, group);
+  theCommands.Add("vchangeselected",
+    "vchangeselected shape" 
+    "- adds to shape to selection or remove one from it",
+               __FILE__, VChangeSelected, group);
+  theCommands.Add("vzclipping",
+    "vzclipping [mode] [depth width]\n"
+    "- mode = OFF|BACK|FRONT|SLICE depth = [0..1] width = [0..1]\n"
+    "- gets or sets ZClipping mode, width and depth",
+    __FILE__,VZClipping,group);
+  theCommands.Add ("vnbselected",
+    "vnbselected", __FILE__, VNbSelected, group);
+  theCommands.Add("vantialiasing",
+    "vantialiasing 1|0",
+    __FILE__,VAntialiasing,group);
+  theCommands.Add ("vpurgedisplay",
+    "vpurgedisplay [CollectorToo = 0|1]"
+    "- removes structures which don't belong to objects displayed in neutral point",
+    __FILE__, VPurgeDisplay, group);
+  theCommands.Add("vsetviewsize",
+    "vsetviewsize size",
+    __FILE__,VSetViewSize,group);
+  theCommands.Add("vmoveview",
+    "vmoveview Dx Dy Dz [Start = 1|0]",
+    __FILE__,VMoveView,group);
+  theCommands.Add("vtranslateview",
+    "vtranslateview Dx Dy Dz [Start = 1|0)]",
+    __FILE__,VTranslateView,group);
+  theCommands.Add("vturnview",
+    "vturnview Ax Ay Az [Start = 1|0]",
+    __FILE__,VTurnView,group);
 }
index 005092f46dc45af332bfda1cc6920c9d757cae10..63aed4de49e53ffce0b0ee28414cca08e53ad107 100755 (executable)
@@ -25,8 +25,7 @@ if { ${stat} != 1 } {
     puts "Error : Shading is missing in 3D Viewer"
 }
 
-QASelect 220 170
-QASelect 220 170
+vselect 220 170
 
 set square 92.9029
 set only_screen 1
index 49f765c456b709d0031d342ecb3900ea11aded89..ddb3607f672c765b4811a25f53ea873dec247917 100755 (executable)
@@ -24,8 +24,6 @@ vdisplay result
 vfit
 vsetdispmode result 1
 
-QAUpdateLights
-
 set x_coord 116
 set y_coord 252
 
index dcbbebcb76b07ccb10a5fd613179bf8a2fd4ae25..b840b8e330ad21b9d267ac582504007686c4c423 100755 (executable)
@@ -20,7 +20,6 @@ vinit
 vdisplay result
 vsetdispmode 1
 vfit
-QAUpdateLights
 
 checkcolor $x_coord $y_coord 0.77 0.54 0.09
 
index a015c8f19262dcadf4c0be150bf135abe799209d..2d2edccf508791e60e0e45d530a24503dc733193 100755 (executable)
@@ -40,13 +40,11 @@ if { ${status} == 0} {
   vsetdispmode 1
   vdisplay result
 
-  QASetViewCharac ${scale} ${center_X} ${center_Y} \
+  vviewparams ${scale} ${center_X} ${center_Y} \
                  ${proj_X} ${proj_Y} ${proj_Z} \
                  ${up_X} ${up_Y} ${up_Z} \
                  ${at_X} ${at_Y} ${at_Z}
 
-  QAUpdateLights
-  
   checkcolor $x_coord $y_coord 0.98 0.72 0.13
   
   if { ${stat} != 1 } {
index 2552e98f0c37182445499dfed21d3bb372b010e3..b9f4dc0911ed7c4725456e6e777c3e837e36febc 100755 (executable)
@@ -18,7 +18,7 @@ vinit
 vdisplay result
 vsetdispmode result 1
 
-QASetViewCharac 5.1346924 95.358439 -4.910448 0.23495967 -0.302 0.923899 -0.7304302 0.5722587 0.372815 9.550874 -7.55706 -28.83166
+vviewparams 5.1346924 95.358439 -4.910448 0.23495967 -0.302 0.923899 -0.7304302 0.5722587 0.372815 9.550874 -7.55706 -28.83166
 
 isos result 0
 triangles result
index f6e31f60fd18a3f5b0f7ebb96a21e1ded46f2580..82893296a6db8f1a23d75aae4ce59cae1c955396 100755 (executable)
@@ -20,7 +20,7 @@ checkshape gasSolid_
 vinit
 vdisplay wallSolid_
 vdisplay gasSolid_
-QAvzfit
+vzfit
 
 
 explode wallSolid_ w
index 5e7081530fe86630e62dc13933ae5799104c9e9b..f74f2a670a8904659f884e49626b8c0b4e64f8d6 100755 (executable)
@@ -12,7 +12,6 @@ puts "========================="
 vinit
 BUC60547 f
 vfit
-QAUpdateLights
 
 set x_coord 290
 set y_coord 33
index fdecb787dfef47fa0fe94a482c9b598af31eeca3..936491c57a9df463b8df862110581bea5361b98c 100755 (executable)
@@ -17,9 +17,7 @@ puts "=================================="
 vinit 
 BUC60574 
 
-QASelect 220 210 
-QASelect 220 210 
-QAUpdateLights
+vselect 220 210 
 puts ""
 
 set x_coord 205
index d5f3479a6240bbd60ce117badbbac20ff895b5d9..4da6b73ab86974895c8ba4438a14c6978b7744e5 100755 (executable)
@@ -14,8 +14,7 @@ vinit
 vdisplay result
 vfit
 vsetdispmode 1
-QASelect 180 180
-QASelect 180 180
+vselect 180 180
 vsetcolor result CYAN3
 
 set x_coord 120
index a469365c4dec976436178fc33bc6de46aedf4766..c92bed3a5adc45ba82dd8dc748880f191f89f98f 100755 (executable)
@@ -9,8 +9,7 @@ box b 10 30 50
 compound b c
 vinit
 BUC60614 c
-QAMoveTo 200 200
-QAMoveTo 200 200
+vmoveto 200 200
 vfit
 
 set only_screen 1
index a24fa58c63a1adcd30b00857d948563f4a97e973..de769e641dc8a883e7e6117e211a18db2cb52996 100755 (executable)
@@ -14,8 +14,7 @@ puts "================"
 vinit
 BUC60632 0 100
 vfit
-QAMoveTo 313 254
-QAMoveTo 313 254
+vmoveto 313 254
 puts "Highlighting by 'Move To' command in wireframe mode"
 
 set x_coord 315
index f4831a7ad7200a7c029b8e73c06968a9f8ec799a..dddbbae5243bf9dfd35ca7a30b1ea548dbe48dae 100755 (executable)
@@ -14,8 +14,7 @@ puts "================"
 vinit
 BUC60632 1 100
 vfit
-QAMoveTo 313 254
-QAMoveTo 313 254
+vmoveto 313 254
 puts "Highlighting by 'Move To' command in shading mode"
 
 set x_coord 315
index cfb683a24d574e62a6efa29b1594486b9a041dce..03afec74c55c5474f865943b5b0c0cf0c4984738 100755 (executable)
@@ -18,9 +18,7 @@ wire w_1 e_1 e_2 e_3 e_4
 mkplane r w_1
 vdisplay r
 vfit
-QASelect 120 21
-QASelect 120 21
-QAUpdateLights
+vselect 120 21
 
 puts "WARNING : The rectangular MUST be highlighted !"
 puts ""
index 0c2d154952a40ffe661fbf3d541a05731b54bd41..37cc8ef1a46f2da9ce000c7b663a43bf2ed0c9ac 100755 (executable)
@@ -21,7 +21,6 @@ BUC60738
 vfit
 vsetdispmode 1
 
-QAUpdateLights
 
 set x_coord 261
 set y_coord 314
index e79c9d4e93c09a8356d9c9ae8c9431cbb75c8c76..b47ffca91d28483501103808220b46a4f48d27d7 100755 (executable)
@@ -18,7 +18,6 @@ vsettransparency c 0.5
 set x_coord 154
 set y_coord 257
 
-QAUpdateLights
 
 checkcolor $x_coord $y_coord 0.6 0.4 0.07
 
index 730c549040b5dd9a266bcd6ac4992a684f1a134e..41b9067ac31988d482601a1ebf77f5e242de422d 100755 (executable)
@@ -6,7 +6,6 @@ puts ""
 vinit
 BUC60814
 vfit
-QAUpdateLights
 
 set x_coord 131
 set y_coord 352
index 4fb521670ca6f6a7bff043bd0cbbb8a1f684f8f4..d0d737087a33a75a97b0631f35d05a97630aaa87 100755 (executable)
@@ -7,10 +7,7 @@ pcylinder c 100 300
 vinit
 BUC60876 c
 vfit
-QAMoveTo 200 200
-QAMoveTo 200 200
-
-QAUpdateLights
+vmoveto 200 200
 
 set x_coord 200
 set y_coord 200
index 03ddc39b5ffafa3083bef90a4a03af827b364a84..f64bc774adb5182239e550d70ddd0c2a0fe62821 100755 (executable)
@@ -12,7 +12,6 @@ vinit
 BUC60920
 vfit
 
-QAUpdateLights
 
 set x_coord 315
 set y_coord 210
index 93f7f0e0fa196db24479dda9f2a6f30293840b0f..0d2023ff0a1f037372a293553fb5941557bc5e90 100755 (executable)
@@ -22,25 +22,22 @@ set y_coord 260
 meshdispmode m 2
 puts "\nMesh displayed in shading mode"
 
-QAUpdateLights
 checkcolor $x_coord $y_coord 0 0 0.36
 
 meshselmode m 8
 puts "\nSelection of elements is activated"
 
-QAShiftSelect $x_coord $y_coord
-###QAShiftSelect $x_coord $y_coord
+vselect $x_coord $y_coord 1
+###vselect $x_coord $y_coord 1
 
 meshhidesel m
 puts "\nSelected elemement is hidden"
 
-QAUpdateLights
 checkcolor $x_coord $y_coord 0 0 0.36
 
 nodalcolor_id m
 puts "\nDisplay nodal color presentation"
 
-QAUpdateLights
 checkcolor $x_coord $y_coord 0.46 0.12 0.37
 
 set only_screen 1
index 6a50f63413f5eba1fe1b28a089b4766322de2d69..730f237316dae3db3bab238b45a32161281ad7f5 100755 (executable)
@@ -15,15 +15,12 @@ meshfromstl m [locate_data_file OMF6391_box.stl]
 set x_coord 210
 set y_coord 280
 
-QAMoveTo $x_coord $y_coord
-QAMoveTo $x_coord $y_coord
-QAUpdateLights
+vmoveto $x_coord $y_coord
 
 checkcolor $x_coord $y_coord 0 0 0
 
 mesh_edge_width m 20
 puts "\nSet big mesh edge width"
-QAUpdateLights
 
 checkcolor $x_coord $y_coord 1 1 1
 
index 5cb9a65d9a4c8416b924b3e159165d56d76ad42e..1914bbf9ef0d0fe411b1c956d01d92e20c5e09d7 100755 (executable)
@@ -19,8 +19,7 @@ set RED_R1   0
 set GREEN_R1 0
 set BLUE_R1  0
 
-QAMoveTo $x_coord $y_coord
-QAMoveTo $x_coord $y_coord
+vmoveto $x_coord $y_coord
 
 meshdispmode m 3
 puts "\nSet shrinked display mode\n"
index 6ac758cd70d6108da7c90aaaafae7029b98300ec..e675636469beb84278161b1b744c2ab3602b8c77 100755 (executable)
@@ -17,7 +17,6 @@ vinit
 vdisplay result
 vfit
 vsetdispmode result 1
-QAUpdateLights
 
 checkcolor $x_coord $y_coord 0.77 0.54 0.9
 
old mode 100644 (file)
new mode 100755 (executable)
index 1890249..8985c0c
@@ -32,38 +32,31 @@ vdisplay b_1
 vdisplay b_2
 vfit
 
-QAUpdateLights
-
 # Check face color
 checkcolor ${X_01} ${Y_01} 0 1 0 
 checkcolor ${X_02} ${Y_02} 0 1 0
 
 # Select faces
-QAAddOrRemoveSelected b_1
-QAAddOrRemoveSelected b_2
+vchangeselected b_1
+vchangeselected b_2
 
 # Check face color
-QAUpdateLights
 checkcolor ${X_01} ${Y_01} 0.8 0.8 0.8
 
-QAUpdateLights
 checkcolor ${X_02} ${Y_02} 0.8 0.8 0.8
 
 # Hilight face
-QAMoveTo ${X_01} ${Y_01}
-QAMoveTo ${X_01} ${Y_01}
+vmoveto ${X_01} ${Y_01}
 
 # Check face color
-QAUpdateLights
-QASelect 10 10
-QAMoveTo ${X_01} ${Y_01}
+vselect 10 10
+vmoveto ${X_01} ${Y_01}
 checkcolor ${X_01} ${Y_01} 0 1 1
 
-QAUpdateLights
-QAMoveTo ${X_02} ${Y_02}
+vmoveto ${X_02} ${Y_02}
 checkcolor ${X_02} ${Y_02} 0 1 1
 
 # Rotation
-QASetViewCharac ${scale} ${center_X} ${center_Y} ${proj_X} ${proj_Y} ${proj_Z} ${up_X} ${up_Y} ${up_Z} ${at_X} ${at_Y} ${at_Z}
+vviewparams ${scale} ${center_X} ${center_Y} ${proj_X} ${proj_Y} ${proj_Z} ${up_X} ${up_Y} ${up_Z} ${at_X} ${at_Y} ${at_Z}
 
 set only_screen 1
index 97d7561467a7f65464ef4bc092258117ebea4ae6..c13f0d135cc41f879d81f7c36a7e08fd52aafbe3 100755 (executable)
@@ -13,12 +13,10 @@ vinit
 vdisplay b
 vfit
 vscale 1 1 1
-QAUpdateLights
 
 set x1 [list 165 340 70]
 set y1 [list 384 283 79]
 
-QAUpdateLights
 puts ""
 for {set i 0} {$i < 3} {incr i} {
    set x_coord [lindex ${x1} $i]
@@ -29,12 +27,10 @@ for {set i 0} {$i < 3} {incr i} {
 
 vscale 0.5 1.5 0.7
 vfit
-QAUpdateLights
 
 set x2 [list 80 390 25]
 set y2 [list 390 218 167]
 
-QAUpdateLights
 puts ""
 for {set i 0} {$i < 3} {incr i} {
    set x_coord [lindex ${x2} $i]
old mode 100644 (file)
new mode 100755 (executable)
index fdfe97d..4afae8e
@@ -32,7 +32,7 @@ set at_X     -27.258
 set at_Y     30.2321
 set at_Z     -9.0201
 
-QASetViewCharac ${scale} ${center_X} ${center_Y} ${proj_X} ${proj_Y} ${proj_Z} ${up_X} ${up_Y} ${up_Z} ${at_X} ${at_Y} ${at_Z}
+vviewparams ${scale} ${center_X} ${center_Y} ${proj_X} ${proj_Y} ${proj_Z} ${up_X} ${up_Y} ${up_Z} ${at_X} ${at_Y} ${at_Z}
 
 set x_GREEN 300
 set y_GREEN 180
@@ -40,8 +40,6 @@ set y_GREEN 180
 set x_BLUE 180
 set y_BLUE 250
 
-QAUpdateLights
-
 set ColorList1 [QAGetPixelColor ${x_GREEN} ${y_GREEN}]
 regexp {RED +: +([-0-9.+eE]+)} $ColorList1 full RED_1
 regexp {GREEN +: +([-0-9.+eE]+)} $ColorList1 full GREEN_1
@@ -71,4 +69,3 @@ if {${IsGreen} == 1 && ${IsBlue} == 1} {
 }
 
 set only_screen 1
-
old mode 100644 (file)
new mode 100755 (executable)
index c2d2e47..2944929
@@ -11,7 +11,6 @@ vinit
 
 OCC1188 [locate_data_file OCC1188.gif]
 
-QAUpdateLights
 checkcolor $x $y 0.99 0.99 0.99
 if { ${stat} != 1} {
     puts "OCC1188: Error"
index 801c7a716b0c49aaf03271faa6dc6a29b717989d..e058174a674c6a5035078189223f901268198fd3 100755 (executable)
@@ -10,8 +10,7 @@ set y_coord 171
 
 vinit
 OCC128
-QASetViewCharac 4.9487928 89.23589 4.1505 0.7329295 0.59461397 0.33052679 -0.536849 0.2071041 0.81786 71.971878 -17.250309 33.509651
-QAUpdateLights
+vviewparams 4.9487928 89.23589 4.1505 0.7329295 0.59461397 0.33052679 -0.536849 0.2071041 0.81786 71.971878 -17.250309 33.509651
 
 checkcolor $x_coord $y_coord 0.43 0.48 0.54
 
index 9075400a8c554b68c6ce6e811ae542cbd5f1bc48..49d8dabfc25163e1eec51317837ae695c94585f0 100755 (executable)
@@ -33,10 +33,7 @@ OCC137 1
 set x_coord 105
 set y_coord 100
 
-QAMoveTo $x_coord $y_coord
-QAMoveTo $x_coord $y_coord
-
-QAUpdateLights
+vmoveto $x_coord $y_coord
 
 checkcolor $x_coord $y_coord 0 1 1
 
old mode 100644 (file)
new mode 100755 (executable)
index a7aeff6..2318e9c
@@ -25,10 +25,9 @@ vdisplay a
 vfit
 vsetdispmode 1
 
-QASetChoiceMode FACE ON
+vselmode FACE ON
 set x 170
 set y 80
-QASelect $x $y
-QASelect $x $y
+vselect $x $y
 
 set only_screen 1
old mode 100644 (file)
new mode 100755 (executable)
index 909962e..d03de52
@@ -25,10 +25,9 @@ vdisplay a
 vfit
 vsetdispmode 1
 
-QASetChoiceMode FACE ON
+vselmode FACE ON
 set x 170
 set y 80
-QASelect $x $y
-QASelect $x $y
+vselect $x $y
 
 set only_screen 1
index 0e9c488e752e702a2e154b1217b373509728c556..dc9ef02f3a49b2f093bfca087d64a985333b8e85 100755 (executable)
@@ -37,10 +37,7 @@ OCC137 1
 set x_coord 105
 set y_coord 100
 
-QAMoveTo $x_coord $y_coord
-QAMoveTo $x_coord $y_coord
-
-QAUpdateLights
+vmoveto $x_coord $y_coord
 
 checkcolor $x_coord $y_coord 0 1 1
 
index 2f565a8a1e341d610cb3b50eec0bfedc20eea109..bb2527512572ecda4fbc79485da1e7d79ef37bac 100755 (executable)
@@ -37,9 +37,7 @@ vselmode 4 1
 set x_coord 105
 set y_coord 100
 
-QAMoveTo $x_coord $y_coord
-QAMoveTo $x_coord $y_coord
-QAUpdateLights
+vmoveto $x_coord $y_coord
 
 checkcolor $x_coord $y_coord 0 1 1
 
index 48fe476ce7ef4e7b5ddf735029b8d0e15b343e75..07d93597256521ae8ad78834e97d6b98533df4c8 100755 (executable)
@@ -38,9 +38,7 @@ OCC137_z
 set x_coord 105
 set y_coord 350
 
-QAMoveTo $x_coord $y_coord
-QAMoveTo $x_coord $y_coord
-QAUpdateLights
+vmoveto $x_coord $y_coord
 
 set x_coord 105
 set y_coord 340
@@ -49,7 +47,7 @@ checkcolor $x_coord $y_coord 0 1 1
 
 set x_coord 105
 set y_coord 340
-QASetViewCharac 60.6309 7.07107 4.08248 0.592163 -0.60038 -0.537482 0.369921 -0.390032 0.843228 -3.28175 3.38875 3.0464
+vviewparams 60.6309 7.07107 4.08248 0.592163 -0.60038 -0.537482 0.369921 -0.390032 0.843228 -3.28175 3.38875 3.0464
 
 checkcolor $x_coord $y_coord 0.78 0.54 0.09
        
index 74139b32a9879c65d310598a50ab6bbaa3051d9e..ac953126bf1825120f84105b46a885bd13e836d4 100755 (executable)
@@ -38,16 +38,14 @@ vselmode 4 1
 set x_coord 105
 set y_coord 350
 
-QAMoveTo $x_coord $y_coord
-QAMoveTo $x_coord $y_coord
-QAUpdateLights
+vmoveto $x_coord $y_coord
 
 set x_coord 105
 set y_coord 340
 
 checkcolor $x_coord $y_coord 0 1 1
 
-QASetViewCharac 60.6309 7.07107 4.08248 0.592163 -0.60038 -0.537482 0.369921 -0.390032 0.843228 -3.28175 3.38875 3.0464
+vviewparams 60.6309 7.07107 4.08248 0.592163 -0.60038 -0.537482 0.369921 -0.390032 0.843228 -3.28175 3.38875 3.0464
 set x_coord 105
 set y_coord 340
 
old mode 100644 (file)
new mode 100755 (executable)
index 4064e99..68cc5f3
@@ -22,10 +22,9 @@ vdisplay a
 vfit
 vsetdispmode 1
 
-QASetChoiceMode FACE ON
+vselmode FACE ON
 set x 170
 set y 80
-QASelect $x $y
-QASelect $x $y
+vselect $x $y
 
 set only_screen 1
index dcc9f0e6fdb013064fdf876d57629e5355459fef..6dcfd86af752e33c47137f85ec643f38b5a676e4 100755 (executable)
@@ -20,8 +20,6 @@ vsetdispmode result 1
 set x_coord 175
 set y_coord 195
 
-QAUpdateLights
-
 checkcolor $x_coord $y_coord 1 0.75 0.15
 
 if { $stat != 1 } {
@@ -31,8 +29,6 @@ if { $stat != 1 } {
 ########################################################
 vsetmaterial result COPPER
 
-QAUpdateLights
-
 checkcolor $x_coord $y_coord 0.77 0.32 0.23
 
 if { $stat != 1 } {
index fcc6bbb0bcf0c981b717e2615f7a1969579a2a6c..2c6a7469426368a5b8d9098a5a3b98c752b6a02a 100755 (executable)
@@ -24,7 +24,6 @@ regexp {BLUE +: +([-0-9.+eE]+)} $color1 full bl1
 
 vsetmaterial result ALUMINIUM
 
-QAUpdateLights
 set color2 [QAGetPixelColor 175 195]
 regexp {RED +: +([-0-9.+eE]+)} $color2 full rd2
 regexp {GREEN +: +([-0-9.+eE]+)} $color2 full gr2
index f99919b26adf083f6d429dfbb5dc0692fd91cc22..bca8b0e07c58866b683d220aeac48c023898ae63 100755 (executable)
@@ -26,7 +26,6 @@ regexp {BLUE +: +([-0-9.+eE]+)} $color1 full bl1
 ########################################################
 vsettransparency result 0.5
 
-QAUpdateLights
 set color2 [QAGetPixelColor 175 195]
 regexp {RED +: +([-0-9.+eE]+)} $color2 full rd2
 regexp {GREEN +: +([-0-9.+eE]+)} $color2 full gr2
index 1d72e5ca701208c1a0c239cfef8c5262879b8d4d..c75e15277fa7faadf2214f54008287586ef3adf8 100755 (executable)
@@ -17,7 +17,6 @@ set x_coord 235
 set y_coord 214
 
 vsetdispmode result 1
-QAUpdateLights
 
 checkcolor $x_coord $y_coord 0.78 0.55 0.9
 
@@ -27,8 +26,6 @@ if { $stat != 1 } {
 
 vsetdispmode result 0
 
-QAUpdateLights
-
 checkcolor $x_coord $y_coord 0 1 0
 
 if { $stat != 1 } {
old mode 100644 (file)
new mode 100755 (executable)
index a793133..1c7ddc1
@@ -14,7 +14,7 @@ vfit
 verase b
 set CollectorToo 1
 
-if [catch {QAPurgeDisplay $CollectorToo} result] {
+if [catch {vpurgedisplay $CollectorToo} result] {
     puts "Faulty OCC2066"
 } else {
     puts "OK OCC2066"
index 04bec5bb56420f82b94ae2bc639a645533d9ba2a..6429417877654236db837cdef45703390c8fa029 100755 (executable)
@@ -23,7 +23,7 @@ set at_X     -5.88607025146484
 set at_Y     28.6973209381104
 set at_Z     -12.5332689285278
 
-QASetViewCharac ${scale} ${center_X} ${center_Y} ${proj_X} ${proj_Y} ${proj_Z} ${up_X} ${up_Y} ${up_Z} ${at_X} ${at_Y} ${at_Z}
+vviewparams ${scale} ${center_X} ${center_Y} ${proj_X} ${proj_Y} ${proj_Z} ${up_X} ${up_Y} ${up_Z} ${at_X} ${at_Y} ${at_Z}
 
 set x_coord 229
 set y_coord 94
index fd56661c970fdb8bcb1dd9e7a24f685b16ade24e..0f24ecbe3c0901239ad43fd97490c71985ed1363 100755 (executable)
@@ -25,15 +25,13 @@ set at_Z     -0.0881031528115273
 set x_coord 388
 set y_coord 28
 
-QASetViewCharac ${scale} ${center_X} ${center_Y} ${proj_X} ${proj_Y} ${proj_Z} ${up_X} ${up_Y} ${up_Z} ${at_X} ${at_Y} ${at_Z}
+vviewparams ${scale} ${center_X} ${center_Y} ${proj_X} ${proj_Y} ${proj_Z} ${up_X} ${up_Y} ${up_Z} ${at_X} ${at_Y} ${at_Z}
 
 OCC218 trihedron1 b_1 X Y
-QAUpdateLights
 
 checkcolor $x_coord $y_coord 0 0 0
 
 OCC218 trihedron1 b_1 my___axis___1 my___axis2
-QAUpdateLights
 
 checkcolor $x_coord $y_coord 0.85 0.85 0
 
old mode 100644 (file)
new mode 100755 (executable)
index c81c623..643113f
@@ -28,7 +28,6 @@ vsetcolor face GREEN1
 vsetdispmode  cylinder 1
 vsetcolor cylinder RED1
 
-QAUpdateLights
 set ColorList [QAGetPixelColor $Start_X $Start_Y]
 regexp {RED +: +([-0-9.+eE]+)} $ColorList full R_START_POINT
 regexp {GREEN +: +([-0-9.+eE]+)} $ColorList full G_START_POINT
@@ -38,7 +37,6 @@ puts "R_START_POINT=$R_START_POINT ;   G_START_POINT=$G_START_POINT ;   B_START_
 
 set IsGood 1
 for {set count 0} {${count} <= 11} {incr count 1} {
-    QAUpdateLights
     checkcolor $Start_X $Start_Y $R_START_POINT $G_START_POINT $B_START_POINT
     if {$stat != 1} {
         set IsGood 0
index 405a041105e7ab0f2ffd1d34739c66aae764f36e..8bb8dee2705a2559afe4e7c3583a4c3873f2f844 100755 (executable)
@@ -47,8 +47,7 @@ catch {QAGetPixelColor $x6 $y6 $Yellow_R $Yellow_G $Yellow_B} result16
 
 # Move a mouse
 puts "Move a mouse"
-QAMoveTo $x2 $y2
-QAMoveTo $x2 $y2
+vmoveto $x2 $y2
 
 # Second box of first CompSolid is selected
 puts "Second box of first CompSolid is selected"
@@ -62,7 +61,6 @@ if { [array get env os_type] != "" } {
     set os $env(os_type)
 }
 if { [string compare $os "windows"] != 0 } {
-   QAUpdateLights
    catch {QAGetPixelColor $x2 $y2 $Cyan_R $Cyan_G $Cyan_B} result31
 }
 
diff --git a/tests/bugs/vis/bug23539_1 b/tests/bugs/vis/bug23539_1
new file mode 100644 (file)
index 0000000..fb04b5f
--- /dev/null
@@ -0,0 +1,28 @@
+puts "============"
+puts "CR23539"
+puts "============"
+puts ""
+######################################################
+# Test case for polygonal selection
+######################################################
+
+box b 10 10 10
+vinit
+vdisplay b
+vfit
+vselmode 2 1
+vselect 1 1 1 407 407 407 407 1
+
+set NbSelected1 [vnbselected]
+if { ${NbSelected1} != 12 } {
+   puts "Error : Bad number of selected edges after polygonal selection of all edges"
+}
+
+vselect 10 10 10 20 20 20 20 10
+
+set NbSelected2 [vnbselected]
+if { ${NbSelected2} != 0 } {
+   puts "Error : Bad number of selected edges after polyginal selection of empty space"
+}
+
+set only_screen 1
\ No newline at end of file
diff --git a/tests/bugs/vis/bug23539_2 b/tests/bugs/vis/bug23539_2
new file mode 100644 (file)
index 0000000..c4769d0
--- /dev/null
@@ -0,0 +1,31 @@
+puts "============"
+puts "CR23539"
+puts "============"
+puts ""
+#############################
+## Test case for polygonal shift selection
+#############################
+
+box a 10 10 10
+box b 50 50 50 10 10 10
+vinit
+vdisplay a b
+vfit
+vselmode 2 1
+vselect 0 0
+vselect 60 300
+vselect 300 200 300 60 400 60 407 150 1
+
+set NbSelected1 [vnbselected]
+if { ${NbSelected1} != 13 } {
+  puts "Error : Polygonal shift selection doesn't work properly"
+}
+
+vselect 350 120 1
+
+set NbSelected1 [vnbselected]
+if { ${NbSelected1} != 12 } {
+  puts "Error : (case 2)"
+}
+
+set only_screen 1
\ No newline at end of file
index 7c638215ca8ce6c3540c06039e7202fb7860a4a1..fd172cd8452a6af591527c01d610b5688bc3b01c 100755 (executable)
@@ -24,7 +24,7 @@ set at_X     0
 set at_Y     0
 set at_Z     0
 
-QASetViewCharac ${scale} ${center_X} ${center_Y} ${proj_X} ${proj_Y} ${proj_Z} ${up_X} ${up_Y} ${up_Z} ${at_X} ${at_Y} ${at_Z}
+vviewparams ${scale} ${center_X} ${center_Y} ${proj_X} ${proj_Y} ${proj_Z} ${up_X} ${up_Y} ${up_Z} ${at_X} ${at_Y} ${at_Z}
 
 set x_coord 36
 set y_coord 201
@@ -32,5 +32,3 @@ set y_coord 201
 checkcolor $x_coord $y_coord 0.6 0.6 0.6
 
 set only_screen 1
-
-
old mode 100644 (file)
new mode 100755 (executable)
index 6f86447..095fc2b
@@ -12,16 +12,14 @@ vsetdispmode 1
 set x1 172
 set y1 223
 
-QAUpdateLights
 checkcolor ${x1} ${y1} 1 0 0
 
-QASetZClippingMode FRONT
-set ZClippingMode [lindex [QAGetZClippingMode] 2]
+vzclipping FRONT
+set ZClippingMode [lindex [vzclipping] 2]
 if {${ZClippingMode} != "FRONT"} {
     puts "OCC270: Error (ZClippingMode != FRONT)"
 }
 
-QAUpdateLights
 checkcolor ${x1} ${y1} 1 0 0
 vfit
 
old mode 100644 (file)
new mode 100755 (executable)
index 1fbe124..b09acdd
@@ -12,16 +12,14 @@ vsetdispmode 0
 set x1 172
 set y1 223
 
-QAUpdateLights
 checkcolor ${x1} ${y1} 1 0 0
 
-QASetZClippingMode FRONT
-set ZClippingMode [lindex [QAGetZClippingMode] 2]
+vzclipping FRONT
+set ZClippingMode [lindex [vzclipping] 2]
 if {${ZClippingMode} != "FRONT"} {
     puts "OCC270: Error (ZClippingMode != FRONT)"
 }
 
-QAUpdateLights
 checkcolor ${x1} ${y1} 1 0 0
 vfit
 
index e516ded0ee8baa0fd00bc9a4518b10079220a975..dd56ccd695f4c52f28cde1d0a3f89ae62ec3fcf2 100755 (executable)
@@ -21,10 +21,7 @@ checkcolor $x_coord $y_coord 1 1 0
 
 # Move a mouse
 puts "Move a mouse"
-QAMoveTo $x_coord $y_coord
-QAMoveTo $x_coord $y_coord
-
-QAUpdateLights
+vmoveto $x_coord $y_coord
 
 # There is a selection
 puts "There is a selection"
index 390a18461403ce957de6de8a1d983387e11a3de4..d7f8977d881027eef6c53d8132af24809a54f351 100755 (executable)
@@ -14,14 +14,12 @@ set x_coord 10
 set y_coord 240
 
 puts "Before View->FitAll()"
-QAUpdateLights
 
 checkcolor $x_coord $y_coord 0 0 0
 
 vfit
 
 puts "After View->FitAll()"
-QAUpdateLights
 
 checkcolor $x_coord $y_coord 0.78 0.55 0.9
 
old mode 100644 (file)
new mode 100755 (executable)
index fc680ed..85fd2f0
@@ -21,7 +21,7 @@ set at_X     0
 set at_Y     0
 set at_Z     0
 
-QASetViewCharac ${scale} ${center_X} ${center_Y} ${proj_X} ${proj_Y} ${proj_Z} ${up_X} ${up_Y} ${up_Z} ${at_X} ${at_Y} ${at_Z}
+vviewparams ${scale} ${center_X} ${center_Y} ${proj_X} ${proj_Y} ${proj_Z} ${up_X} ${up_Y} ${up_Z} ${at_X} ${at_Y} ${at_Z}
 
 OCC281 ${x} ${y} ${TypeOfMarker}
 OCC281 ${x} ${y} ${TypeOfMarker}
index 0d2aefda4e93a84d3c0cea79512862a2f3d754bb..6ec9b5ef9b1fa70d7a9563db5027f1cb1765c3b6 100755 (executable)
@@ -37,7 +37,7 @@ set at_X     8.22575855255127
 set at_Y     -2.95449280738831
 set at_Z     3.08669567108154
 
-QASetViewCharac ${scale} ${center_X} ${center_Y} ${proj_X} ${proj_Y} ${proj_Z} ${up_X} ${up_Y} ${up_Z} ${at_X} ${at_Y} ${at_Z}
+vviewparams ${scale} ${center_X} ${center_Y} ${proj_X} ${proj_Y} ${proj_Z} ${up_X} ${up_Y} ${up_Z} ${at_X} ${at_Y} ${at_Z}
 
 set info [trinfo result]
 regexp { +([-0-9.+eE]+) +triangles} $info full tri
old mode 100644 (file)
new mode 100755 (executable)
index bd2f4f3..76abf42
@@ -86,7 +86,6 @@ set y12 284
 #
 #
 
-QAUpdateLights
 checkcolor ${x1} ${y1} 1 1 0
 checkcolor ${x2} ${y2} 1 1 0
 checkcolor ${x3} ${y3} 1 1 0
old mode 100644 (file)
new mode 100755 (executable)
index bb9b8f1..fff62e2
@@ -6,5 +6,4 @@ puts "========"
 smallview
 box b 10 10 10
 sphere s -30 -30 -30 20
-QAwzoom 1 -86 -72 -13 10
-
+wzoom 1 -86 -72 -13 10
index 0461af94138cd5790929ccdb120b877fc71c6909..388478382b6c947198431fb607d6978633007605 100755 (executable)
@@ -15,8 +15,6 @@ vfit
 set x_coord 31
 set y_coord 304
 
-QAUpdateLights
-
 checkcolor $x_coord $y_coord 0 0 0
 
 set only_screen 1
old mode 100644 (file)
new mode 100755 (executable)
index a5f2ecd..f865077
@@ -29,7 +29,7 @@ set at_X     241.985
 set at_Y     329.911
 set at_Z     390.356
 
-QASetViewCharac ${scale} ${center_X} ${center_Y} ${proj_X} ${proj_Y} ${proj_Z} ${up_X} ${up_Y} ${up_Z} ${at_X} ${at_Y} ${at_Z}
+vviewparams ${scale} ${center_X} ${center_Y} ${proj_X} ${proj_Y} ${proj_Z} ${up_X} ${up_Y} ${up_Z} ${at_X} ${at_Y} ${at_Z}
 
 set x1 300
 set y1 70
@@ -40,11 +40,8 @@ set y2 110
 set x3 220
 set y3 110
 
-QAMoveTo ${x1} ${y1}
-QAMoveTo ${x1} ${y1}
+vmoveto ${x1} ${y1}
 
-QAUpdateLights
 checkcolor $x3 $y3 0.04 0.04 0.5
 
 set only_screen 1
-
index c2ff9346349b501b26af1bcd1ac612037dd65122..0e1792045f72ecf678a9adfd2c81353b4987b088 100755 (executable)
@@ -11,7 +11,6 @@ vfit
 vsetdispmode result 1
 vsettransparency result .5
 
-QAUpdateLights
 
 set x_coord 250
 set y_coord 115
index cce24f1aaac218c320f2f8595e07e26f86b5d1a5..8f807f4a87faf9e422b950625dfb3dc302d2b3b3 100755 (executable)
@@ -22,9 +22,7 @@ checkshape result
 
 BUC60569 result
 vfit
-QAMoveTo 250 190
-QASelect 250 190
-QAUpdateLights
+vselect 250 190
 
 set x_coord 335
 set y_coord 331
@@ -35,8 +33,7 @@ if {$stat != 1} {
    puts "Error : The right face is NOT Selected by Select command."
 }
 
-QAShiftSelect 180 350
-QAUpdateLights
+vselect 180 350 1
 
 set x_coord 101
 set y_coord 347
index 361e55bca6814c0b2c12fdcba9e05da8ec28f38e..377e28e79ff47f7b33492f13f5e0f41fd6fad848 100755 (executable)
@@ -23,11 +23,9 @@ checkshape result
 
 BUC60569 result
 vfit
-QAMoveTo 250 190
-QASelect 250 190
-QAShiftSelect 180 350
-QAMoveTo 250 190
-QAUpdateLights
+vselect 250 190
+vselect 180 350 1
+vmoveto 250 190
 
 set x_coord 335
 set y_coord 331
index aa3430f5e980bf241f9b539d248823a4b69446c5..2148c26f043db4decb334f6eea6bc7578ed825e9 100755 (executable)
@@ -26,12 +26,10 @@ checkshape result
 BUC60569 result
 vfit
 
-QAMoveTo 250 190
-QASelect 250 190
-QAShiftSelect 180 350
-QAMoveTo 250 190
-QAMoveTo 180 350
-QAUpdateLights
+vselect 250 190
+vselect 180 350 1
+vmoveto 250 190
+vmoveto 180 350
 
 set x_coord 101
 set y_coord 347
index 7befdc918fc5886479c1ad9f3ff1d9432a1a3251..64a59bb2bc17c0e5b08b52579eb4763b5bd974a9 100755 (executable)
@@ -25,14 +25,12 @@ checkshape result
 
 BUC60569 result
 vfit
-QAMoveTo 250 190
-
-QASelect 250 190
-QAShiftSelect 180 350
-QAMoveTo 250 190
-QAMoveTo 180 350
-QASelect 390 390
-QAUpdateLights
+
+vselect 250 190
+vselect 180 350 1
+vmoveto 250 190
+vmoveto 180 350
+vselect 390 390
 
 set x_coord 335
 set y_coord 331
index 70f8ce6969dcbea7684cfbdc5c6bf97906c90275..db2ebaf050fa0241b757a6f5f802346dcb085c22 100755 (executable)
@@ -25,14 +25,13 @@ checkshape result
 
 BUC60569 result
 vfit
-QAMoveTo 250 190
-QASelect 250 190
-QAShiftSelect 180 350
-QAMoveTo 250 190
-QAMoveTo 180 350
-QASelect 390 390
-QAShiftSelect 250 190
-QAUpdateLights
+
+vselect 250 190
+vselect 180 350 1
+vmoveto 250 190
+vmoveto 180 350
+vselect 390 390
+vselect 250 190 1
 
 set x_coord 335
 set y_coord 331
@@ -43,8 +42,7 @@ if {$stat != 1} {
    puts "Error : The right face is NOT Selected by Shift Select command"
 }
 
-QAShiftSelect 180 350
-QAUpdateLights
+vselect 180 350 1
 
 set x_coord 101
 set y_coord 347
index e8d632e16926b8d127e8997c569a0f3f72b3aeee..895451a887f62a9274074fe2bdce714ef7e03e30 100755 (executable)
@@ -26,16 +26,14 @@ checkshape result
 BUC60569 result
 vfit
 
-QAMoveTo 250 190
-QASelect 250 190
-QAShiftSelect 180 350
-QAMoveTo 250 190
-QAMoveTo 180 350
-QASelect 390 390
-QAShiftSelect 250 190
-QAShiftSelect 180 350
-QAMoveTo 250 190
-QAUpdateLights
+vselect 250 190
+vselect 180 350 1
+vmoveto 250 190
+vmoveto 180 350
+vselect 390 390
+vselect 250 190 1
+vselect 180 350 1
+vmoveto 250 190
 
 set x_coord 335
 set y_coord 331
index 88a331ae9497938565dcc18608d52389d989604b..38cf6a60fbe5401317af8ce283f958781c292bb1 100755 (executable)
@@ -27,16 +27,15 @@ checkshape result
 BUC60569 result
 vfit
 
-QAMoveTo 250 190
-QASelect 250 190
-QAShiftSelect 180 350
-QAMoveTo 250 190
-QAMoveTo 180 350
-QASelect 390 390
-QAShiftSelect 250 190
-QAShiftSelect 180 350
-QAMoveTo 250 190
-QAMoveTo 180 350
+vselect 250 190
+vselect 180 350 1
+vmoveto 250 190
+vmoveto 180 350
+vselect 390 390
+vselect 250 190 1
+vselect 180 350 1
+vmoveto 250 190
+vmoveto 180 350
 
 set x_coord 335
 set y_coord 331
old mode 100644 (file)
new mode 100755 (executable)
index ec25189..bf3cffd
@@ -12,7 +12,6 @@ vfit
 set x_coord 83
 set y_coord 337
 
-QAUpdateLights
 checkcolor $x_coord $y_coord 1 1 0
 
 set xmin 1
@@ -28,7 +27,6 @@ set Selection_R 0.8
 set Selection_G 0.8
 set Selection_B 0.8
 
-QAUpdateLights
 checkcolor $x_coord $y_coord 0.8 0.8 0.8
 
 set only_screen 1
old mode 100644 (file)
new mode 100755 (executable)
index 64bea8e..e669ccb
@@ -10,7 +10,6 @@ vtrihedron trihedron
 set x_coord 205
 set y_coord 205
 
-QAUpdateLights
 checkcolor $x_coord $y_coord 0.43 0.48 0.54
 
 set xmin 1
@@ -22,7 +21,6 @@ set ymax 205
 OCC60 ${xmin} ${ymin} ${xmax} ${ymax}
 OCC60 ${xmin} ${ymin} ${xmax} ${ymax}
 
-QAUpdateLights
 checkcolor $x_coord $y_coord 0.8 0.8 0.8
 
 set only_screen 1
index c60a6112e8451c7d9f22ec7446556899122742aa..7757a12fa8e796b4d7be5c9e1be8a8b9d8b2694d 100755 (executable)
@@ -29,7 +29,6 @@ vinit
 vsetdispmode 1
 vdisplay r
 vfit
-QAUpdateLights
 
 set x_coord 270
 set y_coord 230
@@ -37,7 +36,6 @@ set y_coord 230
 checkcolor $x_coord $y_coord 0.78 0.55 0.09
 
 vsettransparency r 0.5
-QAUpdateLights
 
 checkcolor $x_coord $y_coord 0.8 0.56 0.1
 
index 88d62fff365f8d188cbde18451ddfb7d835b03af..af499fd043098311d97e3349c8f59dd427e1a131 100755 (executable)
@@ -11,8 +11,7 @@ vinit
 vtrihedron tri
 vtri_orig tri
 
-QAMoveTo 205 205
-QAUpdateLights
+vmoveto 205 205
 
 checkcolor $x_coord $y_coord 0 1 1
 
index b573011a71c19ba442b0bb6199e13b661930c03d..8e0a7e043be00834400b989f2dd92f6794be688d 100755 (executable)
@@ -14,9 +14,9 @@ meshfromstl result [locate_data_file OCC6652.stl]
 meshdispmode result 3
 meshselmode result 8
 
-QASelectRectangle 5 5 400 400
+vselect 5 5 400 400
 
-if {[QANbSelected] != 26966} {
+if {[vnbselected] != 26966} {
    puts "Faulty ${BugNumber}"
 }
 
old mode 100644 (file)
new mode 100755 (executable)
index 8fdebc1..6670015
@@ -33,8 +33,7 @@ checkcolor ${Shape_X} ${Shape_Y} 0.78 0.54 0.09
 checkcolor ${Triedron_X} ${Triedron_Y} 1 1 1
 
 # Select box
-QASelect ${Shape_X} ${Shape_Y}
-QASelect ${Shape_X} ${Shape_Y}
+vselect ${Shape_X} ${Shape_Y}
 
 # Check box color
 checkcolor ${Shape_X} ${Shape_Y} 0.78 0.54 0.09
@@ -43,8 +42,7 @@ checkcolor ${Shape_X} ${Shape_Y} 0.78 0.54 0.09
 checkcolor ${Triedron_X} ${Triedron_Y} 1 1 1
 
 # Select empty view
-QASelect 1 1
-QASelect 1 1
+vselect 1 1
 
 # Check box color
 checkcolor ${Shape_X} ${Shape_Y} 0.78 0.54 0.09
index bf51b3d83b26f8ebefe8d94c333522047f8bc9ed..65cf2b11a2683ae1b7006c8b1c2a9dc0b5f7cd43 100755 (executable)
@@ -15,20 +15,19 @@ box b 10 10 10
 vinit
 vdisplay b
 vfit
-QAUpdateLights
 vselmode 2 1
 
-QASelectRectangle 1 1 407 407
+vselect 1 1 407 407
 
-set NbSelected1 [QANbSelected]
+set NbSelected1 [vnbselected]
 if { ${NbSelected1} != 12 } {
    puts "Bad number of selected edges after rectangle selection all edges"
    set mistake 1
 }
 
-QASelectRectangle 10 10 20 20
+vselect 10 10 20 20
 
-set NbSelected2 [QANbSelected]
+set NbSelected2 [vnbselected]
 if { ${NbSelected2} != 0 } {
    puts "Error : Bad number of selected edges after rectangle selection an empty space"
    set mistake 1
@@ -39,7 +38,6 @@ set x [list 125 204 283 29 111 298 379 125 204 283 125 283]
 set y [list 47  100 47 200 150 150 200 250 300 250 361 361]
 
 
-QAUpdateLights
 puts ""
 for {set i 0} {$i < 12} {incr i} {
    set x_coord [lindex ${x} $i]
index 6d9b1b697e3f6a0a6935731e69b336637ea88172..0faff0222cd7324312c82ccea80c4427e8aff168 100755 (executable)
@@ -19,18 +19,18 @@ set y1 300
 set x2 350
 set y2 120
 
-QASelect 0 0
-QASelect ${x1} ${y1}
-QAShiftSelect ${x2} ${y2}
+vselect 0 0
+vselect ${x1} ${y1}
+vselect ${x2} ${y2} 1
 
-set NbSelected1 [QANbSelected]
+set NbSelected1 [vnbselected]
 if { ${NbSelected1} != 2 } {
   puts "Error : (case 1)"
 }
 
-QAShiftSelect ${x2} ${y2}
+vselect ${x2} ${y2} 1
 
-set NbSelected1 [QANbSelected]
+set NbSelected1 [vnbselected]
 if { ${NbSelected1} != 1 } {
   puts "Error : (case 2)"
 }
old mode 100644 (file)
new mode 100755 (executable)
index 2513852..b1582ae
@@ -37,8 +37,6 @@ box b 10 10 10
 vdisplay b
 vfit
 
-QAUpdateLights
-
 ### FIRST PART
 
 # Check Shape color
@@ -65,8 +63,7 @@ checkcolor ${Solid_X} ${Solid_Y} 1 1 0
 ### SECOND PART
 
 # Check Shape color
-QAMoveTo 1 1
-QAMoveTo 1 1
+vmoveto 1 1
 set SetSelectMode 0
 OCC74_set b ${SetSelectMode}
 set GetSelectMode [OCC74_get b]
@@ -74,15 +71,12 @@ if { ${GetSelectMode} != ${SetSelectMode} } {
    puts "Select Mode = ${GetSelectMode}"
    puts "OCC74: Get Select Mode Error "
 }
-QAMoveTo ${Shape_X} ${Shape_Y}
-QAMoveTo ${Shape_X} ${Shape_Y}
+vmoveto ${Shape_X} ${Shape_Y}
 
-QAUpdateLights
 checkcolor ${Shape_X} ${Shape_Y} 0 1 1
 
 # Check Vertex color
-QAMoveTo 1 1
-QAMoveTo 1 1
+vmoveto 1 1
 set SetSelectMode 1
 OCC74_set b ${SetSelectMode}
 set GetSelectMode [OCC74_get b]
@@ -90,15 +84,12 @@ if { ${GetSelectMode} != ${SetSelectMode} } then {
    puts "Select Mode = ${GetSelectMode}"
    puts "OCC74: Get Select Mode Error "
 }
-QAMoveTo ${Vertex_X} ${Vertex_Y}
-QAMoveTo ${Vertex_X} ${Vertex_Y}
+vmoveto ${Vertex_X} ${Vertex_Y}
 
-QAUpdateLights
 checkcolor ${Vertex_X} ${Vertex_Y} 0 1 1
 
 # Check Edge color
-QAMoveTo 1 1
-QAMoveTo 1 1
+vmoveto 1 1
 set SetSelectMode 2
 OCC74_set b ${SetSelectMode}
 set GetSelectMode [OCC74_get b]
@@ -106,15 +97,12 @@ if { ${GetSelectMode} != ${SetSelectMode} } then {
    puts "Select Mode = ${GetSelectMode}"
    puts "OCC74: Get Select Mode Error "
 }
-QAMoveTo ${Edge_X} ${Edge_Y}
-QAMoveTo ${Edge_X} ${Edge_Y}
+vmoveto ${Edge_X} ${Edge_Y}
 
-QAUpdateLights
 checkcolor ${Edge_X} ${Edge_Y} 0 1 1
 
 # Check Wire color
-QAMoveTo 1 1
-QAMoveTo 1 1
+vmoveto 1 1
 set SetSelectMode 3
 OCC74_set b ${SetSelectMode}
 set GetSelectMode [OCC74_get b]
@@ -122,15 +110,12 @@ if { ${GetSelectMode} != ${SetSelectMode} } then {
    puts "Select Mode = ${GetSelectMode}"
    puts "OCC74: Get Select Mode Error "
 }
-QAMoveTo ${Wire_X} ${Wire_Y}
-QAMoveTo ${Wire_X} ${Wire_Y}
+vmoveto ${Wire_X} ${Wire_Y}
 
-QAUpdateLights
 checkcolor ${Wire_X} ${Wire_Y} 0 1 1
 
 # Check Face color
-QAMoveTo 1 1
-QAMoveTo 1 1
+vmoveto 1 1
 set SetSelectMode 4
 OCC74_set b ${SetSelectMode}
 set GetSelectMode [OCC74_get b]
@@ -138,15 +123,12 @@ if { ${GetSelectMode} != ${SetSelectMode} } then {
    puts "Select Mode = ${GetSelectMode}"
    puts "OCC74: Get Select Mode Error "
 }
-QAMoveTo ${Face_X} ${Face_Y}
-QAMoveTo ${Face_X} ${Face_Y}
+vmoveto ${Face_X} ${Face_Y}
 
-QAUpdateLights
 checkcolor ${Face_X} ${Face_Y} 0 1 1
 
 # Check Shell color
-QAMoveTo 1 1
-QAMoveTo 1 1
+vmoveto 1 1
 set SetSelectMode 5
 OCC74_set b ${SetSelectMode}
 set GetSelectMode [OCC74_get b]
@@ -154,15 +136,12 @@ if { ${GetSelectMode} != ${SetSelectMode} } then {
    puts "Select Mode = ${GetSelectMode}"
    puts "OCC74: Get Select Mode Error "
 }
-QAMoveTo ${Shell_X} ${Shell_Y}
-QAMoveTo ${Shell_X} ${Shell_Y}
+vmoveto ${Shell_X} ${Shell_Y}
 
-QAUpdateLights
 checkcolor ${Shell_X} ${Shell_Y} 0 1 1
 
 # Check Solid color
-QAMoveTo 1 1
-QAMoveTo 1 1
+vmoveto 1 1
 set SetSelectMode 6
 OCC74_set b ${SetSelectMode}
 set GetSelectMode [OCC74_get b]
@@ -170,10 +149,8 @@ if { ${GetSelectMode} != ${SetSelectMode} } then {
    puts "Select Mode = ${GetSelectMode}"
    puts "OCC74: Get Select Mode Error "
 }
-QAMoveTo ${Solid_X} ${Solid_Y}
-QAMoveTo ${Solid_X} ${Solid_Y}
+vmoveto ${Solid_X} ${Solid_Y}
 
-QAUpdateLights
 checkcolor ${Solid_X} ${Solid_Y} 0 1 1
 
 ### THIRD PART
@@ -187,66 +164,45 @@ if { ${GetSelectMode} != ${SetSelectMode} } then {
 }
 
 # Check Shape color
-QAMoveTo 1 1
-QAMoveTo 1 1
-QAMoveTo ${Shape_X} ${Shape_Y}
-QAMoveTo ${Shape_X} ${Shape_Y}
+vmoveto 1 1
+vmoveto ${Shape_X} ${Shape_Y}
 
-QAUpdateLights
 checkcolor ${Shape_X} ${Shape_Y} 1 1 0
 
 # Check Vertex color
-QAMoveTo 1 1
-QAMoveTo 1 1
-QAMoveTo ${Vertex_X} ${Vertex_Y}
-QAMoveTo ${Vertex_X} ${Vertex_Y}
+vmoveto 1 1
+vmoveto ${Vertex_X} ${Vertex_Y}
 
-QAUpdateLights
 checkcolor ${Vertex_X} ${Vertex_Y} 1 1 0
 
 # Check Edge color
-QAMoveTo 1 1
-QAMoveTo 1 1
-QAMoveTo ${Edge_X} ${Edge_Y}
-QAMoveTo ${Edge_X} ${Edge_Y}
+vmoveto 1 1
+vmoveto ${Edge_X} ${Edge_Y}
 
-QAUpdateLights
 checkcolor ${Edge_X} ${Edge_Y} 1 1 0
 
 # Check Wire color
-QAMoveTo 1 1
-QAMoveTo 1 1
-QAMoveTo ${Wire_X} ${Wire_Y}
-QAMoveTo ${Wire_X} ${Wire_Y}
+vmoveto 1 1
+vmoveto ${Wire_X} ${Wire_Y}
 
-QAUpdateLights
 checkcolor ${Wire_X} ${Wire_Y} 1 1 0
 
 # Check Face color
-QAMoveTo 1 1
-QAMoveTo 1 1
-QAMoveTo ${Face_X} ${Face_Y}
-QAMoveTo ${Face_X} ${Face_Y}
+vmoveto 1 1
+vmoveto ${Face_X} ${Face_Y}
 
-QAUpdateLights
 checkcolor ${Face_X} ${Face_Y} 1 1 0
 
 # Check Shell color
-QAMoveTo 1 1
-QAMoveTo 1 1
-QAMoveTo ${Shell_X} ${Shell_Y}
-QAMoveTo ${Shell_X} ${Shell_Y}
+vmoveto 1 1
+vmoveto ${Shell_X} ${Shell_Y}
 
-QAUpdateLights
 checkcolor ${Shell_X} ${Shell_Y} 1 1 0
 
 # Check Solid color
-QAMoveTo 1 1
-QAMoveTo 1 1
-QAMoveTo ${Solid_X} ${Solid_Y}
-QAMoveTo ${Solid_X} ${Solid_Y}
+vmoveto 1 1
+vmoveto ${Solid_X} ${Solid_Y}
 
-QAUpdateLights
 checkcolor ${Solid_X} ${Solid_Y} 1 1 0
 
 set only_screen 1
index ae8e489e80354f7b971fd2ca9dcbc6c1b7a24245..d6f7cb0101b062b06a1045e155eaf78ca1ccf77b 100755 (executable)
@@ -46,8 +46,6 @@ AISDisplay D 0:1:4
 set x_coord 273
 set y_coord 115
 
-QAUpdateLights
-
 checkcolor $x_coord $y_coord 0.78 0.55 0.9
 
 set only_screen 1
index 62b89343a6aacb4047a0271297438d56225fc96f..d0f3a4765ab8bc1a16b42c937e7441bdd6d6e25e 100755 (executable)
@@ -6,7 +6,6 @@ puts "=================================="
 
 vinit
 GER61351 RED2 
-QAUpdateLights
 
 set x_coord 200
 set y_coord 200
index 50964299f524b988b4641985ae88e83f0d29f474..e4f4dc8b7e6fe8d07c310b5aed61286bf796b403 100755 (executable)
@@ -10,7 +10,6 @@ puts "=================================="
 vinit
 
 GER61351 0 255 0
-QAUpdateLights
 
 set x_coord 200
 set y_coord 200
index 221fef770c1fe7f01618c0a3a55b85f116e7982e..1fd5046109823e925ac7b5a12a061dc18350c741 100755 (executable)
@@ -8,7 +8,6 @@ vinit
 box b 10 20 30
 GER61351 b RED2
 vfit
-QAUpdateLights
 
 set x_coord 89
 set y_coord 363
index c35f22e044fa91ffda1c883559885aed6e5d326d..6652210be9e1c6fde7bc6875a09a9be9d62c8071 100755 (executable)
@@ -16,7 +16,6 @@ vinit
 box b 30 20 10
 GER61351 b 0 0 255
 vfit
-QAUpdateLights
 
 set x_coord 89
 set y_coord 363
index 8536571436dd0db5f0b5cc733a62e1fe0de175a2..6baad389ffd30b5ef17301c7942e7b504f975e4e 100755 (executable)
@@ -16,7 +16,6 @@ vinit
 box b 20 10 30
 GER61351 b 0 255 255
 vfit
-QAUpdateLights
 
 set x_coord 89
 set y_coord 363
index d616613ab5fd2a119b51fa15e24bf41fb2be91eb..3a41b0b082495a4de3d8a0c4b0554325c7a10718 100755 (executable)
@@ -8,7 +8,6 @@ vinit
 box b 20 10 30
 GER61351 b CYAN3
 vfit
-QAUpdateLights
 
 set x_coord 88
 set y_coord 316
index 70c26b67b1b9be743ab1a2d4c70bababcf047460..5d4a707438f4aaba8fb5717e11cd230eb9a35892 100755 (executable)
@@ -16,7 +16,7 @@ writestl a_1 ${aFile} 0
 
 meshfromstl m1 ${aFile}
 meshcolors m1 elem2 1
-QARotateV3dView 4 0 0 1
+vrotate 4 0 0
 vfit
 
 set x_coord 189