0029807: [Regression to 7.0.0] Impossible to cut cone from prism
[occt.git] / src / QABugs / QABugs_19.cxx
index 0c3de0c..18c9387 100644 (file)
 
 #include <QABugs.hxx>
 
-#include <Draw_Interpretor.hxx>
+#include <AIS_InteractiveContext.hxx>
+#include <AIS_Shape.hxx>
+#include <BRepAlgoAPI_Cut.hxx>
+#include <BRepOffsetAPI_MakePipe.hxx>
+#include <BRepPrimAPI_MakeBox.hxx>
+#include <BRepPrimAPI_MakeSphere.hxx>
 #include <DBRep.hxx>
+#include <Draw_Interpretor.hxx>
 #include <DrawTrSurf.hxx>
-#include <ViewerTest.hxx>
-#include <V3d_View.hxx>
-#include <TopoDS_Shape.hxx>
-#include <AIS_InteractiveContext.hxx>
-#include <AIS_LocalContext.hxx>
-#include <AIS_TexturedShape.hxx>
-#include <Image_PixMap.hxx>
-#include <Image_Color.hxx>
-
-#include <gp_Pnt2d.hxx>
-#include <gp_Ax1.hxx>
 #include <GCE2d_MakeSegment.hxx>
 #include <Geom2d_TrimmedCurve.hxx>
-#include <DrawTrSurf.hxx>
-
-#include <Precision.hxx>
-
-#include <cstdio>
-#include <cmath>
-#include <iostream>
-#include <OSD_Timer.hxx>
-#include <OSD_Parallel.hxx>
-#include <OSD_PerfMeter.hxx>
-#include <BRepPrimAPI_MakeBox.hxx>
-#include <BRepPrimAPI_MakeSphere.hxx>
-#include <BRepAlgo_Cut.hxx>
-#include <NCollection_Map.hxx>
+#include <GeomFill_Trihedron.hxx>
+#include <Graphic3d_ArrayOfTriangles.hxx>
+#include <gp_Ax1.hxx>
+#include <gp_Pnt2d.hxx>
+#include <gp_Quaternion.hxx>
+#include <Image_Color.hxx>
+#include <Image_PixMap.hxx>
 #include <NCollection_Handle.hxx>
 #include <NCollection_IncAllocator.hxx>
+#include <NCollection_Map.hxx>
+#include <OSD_Parallel.hxx>
+#include <OSD_PerfMeter.hxx>
+#include <OSD_Timer.hxx>
+#include <Precision.hxx>
+#include <Prs3d_ShadingAspect.hxx>
+#include <Prs3d_Text.hxx>
+#include <SelectMgr_Filter.hxx>
+#include <Standard_Version.hxx>
+#include <StdSelect_BRepOwner.hxx>
 #include <TCollection_HAsciiString.hxx>
-#include <GeomFill_Trihedron.hxx>
-#include <BRepOffsetAPI_MakePipe.hxx>
 #include <TopExp_Explorer.hxx>
+#include <TopoDS_Shape.hxx>
+#include <V3d_View.hxx>
+#include <ViewerTest.hxx>
+#include <XmlDrivers_DocumentRetrievalDriver.hxx>
+#include <XmlDrivers_DocumentStorageDriver.hxx>
+#include <TDataStd_Real.hxx>
+#include <Standard_Atomic.hxx>
 
-#include <SelectMgr_Filter.hxx>
-
-#include <Standard_Version.hxx>
+#include <cstdio>
+#include <cmath>
+#include <iostream>
 
 #define QCOMPARE(val1, val2) \
   di << "Checking " #val1 " == " #val2 << \
