~~~~~
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:
~~~~~
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:
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 :
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;
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);
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 :
" 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);
+++ /dev/null
-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
-