1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0026462: Visualization - selection does not adapt to line width change

- added interface for changing sensitivity of a particular selection through both interactive and local context;
- added corresponding methods for changing sensitivity to SelectMgr_SelectionManager, SelectMgr_Selection and SelectBasics_SensitiveEntity;
- option -setSensitivity was implemented in vaspects Draw command;
- test case for issue #26462
This commit is contained in:
vpa
2015-08-28 22:25:45 +03:00
committed by bugmaster
parent cc5f85f8c9
commit 8a1170ad46
15 changed files with 317 additions and 20 deletions

View File

@@ -45,3 +45,15 @@ const Handle(SelectBasics_EntityOwner)& SelectBasics_SensitiveEntity::OwnerId()
{
return myOwnerId;
}
//=======================================================================
// function : SetSensitivityFactor
// purpose : Allows to manage sensitivity of a particular entity
//=======================================================================
void SelectBasics_SensitiveEntity::SetSensitivityFactor (const Standard_Integer theNewSens)
{
Standard_ASSERT_RAISE (theNewSens > 0,
"Error! Selection sensitivity have positive value.");
mySFactor = theNewSens;
}

View File

@@ -58,6 +58,9 @@ public:
//! a specific entity in selection algorithms
//! useful for small sized entities.
Standard_EXPORT Standard_Integer SensitivityFactor() const;
//! Allows to manage sensitivity of a particular sensitive entity
Standard_EXPORT void SetSensitivityFactor (const Standard_Integer theNewSens);
//! Returns the number of sub-entities or elements in
//! sensitive entity. Is used to determine if entity is
@@ -88,9 +91,6 @@ protected:
Standard_EXPORT SelectBasics_SensitiveEntity (const Handle(SelectBasics_EntityOwner)& theOwnerId);
//! Allows to manage the sensitivity of the entity
void SetSensitivityFactor (const Standard_Integer theSensFactor);
Handle(SelectBasics_EntityOwner) myOwnerId;

View File

@@ -12,15 +12,6 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
//=======================================================================
// function : SetSensitivityFactor
// purpose : Allows to manage the sensitivity of the entity
//=======================================================================
inline void SelectBasics_SensitiveEntity::SetSensitivityFactor (const Standard_Integer theSensFactor)
{
mySFactor = theSensFactor;
}
//=======================================================================
// function : SensitivityFactor
// purpose : Gets sensitivity factor for the entity