1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00

0032165: Visualization - remove obsolete method AIS_InteractiveContext::PurgeViewer()

This commit is contained in:
kgv 2021-02-25 12:41:51 +03:00 committed by bugmaster
parent decbff0dfd
commit 53219061ca
5 changed files with 0 additions and 118 deletions

View 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:

View 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 :

View 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);

View 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);

View File

@ -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