0032165: Visualization - remove obsolete method AIS_InteractiveContext::PurgeViewer()
authorkgv <kgv@opencascade.com>
Thu, 25 Feb 2021 09:41:51 +0000 (12:41 +0300)
committerbugmaster <bugmaster@opencascade.com>
Fri, 26 Feb 2021 07:56:32 +0000 (10:56 +0300)
dox/user_guides/draw_test_harness/draw_test_harness.md
src/AIS/AIS_InteractiveContext.cxx
src/AIS/AIS_InteractiveContext.hxx
src/ViewerTest/ViewerTest_ViewerCommands.cxx
tests/bugs/vis/bug2066 [deleted file]

index ae3a8db..017bb27 100644 (file)
@@ -1465,17 +1465,6 @@ vchangeselected shape
 ~~~~~
 Adds a shape to selection or removes one from it.
 
-@subsubsection occt_draw_4_2_15  vzclipping
-
-Syntax:     
-~~~~~
-vzclipping [mode] [depth width]
-~~~~~
-Gets or sets ZClipping mode, width and depth, where
- - *mode = OFF|BACK|FRONT|SLICE*
- - *depth* is a real value from segment [0,1]
- - *width* is a real value from segment [0,1]
-
 @subsubsection occt_draw_4_2_16  vnbselected
 
 Syntax:     
@@ -1484,14 +1473,6 @@ vnbselected
 ~~~~~
 Returns the number of selected objects in the interactive context.
 
-@subsubsection occt_draw_4_2_18  vpurgedisplay
-
-Syntax:     
-~~~~~
-vpurgedisplay [CollectorToo = 0|1]
-~~~~~
-Removes structures which do not belong to objects displayed in neutral point.
-
 @subsubsection occt_draw_4_2_19  vhlr
 
 Syntax:     
index cd84b02..ad09da4 100644 (file)
@@ -4049,47 +4049,6 @@ void AIS_InteractiveContext::ClearActiveSensitive (const Handle(V3d_View)& theVi
   myMainSel->ClearSensitive (theView);
 }
 
-//=======================================================================
-//function : PurgeDisplay
-//purpose  :
-//=======================================================================
-Standard_Integer AIS_InteractiveContext::PurgeDisplay()
-{
-  Standard_Integer NbStr = PurgeViewer(myMainVwr);
-  myMainVwr->Update();
-  return NbStr;
-}
-
-//=======================================================================
-//function : PurgeViewer
-//purpose  :
-//=======================================================================
-Standard_Integer AIS_InteractiveContext::PurgeViewer (const Handle(V3d_Viewer)& theViewer)
-{
-  Handle(Graphic3d_StructureManager) GSM = theViewer->StructureManager();
-  Standard_Integer aNbCleared = 0;
-  Graphic3d_MapOfStructure SOS;
-  GSM->DisplayedStructures (SOS);
-  for (Graphic3d_MapOfStructure::Iterator It(SOS); It.More();It.Next())
-  {
-    Handle(Graphic3d_Structure) G = It.Key();
-    Standard_Address anOwner = G->Owner();
-    if (anOwner == NULL)
-    {
-      G->Erase();
-      G->Clear();// it means that it is not referenced as a presentation of InterfactiveObject...
-      ++aNbCleared;
-    }
-    Handle(AIS_InteractiveObject) IO = (AIS_InteractiveObject* )anOwner;
-    if (!myObjects.IsBound (IO))
-    {
-      G->Erase();
-      ++aNbCleared;
-    }
-  }
-  return aNbCleared;
-}
-
 //=======================================================================
 //function : IsImmediateModeOn
 //purpose  :
index 125fb0e..f313834 100644 (file)
@@ -887,11 +887,6 @@ public: //! @name common properties
                                        const Standard_Boolean theIsVisibleInView,
                                        const PrsMgr_DisplayStatus theStatus = PrsMgr_DisplayStatus_None) const;
 
-  //! Clears all the structures which don't belong to objects displayed at neutral point
-  //! only effective when no Local Context is opened...
-  //! returns the number of removed  structures from the viewers.
-  Standard_EXPORT Standard_Integer PurgeDisplay();
-
   //! Return rotation gravity point.
   Standard_EXPORT virtual gp_Pnt GravityPoint (const Handle(V3d_View)& theView) const;
 
@@ -1249,8 +1244,6 @@ protected: //! @name internal methods
                                        const Standard_Boolean               theToUpdateViewer);
   
   Standard_EXPORT void InitAttributes();
-  
-  Standard_EXPORT Standard_Integer PurgeViewer (const Handle(V3d_Viewer)& Vwr);
 
   //! Helper function to unhighlight all entity owners currently highlighted with seleciton color.
   Standard_EXPORT void unselectOwners (const Handle(AIS_InteractiveObject)& theObject);
index de53e4e..5e37d27 100644 (file)
@@ -8937,30 +8937,6 @@ static Standard_Integer VNbSelected (Draw_Interpretor& di,
   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 > 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->PurgeDisplay() << "\n";
-  return 0;
-}
-
 //=======================================================================
 //function : VSetViewSize
 //purpose  :
@@ -15265,10 +15241,6 @@ void ViewerTest::ViewerCommands(Draw_Interpretor& theCommands)
     "   vzrange                - without parameters shows current values\n"
     "   vzrange [znear] [zfar] - applies provided values to view",
     __FILE__,VZRange, group);
-  theCommands.Add ("vpurgedisplay",
-    "vpurgedisplay"
-    "- removes structures which don't belong to objects displayed in neutral point",
-    __FILE__, VPurgeDisplay, group);
   theCommands.Add("vsetviewsize",
     "vsetviewsize size",
     __FILE__,VSetViewSize,group);
diff --git a/tests/bugs/vis/bug2066 b/tests/bugs/vis/bug2066
deleted file mode 100755 (executable)
index 3db5d87..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-puts "================"
-puts "OCC2066"
-puts "================"
-puts ""
-#######################################################################################
-# CRASH in AIS_InteractiveContext::PurgeViewer(const Handle(V3d_Viewer)& Vwr)
-#######################################################################################
-
-box b 10 10 10
-box b2 20 20 20 10 10 10
-vinit
-vdisplay b b2
-vfit
-verase b
-
-if [catch {vpurgedisplay} result] {
-    puts "Faulty OCC2066"
-} else {
-    puts "OK OCC2066"
-}
-
-checkview -screenshot -3d -path ${imagedir}/${test_image}.png
-