mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0026159: Visualization - revise tolerance implementation for selection
Max tolerance is now applied to all objects and entities by default; if there is an entity with a lower tolerance, selecting frustum will be recalculated for it. The ability to set sensitivity for each entity individually is moved to protected section of SelectBasics_SensitiveEntity SetPixelTolerance from AIS_InteractiveContext now sets custom tolerance that is applied to all sensitives. Added -unset option to vselprecision command to disable custom tolerances. Test case for issue #26159
This commit is contained in:
@@ -1703,6 +1703,7 @@ void AIS_InteractiveContext::redisplayPrsRecModes (const Handle(AIS_InteractiveO
|
||||
{
|
||||
theIObj->Update (aModes.Value(), Standard_False);
|
||||
}
|
||||
theIObj->UpdateSelection();
|
||||
theIObj->SetRecomputeOk();
|
||||
}
|
||||
|
||||
@@ -2590,7 +2591,10 @@ void AIS_InteractiveContext::UnsetSelectionMode (const Handle(AIS_InteractiveObj
|
||||
|
||||
//=======================================================================
|
||||
//function : SetPixelTolerance
|
||||
//purpose :
|
||||
//purpose : Disables the mechanism of adaptive tolerance calculation in
|
||||
// SelectMgr_ViewerSelector and sets the given tolerance for ALL
|
||||
// sensitive entities activated. For more information, see
|
||||
// SelectMgr_ViewerSelector.hxx
|
||||
//=======================================================================
|
||||
void AIS_InteractiveContext::SetPixelTolerance (const Standard_Real thePrecision)
|
||||
{
|
||||
@@ -2672,8 +2676,8 @@ void AIS_InteractiveContext::InitAttributes()
|
||||
aLineAspect->SetWidth (1.0);
|
||||
aLineAspect->SetTypeOfLine (Aspect_TOL_DASH);
|
||||
|
||||
// tolerance to 4 pixels...
|
||||
SetPixelTolerance();
|
||||
// tolerance to 2 pixels...
|
||||
SetPixelTolerance (2.0);
|
||||
|
||||
// Customizing the drawer for trihedrons and planes...
|
||||
Handle(Prs3d_DatumAspect) aTrihAspect = myDefaultDrawer->DatumAspect();
|
||||
|
Reference in New Issue
Block a user