return 0;
}
+//=======================================================================
+//function : OCC26284
+//purpose :
+//=======================================================================
+static Standard_Integer OCC26284 (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;
+ }
+
+ 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);
+ 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->RecomputeSelectionOnly (aSphere);
+
+ return 0;
+}
+
#include <IntTools_Context.hxx>
#include <GeomAPI_ProjectPointOnSurf.hxx>
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);
+ theCommands.Add ("OCC26284", "OCC26284", __FILE__, OCC26284, group);
return;
}
{
for (PrsMgr_ListOfPresentableObjectsIter anChildrenIter (theObj->Children()); anChildrenIter.More(); anChildrenIter.Next())
{
- ClearSelectionStructures (theObj, theMode, theSelector);
+ ClearSelectionStructures (Handle(SelectMgr_SelectableObject)::DownCast (anChildrenIter.Value()), theMode, theSelector);
}
if (!theObj->HasOwnPresentations())
{
for (PrsMgr_ListOfPresentableObjectsIter anChildrenIter (theObj->Children()); anChildrenIter.More(); anChildrenIter.Next())
{
- RestoreSelectionStructures (theObj, theMode, theSelector);
+ RestoreSelectionStructures (Handle(SelectMgr_SelectableObject)::DownCast (anChildrenIter.Value()), theMode, theSelector);
}
if (!theObj->HasOwnPresentations())
for(theObject->Init(); theObject->More(); theObject->Next())
{
const Handle(SelectMgr_Selection)& aSelection = theObject->CurrentSelection();
- aSelection->UpdateStatus (SelectMgr_TOU_Full);
Standard_Integer aSelMode = aSelection->Mode();
for (TColStd_MapIteratorOfMapOfTransient aSelectorIter (mySelectors); aSelectorIter.More(); aSelectorIter.Next())
const Handle(SelectMgr_ViewerSelector)& aCurSelector = Handle(SelectMgr_ViewerSelector)::DownCast (aSelectorIter.Key());
if (aCurSelector->Status (aSelection) == SelectMgr_SOS_Activated)
{
- switch (aSelection->UpdateStatus())
- {
- case SelectMgr_TOU_Full:
ClearSelectionStructures (theObject, aSelMode, aCurSelector);
theObject->RecomputePrimitives(aSelMode);
RestoreSelectionStructures (theObject, aSelMode, aCurSelector);
- case SelectMgr_TOU_Partial:
- theObject->UpdateTransformations (aSelection);
- aCurSelector->RebuildObjectsTree();
- aSelection->UpdateBVHStatus (SelectMgr_TBU_None);
- break;
- default:
- break;
- }
- aSelection->UpdateStatus (SelectMgr_TOU_None);
}
}
+ aSelection->UpdateStatus (SelectMgr_TOU_None);
+ aSelection->UpdateBVHStatus (SelectMgr_TBU_None);
}
}
--- /dev/null
+puts "========"
+puts "OCC26284"
+puts "========"
+puts ""
+##################################################################
+puts "Visualization - eliminate recursion in SelectMgr_SelectionManager"
+##################################################################
+
+pload QAcommands VISUALIZATION
+
+vinit
+OCC26284
+
+vfit
+set only_screen 1