@@ -123,21 +126,25 @@ static Standard_Integer OCC23237 (Draw_Interpretor& di, Standard_Integer /*argc*
     // do some operation that will take considerable time compared with time of starting / stopping timers
     BRepPrimAPI_MakeBox aBox (10., 10., 10.);
     BRepPrimAPI_MakeSphere aSphere (10.);
-    BRepAlgo_Cut aCutter (aBox.Shape(), aSphere.Shape());
+    BRepAlgoAPI_Cut aCutter (aBox.Shape(), aSphere.Shape());
 
     aTM.Stop();
     aPM.Stop();
   }
  
   int aNbEnters = 0;
-  Standard_Real aPerfMeter_CPUtime = 0., aTimer_ElapsedTime = aTM.ElapsedTime();
+  Standard_Real aPerfMeter_CPUtime = 0., aTimer_CPUTime = 0., aS;
+  Standard_Integer aM, aH;
+  aTM.Show(aS, aM, aH, aTimer_CPUTime);
 
   perf_get_meter("TestMeter", &aNbEnters, &aPerfMeter_CPUtime);
+  perf_init_meter("TestMeter");
 
-  Standard_Real aTimeDiff = (fabs(aTimer_ElapsedTime - aPerfMeter_CPUtime) / aTimer_ElapsedTime);
+  Standard_Real aTimeDiff = (fabs(aTimer_CPUTime - aPerfMeter_CPUtime) / aTimer_CPUTime);
 
   printf("\nMeasurement results (%d cycles):\n", count);
-  printf("\nOSD_PerfMeter CPU time: %lf\nOSD_Timer elapsed time: %lf\n", aPerfMeter_CPUtime, aTimer_ElapsedTime);
+  printf("\nOSD_PerfMeter CPU time: %lf\nOSD_Timer CPU time: %lf\n",
+    aPerfMeter_CPUtime, aTimer_CPUTime);
   printf("Time delta is: %.3lf %%\n", aTimeDiff * 100);
 
   if (aTimeDiff > 0.2)
@@ -195,16 +202,16 @@ static Standard_Integer OCC22980 (Draw_Interpretor& di, Standard_Integer /*argc*
 }
 
 #include <TDocStd_Application.hxx>
-#include <XCAFApp_Application.hxx>
 #include <TDocStd_Document.hxx>
 #include <XCAFDoc_ShapeTool.hxx>
 #include <XCAFDoc_DocumentTool.hxx>
 #include <TDF_Label.hxx>
 #include <TDataStd_Name.hxx>
+#include <DDocStd.hxx>
 
 static Standard_Integer OCC23595 (Draw_Interpretor& di, Standard_Integer /*argc*/, const char** /*argv*/)
 {
-  Handle(TDocStd_Application) anApp = XCAFApp_Application::GetApplication();
+  Handle(TDocStd_Application) anApp = DDocStd::GetApplication();
   Handle(TDocStd_Document) aDoc;
   anApp->NewDocument ("XmlXCAF", aDoc);
   QCOMPARE (!aDoc.IsNull(), Standard_True);
@@ -1279,8 +1286,8 @@ static Standard_Integer OCC24012 (Draw_Interpretor& di, Standard_Integer argc, c
     {
         TopoDS_Shape rshape = anormpro.Projection();
                Handle(AIS_InteractiveObject) myShape = new AIS_Shape (rshape);
-               myAISContext->SetColor(myShape, Quantity_Color(Quantity_NOC_YELLOW));
-               myAISContext->Display(myShape, Standard_True);
+               myAISContext->SetColor (myShape, Quantity_Color(Quantity_NOC_YELLOW), Standard_False);
+               myAISContext->Display (myShape, Standard_True);
     }
 
        return 0;
@@ -1359,7 +1366,7 @@ static Standard_Integer OCC24945 (Draw_Interpretor& di, Standard_Integer argc, c
   return 0;
 }
 
-#include <Extrema_FuncExtPS.hxx>
+#include <Extrema_FuncPSNorm.hxx>
 #include <math_FunctionSetRoot.hxx>
 #include <math_Vector.hxx>
 #include <BRepBuilderAPI_MakeVertex.hxx>
@@ -1396,7 +1403,7 @@ static Standard_Integer OCC24137 (Draw_Interpretor& theDI, Standard_Integer theN
 
   gp_Pnt aPnt = BRep_Tool::Pnt (aVert), aRes;
 
-  Extrema_FuncExtPS    anExtFunc;
+  Extrema_FuncPSNorm    anExtFunc;
   math_FunctionSetRoot aRoot (anExtFunc, aNbIts);
 
   math_Vector aTolUV (1, 2), aUVinf  (1, 2), aUVsup  (1, 2), aFromUV (1, 2);
@@ -1526,25 +1533,6 @@ static Standard_Integer OCC24271 (Draw_Interpretor& di,
 #include <GeomInt_IntSS.hxx>
 #include <Geom_ConicalSurface.hxx>
 #include <Standard_ErrorHandler.hxx>
-//=======================================================================
-//function : OCC23972
-//purpose  : 
-//=======================================================================
-static void DoGeomIntSSTest (const Handle(Geom_Surface)& theSurf1,
-                            const Handle(Geom_Surface)& theSurf2,
-                            const Standard_Integer theNbSol,
-                            Draw_Interpretor& di)
-{
-  try {
-    OCC_CATCH_SIGNALS
-        GeomInt_IntSS anInter;
-        anInter.Perform (theSurf1, theSurf2, Precision::Confusion(), Standard_True);
-        QVERIFY (anInter.IsDone());
-        QCOMPARE (anInter.NbLines(), theNbSol);
-  } catch (...) {
-    QVERIFY (Standard_False);
-  }
-}
 
 namespace {
   static Handle(Geom_ConicalSurface) CreateCone (const gp_Pnt& theLoc,
@@ -1561,28 +1549,30 @@ namespace {
   }
 }
 
-static Standard_Integer OCC23972 (Draw_Interpretor& di,Standard_Integer n, const char**)
+static Standard_Integer OCC23972(Draw_Interpretor& /*theDI*/,
+                                 Standard_Integer theNArg, const char** theArgs)
 {
-  if (n != 1) return 1;
-
-  //process specific cones, cannot read them from files because due to rounding the original error
-  //in math_FunctionRoots gets hidden
-  Handle(Geom_Surface) aS1 = CreateCone (
-                                        gp_Pnt (123.694345356663, 789.9, 68.15),
-                                        gp_Dir (-1, 3.48029791472957e-016, -8.41302743359754e-017),
-                                        gp_Dir (-3.48029791472957e-016, -1, -3.17572289932207e-016),
-                                        3.28206830417112,
-                                        0.780868809443031,
-                                        0.624695047554424);
-  Handle(Geom_Surface) aS2 = CreateCone (
-                                        gp_Pnt (123.694345356663, 784.9, 68.15),
-                                        gp_Dir (-1, -2.5209507537117e-016, -1.49772808948866e-016),
-                                        gp_Dir (1.49772808948866e-016, 3.17572289932207e-016, -1),
-                                        3.28206830417112,
-                                        0.780868809443031,
-                                        0.624695047554424);
+  if (theNArg != 3) return 1;
+
+  //process specific cones, cannot read them from files because 
+  //due to rounding the original error in math_FunctionRoots gets hidden
+  const Handle(Geom_Surface) aS1 = CreateCone(
+                              gp_Pnt(123.694345356663, 789.9, 68.15),
+                              gp_Dir(-1, 3.48029791472957e-016, -8.41302743359754e-017),
+                              gp_Dir(-3.48029791472957e-016, -1, -3.17572289932207e-016),
+                              3.28206830417112,
+                              0.780868809443031,
+                              0.624695047554424);
+  const Handle(Geom_Surface) aS2 = CreateCone(
+                              gp_Pnt(123.694345356663, 784.9, 68.15),
+                              gp_Dir(-1, -2.5209507537117e-016, -1.49772808948866e-016),
+                              gp_Dir(1.49772808948866e-016, 3.17572289932207e-016, -1),
+                              3.28206830417112,
+                              0.780868809443031,
+                              0.624695047554424);
   
-  DoGeomIntSSTest (aS1, aS2, 2, di);
+  DrawTrSurf::Set(theArgs[1], aS1);
+  DrawTrSurf::Set(theArgs[2], aS2);
 
   return 0;
 }
@@ -1768,6 +1758,7 @@ static Standard_Integer OCC23950 (Draw_Interpretor& di, Standard_Integer argc, c
   TDataStd_Name::Set(labelA0, "ASSEMBLY");
 
   TDF_Label component01 = XCAFDoc_DocumentTool::ShapeTool (aDoc->Main ())->AddComponent (labelA0, lab1, location0);
+  XCAFDoc_DocumentTool::ShapeTool (aDoc->Main ())->UpdateAssemblies();
 
   Quantity_Color yellow(1,1,0, Quantity_TOC_RGB);
   XCAFDoc_DocumentTool::ColorTool (labelA0)->SetColor (component01, yellow, XCAFDoc_ColorGen);
@@ -1785,65 +1776,6 @@ static Standard_Integer OCC23950 (Draw_Interpretor& di, Standard_Integer argc, c
   return 0;
 }
 
-//=======================================================================
-//function : OCC24622
-//purpose  : The command tests sourcing Image_PixMap to AIS_TexturedShape
-//=======================================================================
-static Standard_Integer OCC24622 (Draw_Interpretor& /*theDi*/, Standard_Integer theArgNb, const char** theArgVec)
-{
-  if (theArgNb != 2)
-  {
-    std::cout << "Usage : " << theArgVec[0] << " texture={1D|2D}";
-    return 1;
-  }
-
-  const Handle(AIS_InteractiveContext)& anAISContext = ViewerTest::GetAISContext();
-  if (anAISContext.IsNull())
-  {
-    std::cout << "Please initialize view with \"vinit\".\n";
-    return 1;
-  }
-
-  Handle(Image_PixMap) anImage = new Image_PixMap();
-
-  static const Image_ColorRGB aBitmap[8] =
-  {
-    {{255,   0, 0}}, {{0,  148, 255}}, {{ 0, 148, 255}}, {{255,  94, 0}},
-    {{255, 121, 0}}, {{76, 255,   0}}, {{76, 255,   0}}, {{255, 202, 0}}
-  };
-
-  TCollection_AsciiString aTextureTypeArg (theArgVec[1]);
-  aTextureTypeArg.UpperCase();
-  if (aTextureTypeArg == "1D")
-  {
-    anImage->InitWrapper (Image_PixMap::ImgRGB, (Standard_Byte*)aBitmap, 8, 1);
-  }
-  else if (aTextureTypeArg == "2D")
-  {
-    anImage->InitTrash (Image_PixMap::ImgRGB, 8, 8);
-    for (Standard_Integer aRow = 0; aRow < 8; ++aRow)
-    {
-      for (Standard_Integer aCol = 0; aCol < 8; ++aCol)
-      {
-        anImage->ChangeValue<Image_ColorRGB> (aRow, aCol) = aBitmap[aRow];
-      }
-    }
-  }
-  else
-  {
-    std::cout << "Please specify type of texture to test {1D|2D}.\n";
-    return 1;
-  }
-
-  TopoDS_Shape aBlankShape = BRepPrimAPI_MakeBox (10.0, 10.0, 10.0).Shape();
-
-  Handle(AIS_TexturedShape) aTexturedShape = new AIS_TexturedShape (aBlankShape);
-  aTexturedShape->SetTexturePixMap (anImage);
-  anAISContext->Display (aTexturedShape, 3, 0);
-
-  return 0;
-}
-
 //=======================================================================
 //function : OCC24667
 //purpose  : 
@@ -1930,7 +1862,6 @@ static TopoDS_Shape CreateTestShape (int& theShapeNb)
   return aComp;
 }
 
-#include <AppStd_Application.hxx>
 #include <TDataStd_Integer.hxx>
 #include <TNaming_Builder.hxx>
 static Standard_Integer OCC24931 (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
@@ -1942,7 +1873,7 @@ static Standard_Integer OCC24931 (Draw_Interpretor& di, Standard_Integer argc, c
   TCollection_ExtendedString aFileName (argv[1]);
   PCDM_StoreStatus aSStatus  = PCDM_SS_Failure;
 
-  Handle(TDocStd_Application) anApp = new AppStd_Application;
+  Handle(TDocStd_Application) anApp = DDocStd::GetApplication();
   {
     Handle(TDocStd_Document) aDoc;
     anApp->NewDocument ("XmlOcaf", aDoc);
@@ -1960,9 +1891,6 @@ static Standard_Integer OCC24931 (Draw_Interpretor& di, Standard_Integer argc, c
   return 0;
 }
 
-#include <AppStdL_Application.hxx>
-#include <TDocStd_Application.hxx>
-#include <TDataStd_Integer.hxx>
 #include <TDF_AttributeIterator.hxx>
 //=======================================================================
 //function : OCC24755
@@ -1976,12 +1904,16 @@ static Standard_Integer OCC24755 (Draw_Interpretor& di, Standard_Integer n, cons
     return 1;
   }
 
-  Handle(TDocStd_Application) anApp = new AppStdL_Application;
+  Handle(TDocStd_Application) anApp = DDocStd::GetApplication();
   Handle(TDocStd_Document) aDoc;
   anApp->NewDocument ("BinOcaf", aDoc);
   TDF_Label aLab = aDoc->Main();
+  // Prepend an int value.
   TDataStd_Integer::Set (aLab, 0);
+  // Prepend a name.
   TDataStd_Name::Set (aLab, "test");
+  // Append a double value.
+  aLab.AddAttribute(new TDataStd_Real(), true/*append*/);
 
   TDF_AttributeIterator i (aLab);
   Handle(TDF_Attribute) anAttr = i.Value();
@@ -1989,6 +1921,9 @@ static Standard_Integer OCC24755 (Draw_Interpretor& di, Standard_Integer n, cons
   i.Next();
   anAttr = i.Value();
   QCOMPARE (anAttr->IsKind (STANDARD_TYPE (TDataStd_Name)), Standard_True);
+  i.Next();
+  anAttr = i.Value();
+  QCOMPARE (anAttr->IsKind (STANDARD_TYPE (TDataStd_Real)), Standard_True);
 
   return 0;
 }
@@ -2282,32 +2217,24 @@ class Test_TDocStd_Application : public TDocStd_Application
 {
 public:
 
-  static void initGlobalPluginMap (const TCollection_AsciiString& thePlugin,
-                                   const TCollection_AsciiString& theSaver,
-                                   const TCollection_AsciiString& theLoader)
+  Test_TDocStd_Application ()
   {
-    const Handle(Resource_Manager)& aManager = Plugin::AdditionalPluginMap();
-    aManager->SetResource ((theSaver  + ".Location").ToCString(), thePlugin.ToCString());
-    aManager->SetResource ((theLoader + ".Location").ToCString(), thePlugin.ToCString());
-  }
-
-  Test_TDocStd_Application (const TCollection_AsciiString& thePlugin,
-                            const TCollection_AsciiString& theSaver,
-                            const TCollection_AsciiString& theLoader)
-  {
-    initGlobalPluginMap (thePlugin, theSaver, theLoader);
-
     // explicitly initialize resource manager
     myResources = new Resource_Manager ("");
     myResources->SetResource ("xml.FileFormat", THE_QATEST_DOC_FORMAT);
     myResources->SetResource (THE_QATEST_DOC_FORMAT ".Description",     "Test XML Document");
     myResources->SetResource (THE_QATEST_DOC_FORMAT ".FileExtension",   "xml");
-    myResources->SetResource (THE_QATEST_DOC_FORMAT ".StoragePlugin",   theSaver.ToCString());
-    myResources->SetResource (THE_QATEST_DOC_FORMAT ".RetrievalPlugin", theLoader.ToCString());
   }
 
-  virtual Standard_CString ResourcesName() { return ""; }
-  virtual void Formats (TColStd_SequenceOfExtendedString& theFormats) { theFormats.Clear(); }
+  virtual Handle(PCDM_Reader) ReaderFromFormat (const TCollection_ExtendedString&) Standard_OVERRIDE
+  {
+    return new XmlDrivers_DocumentRetrievalDriver ();
+  }
+  virtual Handle(PCDM_StorageDriver) WriterFromFormat (const TCollection_ExtendedString&) Standard_OVERRIDE
+  {
+    return new XmlDrivers_DocumentStorageDriver ("Test");
+  }
+  virtual Standard_CString ResourcesName() Standard_OVERRIDE { return ""; }
 };
 
 //=======================================================================
@@ -2341,7 +2268,7 @@ static Standard_Integer OCC24925 (Draw_Interpretor& theDI,
   PCDM_StoreStatus  aSStatus = PCDM_SS_Failure;
   PCDM_ReaderStatus aRStatus = PCDM_RS_OpenError;
 
-  Handle(TDocStd_Application) anApp = new Test_TDocStd_Application (aPlugin, aSaver, aLoader);
+  Handle(TDocStd_Application) anApp = new Test_TDocStd_Application ();
   {
     Handle(TDocStd_Document) aDoc;
     anApp->NewDocument (THE_QATEST_DOC_FORMAT, aDoc);
@@ -2392,8 +2319,8 @@ static Standard_Integer OCC25043 (Draw_Interpretor& theDI,
     for (; anCheckIter.More(); anCheckIter.Next())
     {
       const BOPAlgo_CheckResult& aCurCheckRes = anCheckIter.Value();
-      const BOPCol_ListOfShape& aCurFaultyShapes = aCurCheckRes.GetFaultyShapes1();
-      BOPCol_ListIteratorOfListOfShape aFaultyIter(aCurFaultyShapes);
+      const TopTools_ListOfShape& aCurFaultyShapes = aCurCheckRes.GetFaultyShapes1();
+      TopTools_ListIteratorOfListOfShape aFaultyIter(aCurFaultyShapes);
       for (; aFaultyIter.More(); aFaultyIter.Next())
       {
         const TopoDS_Shape& aFaultyShape = aFaultyIter.Value();
@@ -2413,14 +2340,14 @@ static Standard_Integer OCC25043 (Draw_Interpretor& theDI,
         }
         else 
         {
-          theDI << "Info. Faulty shape if found in source shape\n";
+          theDI << "Info. Faulty shape is found in source shape\n";
         }
       }
     }
   }
   else 
   {
-    theDI << "Error. Problems are not detected. Test is not performed.";
+    theDI << "Problems are not detected. Test is not performed.";
   }
 
   return 0;
@@ -2454,46 +2381,6 @@ static Standard_Integer OCC24606 (Draw_Interpretor& theDI,
   return 0;
 }
 
-//=======================================================================
-//function : OCC23010
-//purpose  :
-//=======================================================================
-#include <STEPCAFControl_Reader.hxx>
-
-class mOcafApplication : public TDocStd_Application
-{
-  void Formats(TColStd_SequenceOfExtendedString& Formats)
-  {
-    Formats.Append(TCollection_ExtendedString("mOcafApplication"));
-  }
-  Standard_CString ResourcesName()
-  {
-    return Standard_CString("Resources");
-  }
-};
-
-static Standard_Integer OCC23010 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
-{
-  if (argc != 2) {
-    di << "Usage: " << argv[0] << " invalid number of arguments\n";
-    return 1;
-  }
-  std::string fileName=argv[1];
-  mOcafApplication *mCasApp = new mOcafApplication();
-  Handle(TDocStd_Document) doc;
-  mCasApp->NewDocument("BinXCAF", doc);
-  STEPCAFControl_Reader stepReader;
-  IFSelect_ReturnStatus status = stepReader.ReadFile (fileName.c_str());
-  if (status != IFSelect_RetDone)
-    return false;
-  stepReader.SetColorMode(Standard_True);
-  stepReader.SetLayerMode(Standard_True);
-  stepReader.SetNameMode(Standard_True);
-  stepReader.Transfer(doc); // ERROR HERE!!!
-  delete mCasApp;
-  return 0;
-}
-
 //=======================================================================
 //function : OCC25202
 //purpose  :
@@ -2811,10 +2698,8 @@ static Standard_Integer OCC25413 (Draw_Interpretor& di, Standard_Integer narg ,
 #include <BRepAlgoAPI_Cut.hxx>
 #include <BRepAlgoAPI_Section.hxx>
 //
-#include <BOPTools.hxx>
-//
-#include <BOPCol_MapOfShape.hxx>
-#include <BOPCol_ListOfShape.hxx>
+#include <TopExp.hxx>
+#include <TopTools_MapOfShape.hxx>
 //=======================================================================
 //function : OCC25446
 //purpose  :
@@ -2851,7 +2736,7 @@ static Standard_Integer OCC25446 (Draw_Interpretor& theDI,
   aOp = (BOPAlgo_Operation)iOp;
   //
   Standard_Integer iErr;
-  BOPCol_ListOfShape aLS;
+  TopTools_ListOfShape aLS;
   BOPAlgo_PaveFiller aPF;
   //
   aLS.Append(aS1);
@@ -2859,7 +2744,7 @@ static Standard_Integer OCC25446 (Draw_Interpretor& theDI,
   aPF.SetArguments(aLS);
   //
   aPF.Perform();
-  iErr = aPF.ErrorStatus();
+  iErr = aPF.HasErrors();
   if (iErr) {
     theDI << "Intersection failed with error status: " << iErr << "\n";
     return 1;
@@ -2887,7 +2772,7 @@ static Standard_Integer OCC25446 (Draw_Interpretor& theDI,
     break;
   }
   //
-  iErr = pBuilder->ErrorStatus();
+  iErr = pBuilder->HasErrors();
   if (!pBuilder->IsDone()) {
     theDI << "BOP failed with error status: " << iErr << "\n";
     return 1;
@@ -2896,14 +2781,14 @@ static Standard_Integer OCC25446 (Draw_Interpretor& theDI,
   const TopoDS_Shape& aRes = pBuilder->Shape();
   DBRep::Set(argv[1], aRes);
   //
-  BOPCol_MapOfShape aMapArgs, aMapShape;
-  BOPCol_MapIteratorOfMapOfShape aIt;
+  TopTools_MapOfShape aMapArgs, aMapShape;
+  TopTools_MapIteratorOfMapOfShape aIt;
   Standard_Boolean bIsDeletedHist, bIsDeletedMap;
   TopAbs_ShapeEnum aType;
   //
-  BOPTools::MapShapes(aS1, aMapArgs);
-  BOPTools::MapShapes(aS2, aMapArgs);
-  BOPTools::MapShapes(aRes, aMapShape);
+  TopExp::MapShapes(aS1, aMapArgs);
+  TopExp::MapShapes(aS2, aMapArgs);
+  TopExp::MapShapes(aRes, aMapShape);
   //
   aIt.Initialize(aMapArgs);
   for (; aIt.More(); aIt.Next()) {
@@ -2960,19 +2845,19 @@ struct OCC25545_Functor
 //function : OCC25545
 //purpose  : Tests data race when concurrently accessing TopLoc_Location::Transformation()
 //=======================================================================
-#ifdef HAVE_TBB
+
 static Standard_Integer OCC25545 (Draw_Interpretor& di, 
                                   Standard_Integer, 
                                   const char **)
 {
   // Place vertices in a vector, giving the i-th vertex the
   // transformation that translates it on the vector (i,0,0) from the origin.
-  size_t n = 1000;
+  Standard_Integer n = 1000;
   std::vector<TopoDS_Shape> aShapeVec (n);
   std::vector<TopLoc_Location> aLocVec (n);
   TopoDS_Shape aShape = BRepBuilderAPI_MakeVertex (gp::Origin ());
   aShapeVec[0] = aShape;
-  for (size_t i = 1; i < n; ++i) {
+  for (Standard_Integer i = 1; i < n; ++i) {
     gp_Trsf aT;
     aT.SetTranslation (gp_Vec (1, 0, 0));
     aLocVec[i] = aLocVec[i - 1] * aT;
@@ -2983,20 +2868,12 @@ static Standard_Integer OCC25545 (Draw_Interpretor& di,
   // concurrently
   OCC25545_Functor aFunc(aShapeVec);
 
-  //concurrently process
-  tbb::parallel_for (size_t (0), n, aFunc, tbb::simple_partitioner ());
+  // concurrently process
+  OSD_Parallel::For (0, n, aFunc);
+
   QVERIFY (!aFunc.myIsRaceDetected);
   return 0;
 }
-#else
-static Standard_Integer OCC25545 (Draw_Interpretor&, 
-                                  Standard_Integer, 
-                                  const char **argv)
-{
-  cout << "Test skipped: command " << argv[0] << " requires TBB library" << endl;
-  return 0;
-}
-#endif
 
 //=======================================================================
 //function : OCC25547
@@ -3325,95 +3202,6 @@ static Standard_Integer OCC24881 (Draw_Interpretor& di, Standard_Integer narg ,
   return 0;
 }
 
-//=======================================================================
-//function : OCC26172
-//purpose  :
-//=======================================================================
-static Standard_Integer OCC26172 (Draw_Interpretor& theDI, Standard_Integer theArgNb, const char** theArgVec)
-{
-  if (theArgNb != 1)
-  {
-    std::cerr << "Error: wrong number of arguments! See usage:\n";
-    theDI.PrintHelp (theArgVec[0]);
-    return 1;
-  }
-
-  Handle(AIS_InteractiveContext) anAISContext = ViewerTest::GetAISContext();
-  if(anAISContext.IsNull())
-  {
-    std::cerr << "Error: no active view. Please call vinit.\n";
-    return 1;
-  }
-
-  gp_Pnt aStart (100, 100, 100);
-  gp_Pnt anEnd (300, 400, 600);
-  BRepBuilderAPI_MakeEdge anEdgeBuilder (aStart, anEnd);
-  TopoDS_Edge anEdge = anEdgeBuilder.Edge();
-  Handle(AIS_Shape) aTestAISShape = new AIS_Shape (anEdge);
-  anAISContext->Display (aTestAISShape);
-
-  // 2. activate it in selection modes
-  TColStd_SequenceOfInteger aModes;
-  aModes.Append (AIS_Shape::SelectionMode ((TopAbs_ShapeEnum) TopAbs_VERTEX));
-  aModes.Append (AIS_Shape::SelectionMode ((TopAbs_ShapeEnum) TopAbs_EDGE));
-
-  anAISContext->OpenLocalContext();
-  anAISContext->Deactivate (aTestAISShape);
-  anAISContext->Load (aTestAISShape, -1, true);
-  for (Standard_Integer anIt = 1; anIt <= aModes.Length(); ++anIt)
-  {
-    anAISContext->Activate (aTestAISShape, aModes (anIt));
-  }
-
-  // select entities in vertex selection mode
-  Handle(SelectMgr_Selection) aSelection = aTestAISShape->Selection (aModes (1));
-  for (aSelection->Init(); aSelection->More(); aSelection->Next())
-  {
-    Handle(SelectBasics_SensitiveEntity) anEntity = aSelection->Sensitive()->BaseSensitive();
-    if (anEntity.IsNull())
-    {
-      continue;
-    }
-
-    Handle(SelectMgr_EntityOwner) anOwner =
-      Handle(SelectMgr_EntityOwner)::DownCast (anEntity->OwnerId());
-
-    if (anOwner.IsNull())
-    {
-      continue;
-    }
-
-    anAISContext->LocalContext()->AddOrRemoveSelected (anOwner);
-  }
-
-  // select entities in edge selection mode
-  aSelection = aTestAISShape->Selection (aModes (2));
-  for (aSelection->Init(); aSelection->More(); aSelection->Next())
-  {
-    Handle(SelectBasics_SensitiveEntity) anEntity = aSelection->Sensitive()->BaseSensitive();
-    if (anEntity.IsNull())
-    {
-      continue;
-    }
-
-    Handle(SelectMgr_EntityOwner) anOwner =
-      Handle(SelectMgr_EntityOwner)::DownCast (anEntity->OwnerId());
-
-    if (anOwner.IsNull())
-    {
-      continue;
-    }
-
-    anAISContext->LocalContext()->AddOrRemoveSelected (anOwner);
-  }
-
-  // deactivate vertex mode and check clearing of outdated selection
-  anAISContext->Deactivate (aTestAISShape, aModes (1));
-  anAISContext->LocalContext()->ClearOutdatedSelection (aTestAISShape, true);
-
-  return 0;
-}
-
 //=======================================================================
 //function : OCC26284
 //purpose  :
@@ -3436,16 +3224,17 @@ static Standard_Integer OCC26284 (Draw_Interpretor& theDI, Standard_Integer theA
 
   BRepPrimAPI_MakeSphere aSphereBuilder (gp_Pnt (0.0, 0.0, 0.0), 1.0);
   Handle(AIS_Shape) aSphere = new AIS_Shape (aSphereBuilder.Shape());
-  anAISContext->Display (aSphere);
+  anAISContext->Display (aSphere, Standard_False);
   for (Standard_Integer aChildIdx = 0; aChildIdx < 5; ++aChildIdx)
   {
     BRepPrimAPI_MakeSphere aBuilder (gp_Pnt (1.0 + aChildIdx, 1.0 + aChildIdx, 1.0 + aChildIdx), 1.0);
     Handle(AIS_Shape) aChild = new AIS_Shape (aBuilder.Shape());
     aSphere->AddChild (aChild);
-    anAISContext->Display (aChild);
+    anAISContext->Display (aChild, Standard_False);
   }
 
   anAISContext->RecomputeSelectionOnly (aSphere);
+  anAISContext->UpdateCurrentViewer();
 
   return 0;
 }
@@ -3576,7 +3365,7 @@ static Standard_Integer OCC24923(
   const Standard_Real aDeviation = 
     1. - (Standard_Real)(aPointsNb - aFailedNb) / (Standard_Real)aPointsNb;
 
-  theDI << "Number of failed cases: " << aFailedNb << " (Total " << aPointsNb << ")\n";
+  theDI << "Number of incorrect cases: " << aFailedNb << " (Total " << aPointsNb << ")\n";
   if (aDeviation > aMaxDeviation)
   {
     theDI << "Failed. Number of incorrect results is too huge: " << 
@@ -3590,6 +3379,235 @@ static Standard_Integer OCC24923(
   return 0;
 }
 
+//=======================================================================
+//function : OCC25574
+//purpose  : check implementation of Euler angles in gp_Quaternion
+//=======================================================================
+
+static Standard_Integer OCC25574 (Draw_Interpretor& theDI, Standard_Integer /*argc*/, const char** /*argv*/)
+{
+  Standard_Boolean isTestOk = Standard_True;
+
+  // Check consistency of Get and Set operations for Euler angles
+  gp_Quaternion aQuat;
+  aQuat.Set(0.06766916507860499, 0.21848101129786085, 0.11994599260380681,0.9660744746954637);
+  Standard_Real alpha,beta,gamma;
+  gp_Mat aRinv = aQuat.GetMatrix().Inverted();
+  gp_Mat aI;
+  aI.SetIdentity();
+  const char* names[] = { "Extrinsic_XYZ", "Extrinsic_XZY", "Extrinsic_YZX", "Extrinsic_YXZ", "Extrinsic_ZXY", "Extrinsic_ZYX", 
+                          "Intrinsic_XYZ", "Intrinsic_XZY", "Intrinsic_YZX", "Intrinsic_YXZ", "Intrinsic_ZXY", "Intrinsic_ZYX", 
+                          "Extrinsic_XYX", "Extrinsic_XZX", "Extrinsic_YZY", "Extrinsic_YXY", "Extrinsic_ZYZ", "Extrinsic_ZXZ",
+                          "Intrinsic_XYX", "Intrinsic_XZX", "Intrinsic_YZY", "Intrinsic_YXY", "Intrinsic_ZXZ", "Intrinsic_ZYZ" };
+  for (int i = gp_Extrinsic_XYZ; i <= gp_Intrinsic_ZYZ; i++)
+  {
+    aQuat.GetEulerAngles (gp_EulerSequence(i), alpha, beta, gamma);
+
+    gp_Quaternion aQuat2;
+    aQuat2.SetEulerAngles (gp_EulerSequence(i), alpha, beta, gamma);
+
+    gp_Mat aR = aQuat2.GetMatrix();
+    gp_Mat aDiff = aR * aRinv - aI;
+    if (aDiff.Determinant() > 1e-5)
+    {
+      theDI << "Error: Euler angles conversion incorrect for sequence " << names[i - gp_Extrinsic_XYZ] << "\n";
+      isTestOk = Standard_False;
+    }
+  }
+
+  // Check conversion between intrinsic and extrinsic rotations
+  // Any extrinsic rotation is equivalent to an intrinsic rotation
+  // by the same angles but with inverted order of elemental rotations, and vice versa
+  // For instance:
+  //    Extrinsic_XZY = Incrinsic_XZY
+  //    R = X(A)Z(B)Y(G) --> R = Y(G)Z(B)X(A)
+  alpha = 0.1517461713131;
+  beta = 1.5162198410141;
+  gamma = 1.9313156236541;
+  Standard_Real alpha2, beta2, gamma2;
+  gp_EulerSequence pairs[][2] = { {gp_Extrinsic_XYZ, gp_Intrinsic_ZYX},
+                                  {gp_Extrinsic_XZY, gp_Intrinsic_YZX},
+                                  {gp_Extrinsic_YZX, gp_Intrinsic_XZY},
+                                  {gp_Extrinsic_YXZ, gp_Intrinsic_ZXY},
+                                  {gp_Extrinsic_ZXY, gp_Intrinsic_YXZ},
+                                  {gp_Extrinsic_ZYX, gp_Intrinsic_XYZ} };
+  for (int i = 0; i < 6; i++)
+  {
+    aQuat.SetEulerAngles(pairs[i][0],  alpha,  beta,  gamma);
+    aQuat.GetEulerAngles(pairs[i][1], gamma2, beta2, alpha2);
+
+    if (Abs(alpha - alpha2) > 1e-5 || Abs(beta - beta2) > 1e-5 || Abs(gamma - gamma2) > 1e-5)
+    {
+      theDI << "Error: intrinsic and extrinsic conversion incorrect for sequence " << names[i] << "\n";
+      isTestOk = Standard_False;
+    }
+  }
+
+  // Check correspondence of enumeration and actual rotation it defines, 
+  // by rotation by one axis and checking that it does not change a point on that axis
+  for (int i = gp_Extrinsic_XYZ; i <= gp_Intrinsic_ZYZ; i++)
+  {
+    // Iterate over rotations R(A)R(B)R(G) for each Euler angle Alpha, Beta, Gamma
+    // There are three ordered axes corresponding to three rotations.
+    // Each rotation applyed with current angle around current axis.
+    for (int j=0; j < 3; j++)
+    {
+      // note that current axis index is obtained by parsing of enumeration name!
+      int anAxis = names[i - gp_Extrinsic_XYZ][10 + j] - 'X';
+      Standard_ASSERT_RETURN (anAxis >=0 && anAxis <= 2, "Incorrect parsing of enumeration name", 1);
+
+      // Set 90 degrees to current Euler angle
+      double anAngles[3] = {0., 0., 0.};
+      anAngles[j] = 0.5 * M_PI;
+
+      gp_Quaternion q2;
+      q2.SetEulerAngles (gp_EulerSequence(i), anAngles[0], anAngles[1], anAngles[2]);
+
+      // Set point on axis corresponding to current rotation
+      // We will apply rotation around this axis
+      gp_XYZ v (0., 0., 0.);
+      v.SetCoord (anAxis + 1, 1.);
+
+      // Apply rotation to point
+      gp_Trsf aT;
+      aT.SetRotation (q2);
+      gp_XYZ v2 = v;
+      aT.Transforms (v2);
+
+      // Check that point is still on origin position
+      if ((v - v2).SquareModulus() > Precision::SquareConfusion())
+      {
+        // avoid reporting small coordinates
+        for (int k=1; k <= 3; k++) 
+          if (Abs (v2.Coord(k)) < Precision::Confusion())
+            v2.SetCoord (k, 0.);
+
+        isTestOk = Standard_False;
+        theDI << "Error: Euler sequence " << names[i - gp_Extrinsic_XYZ] << " is incorrect:\n";
+        theDI << "rotating by angle 90 deg around " << (anAxis == 0 ? "X" : anAxis == 1 ? "Y" : "Z") <<
+                      " converts vector (" << v.X() << ", " << v.Y() << ", " << v.Z() << ") to ("
+                        << v2.X() << ", " << v2.Y() << ", " << v2.Z() << ")\n";
+      }
+    }
+  }
+
+  // Check correspondence of enumeration and actual rotation it defines, 
+  // by comparing cumulative rotation matrix with sequence of rotations by axes
+  const Standard_Real anAngle[3] = { 0.1, 0.2, 0.3 };
+  for (int i = gp_Extrinsic_XYZ; i <= gp_Intrinsic_ZYZ; i++)
+  {
+    // Sequence of rotations
+    gp_Mat aR[3];
+    for (int j=0; j < 3; j++)
+    {
+      // note that current axis index is obtained by parsing of enumeration name!
+      int anAxis = names[i - gp_Extrinsic_XYZ][10 + j] - 'X';
+      Standard_ASSERT_RETURN (anAxis >=0 && anAxis <= 2, "Incorrect parsing of enumeration name", 1);
+
+      // Set point on axis corresponding to current rotation
+      // We will apply rotation around this axis
+      gp_XYZ v (0., 0., 0.);
+      v.SetCoord (anAxis + 1, 1.);
+      aR[j].SetRotation (v, anAngle[j]);
+    }
+
+    // construct cumulative transformation (differently for extrinsic and intrinsic rotations);
+    // note that we parse first symbol of the enum name to identify its type
+    gp_Mat aRot;
+    if (names[i - gp_Extrinsic_XYZ][0] == 'E') // extrinsic
+    {
+      aRot = aR[2] * aR[1] * aR[0];
+    }
+    else // intrinsic
+    {
+      aRot = aR[0] * aR[1] * aR[2];
+    }
+
+    // set the same angles in quaternion
+    aQuat.SetEulerAngles (gp_EulerSequence(i), anAngle[0], anAngle[1], anAngle[2]);
+
+    gp_Mat aRQ = aQuat.GetMatrix();
+    gp_Mat aDiff = aRQ * aRot.Inverted() - aI;
+    if (aDiff.Determinant() > 1e-5)
+    {
+      theDI << "Error: Euler angles conversion does not correspond to sequential rotations for " << names[i - gp_Extrinsic_XYZ] << "\n";
+      isTestOk = Standard_False;
+    }
+  }
+
+  // similar checkfor YawPitchRoll sequence as defined in description of #25574
+  {
+    // Start with world coordinate system
+    gp_Ax2 world;
+
+    // Perform three rotations using the yaw-pitch-roll convention.
+    // This means: rotate around the original z axis with angle alpha,
+    // then rotate around the new y axis with angle beta,
+    // then rotate around the new x axis with angle gamma.
+    alpha = 0.0 / 180.0 * M_PI;
+    beta = -35.0 / 180.0 * M_PI;
+    gamma = 90.0 / 180.0 * M_PI;
+
+    const gp_Quaternion rotationZ(world.Direction(), alpha);
+    const gp_Vec rotY = rotationZ.Multiply(world.YDirection());
+    const gp_Vec rotX = rotationZ.Multiply(world.XDirection());
+
+    const gp_Quaternion rotationY(rotY, beta);
+    const gp_Vec rotZ = rotationY.Multiply(world.Direction());
+    const gp_Vec rotRotX = rotationY.Multiply(rotX);
+
+    const gp_Quaternion rotationX(rotRotX, gamma);
+    const gp_Vec rotRotZ = rotationX.Multiply(rotZ);
+
+    gp_Ax2 result(gp_Pnt(0.0, 0.0, 0.0), rotRotZ, rotRotX);
+
+    // Now compute the Euler angles
+    gp_Trsf transformation;
+    transformation.SetDisplacement(gp_Ax2(), result);
+
+    Standard_Real computedAlpha;
+    Standard_Real computedBeta;
+    Standard_Real computedGamma;
+
+    transformation.GetRotation().GetEulerAngles(gp_YawPitchRoll, computedAlpha, computedBeta, computedGamma);
+
+    // We expect now to get the same angles as we have used for our rotations
+    if (Abs(alpha - computedAlpha) > 1e-5 || Abs(beta - computedBeta) > 1e-5 || Abs(gamma - computedGamma) > 1e-5)
+    {
+      theDI << "Error: unexpected values of Euler angles for YawPitchRoll sequence:\n";
+      theDI << "alpha: " << alpha / M_PI * 180.0 << " and computed alpha: "
+            << computedAlpha / M_PI * 180.0 << "\n";
+      theDI << "beta: " << beta / M_PI * 180.0 << " and computed beta: "
+            << computedBeta / M_PI * 180.0 << "\n";
+      theDI << "gamma: " << gamma / M_PI * 180.0 << " and computed gamma: "
+            << computedGamma / M_PI * 180.0 << "\n";
+      isTestOk = Standard_False;
+    }
+  }
+
+  // test from #25946
+  {
+    gp_Quaternion q;
+    q.Set(0.06766916507860499, 0.21848101129786085, 0.11994599260380681,0.9660744746954637);
+
+    q.GetEulerAngles(gp_Intrinsic_ZYX, alpha,beta, gamma);
+    q.GetEulerAngles(gp_Extrinsic_XYZ, alpha2,beta2,gamma2);
+
+    // gp_Intrinsic_ZYX and gp_Extrinsic_XYZ should produce the same values of angles but in opposite order
+    if (Abs(alpha - gamma2) > 1e-5 || Abs(beta - beta2) > 1e-5 || Abs(gamma - alpha2) > 1e-5)
+    {
+      theDI << "Error: Euler angles computed for gp_Intrinsic_ZYX and gp_Extrinsic_XYZ do not match:\n";
+      theDI << "alpha: " << alpha / M_PI * 180.0 << " and " << alpha2 / M_PI * 180.0 << "\n";
+      theDI << "beta: " << beta / M_PI * 180.0 << " and " << beta2 / M_PI * 180.0 << "\n";
+      theDI << "gamma: " << gamma / M_PI * 180.0 << " and " << gamma2 / M_PI * 180.0 << "\n";
+      isTestOk = Standard_False;
+    }
+  }
+
+  theDI << (isTestOk ? "Test completed" : "Test failed") << "\n";
+  return 0;
+}
+
 #include <TColGeom_Array1OfBSplineCurve.hxx>
 #include <TColStd_Array1OfReal.hxx>
 #include <TColGeom_HArray1OfBSplineCurve.hxx>
@@ -3885,7 +3903,7 @@ static Standard_Integer OCC26195 (Draw_Interpretor& theDI, Standard_Integer theA
   Standard_Boolean toPrint = Standard_False;
   if (theArgNb % 2 == 0)
   {
-    toPrint = Draw::Atoi (theArgVec[theArgNb - 1]);
+    toPrint = Draw::Atoi (theArgVec[theArgNb - 1]) != 0;
   }
 
   SelectMgr_SelectingVolumeManager* aMgr = new SelectMgr_SelectingVolumeManager();
@@ -3905,8 +3923,8 @@ static Standard_Integer OCC26195 (Draw_Interpretor& theDI, Standard_Integer theA
     aMgr->BuildSelectingVolume (aPxPnt1);
   }
   const gp_Pnt* aVerts = aMgr->GetVertices();
-  gp_Pnt aNearPnt = aMgr->GetNearPnt();
-  gp_Pnt aFarPnt  = aMgr->GetFarPnt();
+  gp_Pnt aNearPnt = aMgr->GetNearPickedPnt();
+  gp_Pnt aFarPnt  = aMgr->GetFarPickedPnt();
   BRepBuilderAPI_MakePolygon aWireBldrs[4];
 
   aWireBldrs[0].Add (gp_Pnt (aVerts[0].X(), aVerts[0].Y(), aVerts[0].Z()));
@@ -3979,17 +3997,16 @@ static Standard_Integer OCC26462 (Draw_Interpretor& theDI, Standard_Integer /*th
   Handle(AIS_InteractiveObject) aBox2 = new AIS_Shape (aBuilder2.Shape());
 
   const Handle(AIS_InteractiveContext) aCtx = ViewerTest::GetAISContext();
-  aCtx->OpenLocalContext();
-  aCtx->Display (aBox1, 0, 2);
-  aCtx->Display (aBox2, 0, 2);
+  aCtx->Display (aBox1, 0, 2, Standard_False);
+  aCtx->Display (aBox2, 0, 2, Standard_False);
   ViewerTest::CurrentView()->FitAll();
-  aCtx->SetWidth (aBox1, 3);
-  aCtx->SetWidth (aBox2, 3);
+  aCtx->SetWidth (aBox1, 3, Standard_False);
+  aCtx->SetWidth (aBox2, 3, Standard_False);
 
-  aCtx->MoveTo (305, 322, ViewerTest::CurrentView());
-  aCtx->ShiftSelect();
-  aCtx->MoveTo (103, 322, ViewerTest::CurrentView());
-  aCtx->ShiftSelect();
+  aCtx->MoveTo (305, 322, ViewerTest::CurrentView(), Standard_False);
+  aCtx->ShiftSelect (Standard_False);
+  aCtx->MoveTo (103, 322, ViewerTest::CurrentView(), Standard_False);
+  aCtx->ShiftSelect (Standard_False);
   if (aCtx->NbSelected() != 0)
   {
     theDI << "ERROR: no boxes must be selected!\n";
@@ -3998,15 +4015,15 @@ static Standard_Integer OCC26462 (Draw_Interpretor& theDI, Standard_Integer /*th
 
   aCtx->SetSelectionSensitivity (aBox1, 2, 5);
 
-  aCtx->MoveTo (305, 322, ViewerTest::CurrentView());
-  aCtx->ShiftSelect();
+  aCtx->MoveTo (305, 322, ViewerTest::CurrentView(), Standard_False);
+  aCtx->ShiftSelect (Standard_False);
   if (aCtx->NbSelected() != 1)
   {
     theDI << "ERROR: b1 was not selected\n";
     return 1;
   }
-  aCtx->MoveTo (103, 322, ViewerTest::CurrentView());
-  aCtx->ShiftSelect();
+  aCtx->MoveTo (103, 322, ViewerTest::CurrentView(), Standard_False);
+  aCtx->ShiftSelect (Standard_True);
   if (aCtx->NbSelected() != 1)
   {
     theDI << "ERROR: b2 is selected after b1's tolerance increased\n";
@@ -4643,105 +4660,278 @@ static Standard_Integer OCC26746(
   return 0;     
 }
 
-DEFINE_STANDARD_HANDLE(QABugs_VertexFilter, SelectMgr_Filter);
-class QABugs_VertexFilter: public SelectMgr_Filter
+//=======================================================================
+//function : OCC27048
+//purpose  : Calculate value of B-spline surface N times
+//=======================================================================
+static Standard_Integer OCC27048(Draw_Interpretor& theDI, Standard_Integer theArgc, const char** theArgv)
 {
-public:
-  Standard_EXPORT QABugs_VertexFilter() : SelectMgr_Filter() {}
+  if (theArgc != 5)
+  {
+    std::cout << "Incorrect number of arguments. See usage:" << std::endl;
+    theDI.PrintHelp(theArgv[0]);
+    return 1;
+  }
+
+  Handle(Geom_Surface) aSurf = DrawTrSurf::GetSurface(theArgv[1]);
+  GeomAdaptor_Surface anAdaptor(aSurf);
 
-  Standard_EXPORT virtual Standard_Boolean IsOk(const Handle(SelectMgr_EntityOwner)&) const
+  Standard_Real aU = Draw::Atof(theArgv[2]);
+  Standard_Real aV = Draw::Atof(theArgv[3]);
+  Standard_Integer aN = Draw::Atoi(theArgv[4]);
+
+  for (; aN > 0; --aN)
+    anAdaptor.Value(aU, aV);
+
+  return 0;
+}
+
+//========================================================================
+//function : OCC27065
+//purpose  : Tests overloaded method "Generated" of BRepOffsetAPI_MakePipe
+//========================================================================
+static Standard_Integer OCC27065(Draw_Interpretor& di,
+                                 Standard_Integer n, const char** a)
+{
+  if (n < 3) return 1;
+  BRep_Builder BB;
+
+  TopoDS_Shape SpineShape = DBRep::Get(a[1],TopAbs_WIRE);
+  if ( SpineShape.IsNull()) return 1;
+  TopoDS_Wire Spine = TopoDS::Wire(SpineShape);
+
+  TopoDS_Shape Profile = DBRep::Get(a[2]);
+  if ( Profile.IsNull()) return 1;
+
+  BRepOffsetAPI_MakePipe aPipeBuilder(Spine, Profile);
+  if (!aPipeBuilder.IsDone())
   {
-    return Standard_False;
+    di << "Error: failed to create pipe\n";
+    return 1;
   }
-};
 
-//=======================================================================
-//function : BUC26658 
-//purpose  : Checks selection in the context after using a selection filter
-//=======================================================================
-static Standard_Integer BUC26658 (Draw_Interpretor& theDI,
-                                  Standard_Integer  /*theNArg*/,
-                                  const char ** theArgVal)
+  TopExp_Explorer Explo(Profile, TopAbs_SHELL);
+  TopoDS_Shape aShape;
+  TopTools_ListIteratorOfListOfShape itl;
+  if (Explo.More())
+  {
+    aShape = Explo.Current();
+    TopoDS_Compound res1;
+    BB.MakeCompound(res1);
+    itl.Initialize(aPipeBuilder.Generated(aShape));
+    for (; itl.More(); itl.Next())
+      BB.Add(res1, itl.Value());
+    DBRep::Set("res_shell", res1);
+  }
+
+  Explo.Init(Profile, TopAbs_FACE);
+  if (Explo.More())
+  {
+    aShape = Explo.Current();
+    TopoDS_Compound res2;
+    BB.MakeCompound(res2);
+    itl.Initialize(aPipeBuilder.Generated(aShape));
+    for (; itl.More(); itl.Next())
+      BB.Add(res2, itl.Value());
+    DBRep::Set("res_face", res2);
+  }
+  
+  Explo.Init(Profile, TopAbs_WIRE);
+  if (Explo.More())
+  {
+    aShape = Explo.Current();
+    TopoDS_Compound res3;
+    BB.MakeCompound(res3);
+    itl.Initialize(aPipeBuilder.Generated(aShape));
+    for (; itl.More(); itl.Next())
+      BB.Add(res3, itl.Value());
+    DBRep::Set("res_wire", res3);
+  }
+  
+  Explo.Init(Profile, TopAbs_EDGE);
+  if (Explo.More())
+  {
+    aShape = Explo.Current();
+    TopoDS_Compound res4;
+    BB.MakeCompound(res4);
+    itl.Initialize(aPipeBuilder.Generated(aShape));
+    for (; itl.More(); itl.Next())
+      BB.Add(res4, itl.Value());
+    DBRep::Set("res_edge", res4);
+  }
+  
+  Explo.Init(Profile, TopAbs_VERTEX);
+  if (Explo.More())
+  {
+    aShape = Explo.Current();
+    TopoDS_Compound res5;
+    BB.MakeCompound(res5);
+    itl.Initialize(aPipeBuilder.Generated(aShape));
+    for (; itl.More(); itl.Next())
+      BB.Add(res5, itl.Value());
+    DBRep::Set("res_vertex", res5);
+  }
+  
+  return 0;
+}
+
+//========================================================================
+//function : OCC27318
+//purpose  : Creates a box that is not listed in map of AIS objects of ViewerTest
+//========================================================================
+static Standard_Integer OCC27318 (Draw_Interpretor& /*theDI*/, Standard_Integer /*theArgc*/, const char** theArgv)
 {
-  Handle(AIS_InteractiveContext) aContext = ViewerTest::GetAISContext();
-  if(aContext.IsNull()) {
-    theDI << "use 'vinit' command before " << theArgVal[0] << "\n";
+  const Handle(AIS_InteractiveContext)& aCtx = ViewerTest::GetAISContext();
+  if (aCtx.IsNull())
+  {
+    std::cout << "No interactive context. Use 'vinit' command before " << theArgv[0] << "\n";
     return 1;
   }
 
-  TopoDS_Shape aBoxShape = BRepPrimAPI_MakeBox(20,20,20).Shape();
-  Handle(AIS_Shape) anAISIO = new AIS_Shape(aBoxShape);
-
-  // visualization of the box in the local mode with possibility to
-  // select box vertices
-  aContext->OpenLocalContext();
-
-  int aDispMode = 0;// wireframe
-  anAISIO->SetDisplayMode(aDispMode);
-  aContext->Display(anAISIO, aDispMode, 0, false, true, AIS_DS_Displayed); 
-  theDI.Eval(" vfit");
-
-  aContext->Load(anAISIO, -1, true); /// load allowing decomposition
-  aContext->Deactivate(anAISIO);
-  aContext->Activate(anAISIO, AIS_Shape::SelectionMode(TopAbs_VERTEX), false);
-  aContext->UpdateCurrentViewer();
-
-  // select a point on the box
-  Handle(V3d_View) myV3dView = ViewerTest::CurrentView();
-  double Xv,Yv;
-  myV3dView->Project(20,20,0,Xv,Yv);
-  Standard_Integer Xp,Yp;
-  myV3dView->Convert(Xv,Yv,Xp,Yp);
-
-  aContext->MoveTo(Xp,Yp, myV3dView);
-  aContext->Select();
-  bool aHasSelected = false;
-  for (aContext->InitSelected(); aContext->MoreSelected() && !aHasSelected; aContext->NextSelected()) {
-    Handle(AIS_InteractiveObject) anIO = aContext->SelectedInteractive();
-    if (!anIO.IsNull()) {
-      const TopoDS_Shape aShape = aContext->SelectedShape();
-      if (!aShape.IsNull() && aShape.ShapeType() == TopAbs_VERTEX)
-        aHasSelected = true;
-    }
+  TopoDS_Shape aBox = BRepPrimAPI_MakeBox (20, 20, 20).Shape();
+  Handle(AIS_Shape) aBoxObj = new AIS_Shape (aBox);
+  aCtx->Display (aBoxObj, Standard_True);
+
+  return 0;
+}
+
+//========================================================================
+//function : OCC27523
+//purpose  : Checks recomputation of deactivated selection mode after object's redisplaying
+//========================================================================
+static Standard_Integer OCC27523 (Draw_Interpretor& theDI, Standard_Integer theArgNb, const char** theArgVec)
+{
+  if (theArgNb != 1)
+  {
+    std::cerr << "Error: wrong number of arguments! See usage:\n";
+    theDI.PrintHelp (theArgVec[0]);
+    return 1;
   }
-  if (aHasSelected)
-     cout << "has selected vertex : OK"   << endl;
-  else {
-    theDI << "has selected vertex : bugged - Faulty\n";
+
+  Handle(AIS_InteractiveContext) anAISContext = ViewerTest::GetAISContext();
+  if(anAISContext.IsNull())
+  {
+    std::cerr << "Error: no active view. Please call vinit.\n";
     return 1;
   }
-  // filter to deny any selection in the viewer
-  Handle(QABugs_VertexFilter) aFilter = new QABugs_VertexFilter();
-  aContext->AddFilter(aFilter);
-
-  // update previous selection by hand
-  aContext->LocalContext()->ClearOutdatedSelection(anAISIO, true);
-
-  // check that there are no selected vertices
-  aContext->Select();
-  aHasSelected = false;
-  for (aContext->InitSelected(); aContext->MoreSelected() && !aHasSelected; aContext->NextSelected()) {
-    Handle(AIS_InteractiveObject) anIO = aContext->SelectedInteractive();
-    if (!anIO.IsNull()) {
-      const TopoDS_Shape aShape = aContext->SelectedShape();
-      if (!aShape.IsNull() && aShape.ShapeType() == TopAbs_VERTEX)
-        aHasSelected = true;
+
+  gp_Pnt aStart (100, 100, 100);
+  gp_Pnt anEnd (300, 400, 600);
+  BRepBuilderAPI_MakeEdge anEdgeBuilder (aStart, anEnd);
+  TopoDS_Edge anEdge = anEdgeBuilder.Edge();
+  Handle(AIS_InteractiveObject) aTestAISShape = new AIS_Shape (anEdge);
+  anAISContext->Display (aTestAISShape, Standard_False);
+
+  // activate it in selection modes
+  TColStd_SequenceOfInteger aModes;
+  aModes.Append (AIS_Shape::SelectionMode ((TopAbs_ShapeEnum) TopAbs_VERTEX));
+
+  anAISContext->Deactivate (aTestAISShape);
+  anAISContext->Load (aTestAISShape, -1);
+  anAISContext->Activate (aTestAISShape, 0);
+  anAISContext->Deactivate (aTestAISShape, 0);
+
+  // activate in vertices mode
+  for (Standard_Integer anIt = 1; anIt <= aModes.Length(); ++anIt)
+  {
+    anAISContext->Activate (aTestAISShape, aModes (anIt));
+  }
+
+  TopoDS_Shape aVertexShape = BRepBuilderAPI_MakeVertex (gp_Pnt (75, 0, 0));
+  TopAbs_ShapeEnum aVertexShapeType = aVertexShape.ShapeType();
+  Handle(AIS_Shape)::DownCast (aTestAISShape)->Set (aVertexShape);
+  aTestAISShape->Redisplay();
+
+  anAISContext->AddOrRemoveSelected (aTestAISShape, Standard_True);
+
+  bool aValidShapeType = false;
+  for (anAISContext->InitSelected(); anAISContext->MoreSelected(); anAISContext->NextSelected())
+  {
+    Handle(SelectMgr_EntityOwner) anOwner = anAISContext->SelectedOwner();
+    Handle(StdSelect_BRepOwner) aBRO = Handle(StdSelect_BRepOwner)::DownCast (anOwner);
+    if (!aBRO.IsNull() && aBRO->HasShape())
+    {
+      TopoDS_Shape aShape = aBRO->Shape();
+
+      aValidShapeType = aShape.ShapeType() == aVertexShapeType;
     }
   }
-  if (!aHasSelected) cout << "has no selected vertex after filter : OK"   << endl;
-  else {
-    theDI << "has no selected vertex after filter : bugged - Faulty\n";
+
+  if (!aValidShapeType)
+  {
+    std::cerr << "Error: shape type is invalid.\n";
     return 1;
   }
 
   return 0;
 }
 
-//=======================================================================
-//function : OCC26945_open
-//purpose  : Opens local context and activates given standard selection mode
-//=======================================================================
-static Standard_Integer OCC26945_open (Draw_Interpretor& theDI, Standard_Integer theArgc, const char** theArgv)
+//========================================================================
+//function : OCC27700
+//purpose  : glPolygonMode() used for frame drawing affects label text shading
+//========================================================================
+
+class OCC27700_Text : public AIS_InteractiveObject
+{
+public:
+
+  DEFINE_STANDARD_RTTI_INLINE (OCC27700_Text, AIS_InteractiveObject)
+
+  virtual void Compute (const Handle(PrsMgr_PresentationManager3d)& /*thePresentationManager*/,
+                        const Handle(Prs3d_Presentation)& thePresentation,
+                        const Standard_Integer /*theMode*/) Standard_OVERRIDE
+  {
+    Handle(Graphic3d_ArrayOfTriangles) aFrame = new Graphic3d_ArrayOfTriangles (6, 6);
+    aFrame->AddVertex (gp_Pnt (-1, 0, 0));
+    aFrame->AddVertex (gp_Pnt (-1, 1, 0));
+    aFrame->AddVertex (gp_Pnt ( 3, 1, 0));
+    aFrame->AddVertex (gp_Pnt ( 3, 0, 0));
+
+    aFrame->AddEdge (1);
+    aFrame->AddEdge (2);
+    aFrame->AddEdge (3);
+
+    aFrame->AddEdge (2);
+    aFrame->AddEdge (3);
+    aFrame->AddEdge (4);
+
+    Handle(Graphic3d_AspectFillArea3d) aFillAspect =
+      new Graphic3d_AspectFillArea3d (*myDrawer->ShadingAspect()->Aspect().get());
+    aFillAspect->SetInteriorStyle (Aspect_IS_POINT);
+
+    // create separate group for frame elements
+    Handle(Graphic3d_Group) aFrameGroup = Prs3d_Root::NewGroup (thePresentation);
+    aFrameGroup->AddPrimitiveArray (aFrame);
+    aFrameGroup->SetGroupPrimitivesAspect (aFillAspect);
+
+    // create separate group for text elements
+    Handle(Graphic3d_Group) aTextGroup = Prs3d_Root::NewGroup (thePresentation);
+    TCollection_ExtendedString aString ("YOU SHOULD SEE THIS TEXT", Standard_True);
+    Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (thePresentation), myDrawer->TextAspect(), aString, gp_Ax2 (gp::Origin(), gp::DZ()));
+  }
+
+  virtual void ComputeSelection (const Handle(SelectMgr_Selection)& /*theSelection*/,
+                                 const Standard_Integer /*theMode*/) Standard_OVERRIDE {}
+};
+
+static Standard_Integer OCC27700 (Draw_Interpretor& /*theDI*/, Standard_Integer /*theArgNb*/, const char** /*theArgVec*/)
+{
+  Handle(AIS_InteractiveContext) aContext = ViewerTest::GetAISContext();
+  if (aContext.IsNull())
+  {
+    std::cout << "Error: no view available, call 'vinit' before!" << std::endl;
+    return 1;
+  }
+  Handle(OCC27700_Text) aPresentation = new OCC27700_Text();
+  aContext->Display (aPresentation, Standard_True);
+  return 0;
+}
+
+//========================================================================
+//function : OCC27757
+//purpose  : Creates a box that has a sphere as child object and displays it
+//========================================================================
+static Standard_Integer OCC27757 (Draw_Interpretor& /*theDI*/, Standard_Integer /*theArgc*/, const char** theArgv)
 {
   const Handle(AIS_InteractiveContext)& aCtx = ViewerTest::GetAISContext();
   if (aCtx.IsNull())
@@ -4750,26 +4940,77 @@ static Standard_Integer OCC26945_open (Draw_Interpretor& theDI, Standard_Integer
     return 1;
   }
 
-  if (theArgc < 2)
+  TopoDS_Shape aBox = BRepPrimAPI_MakeBox (20.0, 20.0, 20.0).Shape();
+  TopoDS_Shape aSphere = BRepPrimAPI_MakeSphere (10.0).Shape();
+  gp_Trsf aTrsf;
+  aTrsf.SetTranslationPart (gp_Vec (20.0, 20.0, 0.0));
+  aSphere.Located (TopLoc_Location (aTrsf));
+
+
+  Handle(AIS_Shape) aBoxObj = new AIS_Shape (aBox);
+  Handle(AIS_Shape) aSphereObj = new AIS_Shape (aSphere);
+  aBoxObj->AddChild (aSphereObj);
+  aCtx->Display (aBoxObj, 1, 0, Standard_False);
+  aCtx->UpdateCurrentViewer();
+
+  return 0;
+}
+
+//========================================================================
+//function : OCC27818
+//purpose  : Creates three boxes and highlights one of them with own style
+//========================================================================
+static Standard_Integer OCC27818 (Draw_Interpretor& /*theDI*/, Standard_Integer /*theArgc*/, const char** theArgv)
+{
+  const Handle(AIS_InteractiveContext)& aCtx = ViewerTest::GetAISContext();
+  if (aCtx.IsNull())
   {
-    std::cout << "Not enough arguments. See usage:\n";
-    theDI.PrintHelp (theArgv[0]);
+    std::cout << "No interactive context. Use 'vinit' command before " << theArgv[0] << "\n";
     return 1;
   }
 
-  const TopAbs_ShapeEnum aSelType = AIS_Shape::SelectionType (Draw::Atoi (theArgv[1]));
-  Standard_Integer aLocalCtxIdx = aCtx->OpenLocalContext();
-  aCtx->ActivateStandardMode (aSelType);
-  theDI << aLocalCtxIdx;
+  Handle(AIS_Shape) aBoxObjs[3];
+  for (Standard_Integer aBoxIdx = 0; aBoxIdx < 3; ++aBoxIdx)
+  {
+    TopoDS_Shape aBox = BRepPrimAPI_MakeBox (20.0, 20.0, 20.0).Shape();
+    aBoxObjs[aBoxIdx] = new AIS_Shape (aBox);
+    gp_Trsf aTrsf;
+    aTrsf.SetTranslationPart (gp_Vec (30.0 * aBoxIdx, 30.0 * aBoxIdx, 0.0));
+    aBoxObjs[aBoxIdx]->SetLocalTransformation (aTrsf);
+    aBoxObjs[aBoxIdx]->SetHilightMode (AIS_Shaded);
+  }
+
+  {
+    Handle(Prs3d_Drawer) aHiStyle = new Prs3d_Drawer();
+    aBoxObjs[1]->SetDynamicHilightAttributes (aHiStyle);
+    aHiStyle->SetDisplayMode (AIS_Shaded);
+    aHiStyle->SetColor (Quantity_NOC_RED);
+    aHiStyle->SetTransparency (0.8f);
+  }
+  {
+    Handle(Prs3d_Drawer) aSelStyle = new Prs3d_Drawer();
+    aBoxObjs[2]->SetHilightAttributes (aSelStyle);
+    aSelStyle->SetDisplayMode (AIS_Shaded);
+    aSelStyle->SetColor (Quantity_NOC_RED);
+    aSelStyle->SetTransparency (0.0f);
+    aSelStyle->SetZLayer (Graphic3d_ZLayerId_Topmost);
+  }
+
+  for (Standard_Integer aBoxIdx = 0; aBoxIdx < 3; ++aBoxIdx)
+  {
+    aCtx->Display (aBoxObjs[aBoxIdx], AIS_Shaded, 0, Standard_False);
+  }
+
+  aCtx->UpdateCurrentViewer();
 
   return 0;
 }
 
-//=======================================================================
-//function : OCC26945_close
-//purpose  : Closes local context with the id given
-//=======================================================================
-static Standard_Integer OCC26945_close (Draw_Interpretor& theDI, Standard_Integer theArgc, const char** theArgv)
+//========================================================================
+//function : OCC27893
+//purpose  : Creates a box and selects it via AIS_InteractiveContext API
+//========================================================================
+static Standard_Integer OCC27893 (Draw_Interpretor& /*theDI*/, Standard_Integer /*theArgc*/, const char** theArgv)
 {
   const Handle(AIS_InteractiveContext)& aCtx = ViewerTest::GetAISContext();
   if (aCtx.IsNull())
@@ -4778,19 +5019,100 @@ static Standard_Integer OCC26945_close (Draw_Interpretor& theDI, Standard_Intege
     return 1;
   }
 
-  if (theArgc < 2)
+  TopoDS_Shape aBox = BRepPrimAPI_MakeBox (10.0, 10.0, 10.0).Shape();
+  Handle(AIS_InteractiveObject) aBoxObj = new AIS_Shape (aBox);
+  aCtx->Display (aBoxObj, AIS_Shaded, 0, Standard_False);
+  aCtx->SetSelected (aBoxObj, Standard_True);
+
+  return 0;
+}
+
+//========================================================================
+//function : OCC28310
+//purpose  : Tests validness of iterator in AIS_InteractiveContext after
+// an removing object from it
+//========================================================================
+static Standard_Integer OCC28310 (Draw_Interpretor& /*theDI*/, Standard_Integer /*theArgc*/, const char** theArgv)
+{
+  const Handle(AIS_InteractiveContext)& aCtx = ViewerTest::GetAISContext();
+  if (aCtx.IsNull())
   {
-    std::cout << "Not enough arguments. See usage:\n";
-    theDI.PrintHelp (theArgv[0]);
+    std::cout << "No interactive context. Use 'vinit' command before " << theArgv[0] << "\n";
     return 1;
   }
 
-  const Standard_Integer aCtxToClose = Draw::Atoi (theArgv[1]);
-  aCtx->CloseLocalContext (aCtxToClose);
+  TopoDS_Shape aBox = BRepPrimAPI_MakeBox (10.0, 10.0, 10.0).Shape();
+  Handle(AIS_InteractiveObject) aBoxObj = new AIS_Shape (aBox);
+  aCtx->Display (aBoxObj, AIS_Shaded, 0, Standard_False);
+  ViewerTest::CurrentView()->FitAll();
+  aCtx->MoveTo (200, 200, ViewerTest::CurrentView(), Standard_True);
+  aCtx->Select(Standard_True);
+
+  aCtx->Remove (aBoxObj, Standard_True);
+  // nullify the object explicitly to simulate situation in project,
+  // when ::Remove is called from another method and the object is destroyed
+  // before ::DetectedInteractive is called
+  aBoxObj.Nullify();
 
+  for (aCtx->InitDetected(); aCtx->MoreDetected(); aCtx->NextDetected())
+  {
+    Handle(AIS_InteractiveObject) anObj = aCtx->DetectedInteractive();
+  }
+
+  return 0;
+}
+
+// repetitive display and removal of multiple small objects in the viewer for 
+// test of memory leak in visualization (OCCT 6.9.0 - 7.0.0)
+static Standard_Integer OCC29412 (Draw_Interpretor& /*theDI*/, Standard_Integer theArgNb, const char** theArgVec)
+{
+  Handle(AIS_InteractiveContext) aCtx = ViewerTest::GetAISContext();
+  if (aCtx.IsNull())
+  {
+    std::cout << "Error: no active view.\n";
+    return 1;
+  }
+
+  const int aNbIters = (theArgNb <= 1 ? 10000 : Draw::Atoi (theArgVec[1]));
+  int aProgressPrev = -1;
+  for (int m_loopIndex = 0; m_loopIndex < aNbIters; m_loopIndex++)
+  {
+    gp_Pnt pos;
+    gp_Vec dir(0, 0,1);
+
+    gp_Ax2 center (pos, dir);
+    gp_Circ circle (center, 1);
+    Handle(AIS_Shape) feature;
+
+    BRepBuilderAPI_MakeEdge builder( circle );
+
+    if( builder.Error() == BRepBuilderAPI_EdgeDone )
+    {
+      TopoDS_Edge E1 = builder.Edge();
+      TopoDS_Shape W2 = BRepBuilderAPI_MakeWire(E1).Wire();
+      feature = new AIS_Shape(W2);
+      aCtx->Display (feature, true);
+    }
+
+    aCtx->CurrentViewer()->Update();
+    ViewerTest::CurrentView()->FitAll();
+    aCtx->Remove (feature, true);
+
+    const int aProgress = (m_loopIndex * 100) / aNbIters;
+    if (aProgress != aProgressPrev)
+    {
+      std::cerr << aProgress << "%\r";
+      aProgressPrev = aProgress;
+    }
+  }
   return 0;
 }
 
+//========================================================================
+//function : Commands_19
+//purpose  :
+//========================================================================
+
 void QABugs::Commands_19(Draw_Interpretor& theCommands) {
   const char *group = "QABugs";
 
@@ -4824,7 +5146,6 @@ void QABugs::Commands_19(Draw_Interpretor& theCommands) {
   theCommands.Add ("OCC24533", "OCC24533", __FILE__, OCC24533, group);
   theCommands.Add ("OCC24012", "OCC24012 face edge", __FILE__, OCC24012, group);
   theCommands.Add ("OCC24086", "OCC24086 face wire", __FILE__, OCC24086, group);
-  theCommands.Add ("OCC24622", "OCC24622 texture={1D|2D}\n Tests sourcing of 1D/2D pixmaps for AIS_TexturedShape", __FILE__, OCC24622, group);
   theCommands.Add ("OCC24667", "OCC24667 result Wire_spine Profile [Mode [Approx]], no args to get help", __FILE__, OCC24667, group);
   theCommands.Add ("OCC24755", "OCC24755", __FILE__, OCC24755, group);
   theCommands.Add ("OCC24834", "OCC24834", __FILE__, OCC24834, group);
@@ -4838,7 +5159,6 @@ void QABugs::Commands_19(Draw_Interpretor& theCommands) {
                    "OCC24925 filename [pluginLib=TKXml storageGuid retrievalGuid]"
                    "\nOCAF persistence without setting environment variables",
                    __FILE__, OCC24925, group);
-  theCommands.Add ("OCC23010", "OCC23010 STEP_file", __FILE__, OCC23010, group);
   theCommands.Add ("OCC25043", "OCC25043 shape", __FILE__, OCC25043, group);
   theCommands.Add ("OCC24826,", "This test performs simple saxpy test.\n Usage: OCC24826 length", __FILE__, OCC24826, group);
   theCommands.Add ("OCC24606", "OCC24606 : Tests ::FitAll for V3d view ('vfit' is for NIS view)", __FILE__, OCC24606, group);
@@ -4855,7 +5175,6 @@ void QABugs::Commands_19(Draw_Interpretor& theCommands) {
                    __FILE__, OCC25545, group);
   theCommands.Add ("OCC25547", "OCC25547", __FILE__, OCC25547, group);
   theCommands.Add ("OCC24881", "OCC24881 shape", __FILE__, OCC24881, group);
-  theCommands.Add ("OCC26172", "OCC26172", __FILE__, OCC26172, group);
   theCommands.Add ("xprojponf", "xprojponf p f", __FILE__, xprojponf, group);
   theCommands.Add ("OCC24923", "OCC24923", __FILE__, OCC24923, group);
   theCommands.Add ("OCC26139", "OCC26139 [-boxsize value] [-boxgrid value] [-compgrid value]", __FILE__, OCC26139, group);
@@ -4883,19 +5202,38 @@ void QABugs::Commands_19(Draw_Interpretor& theCommands) {
 
   theCommands.Add ("OCC24537", "OCC24537 [file]", __FILE__, OCC24537, group);
   theCommands.Add ("OCC26750", "OCC26750", __FILE__, OCC26750, group);
-
+  theCommands.Add ("OCC25574", "OCC25574", __FILE__, OCC25574, group);
   theCommands.Add ("OCC26746", "OCC26746 torus [toler NbCheckedPoints] ", __FILE__, OCC26746, group);
 
-  theCommands.Add ("BUC26658", "BUC26658 unexpected selection in the context using a selection filter", __FILE__, BUC26658, group);
-  theCommands.Add ("OCC26945_open",
-                   "OCC26945 selectionModeToActivate"
-                   "\n\t\t: Opens a new local context with selectionModeToActivate activated."
-                   "\n\t\t: Prints the ID of newely opened local context in case of success.",
-                   __FILE__, OCC26945_open, group);
-  theCommands.Add ("OCC26945_close",
-                   "OCC26945 localCtxToClose"
-                   "\n\t\t: Closes local context with the ID localCtxToClose",
-                   __FILE__, OCC26945_close, group);
+  theCommands.Add ("OCC27048",
+                   "OCC27048 surf U V N\nCalculate value of surface N times in the point (U, V)",
+                   __FILE__, OCC27048, group);
   
+  theCommands.Add ("OCC27065",
+                   "OCC27065 spine profile",
+                   __FILE__, OCC27065, group);
+
+  theCommands.Add ("OCC27318",
+                   "OCC27318: Creates a box that is not listed in map of AIS objects of ViewerTest",
+                   __FILE__, OCC27318, group);
+  theCommands.Add ("OCC27523",
+                   "OCC27523: Checks recomputation of deactivated selection mode after object's redisplaying",
+                   __FILE__, OCC27523, group);
+  theCommands.Add ("OCC27700",
+                   "OCC27700: Checks drawing text after setting interior style",
+                   __FILE__, OCC27700, group);
+  theCommands.Add ("OCC27757",
+                   "OCC27757: Creates a box that has a sphere as child object and displays it",
+                   __FILE__, OCC27757, group);
+  theCommands.Add ("OCC27818",
+                   "OCC27818: Creates three boxes and highlights one of them with own style",
+                   __FILE__, OCC27818, group);
+  theCommands.Add ("OCC27893",
+                   "OCC27893: Creates a box and selects it via AIS_InteractiveContext API",
+                   __FILE__, OCC27893, group);
+  theCommands.Add("OCC28310",
+                  "OCC28310: Tests validness of iterator in AIS_InteractiveContext after an removing object from it",
+                  __FILE__, OCC28310, group);
+  theCommands.Add("OCC29412", "OCC29412 [nb cycles]: test display / remove of many small objects", __FILE__, OCC29412, group);
   return;
 }