From: ana Date: Thu, 15 Dec 2011 14:35:34 +0000 (+0000) Subject: Additional fix for the bug 0020944: EDF 1464 SMESH: detection of over-constrained... X-Git-Tag: V6_5_0a1~239 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=44a302322ae982588a6422a45f710069950faafd;p=modules%2Fsmesh.git Additional fix for the bug 0020944: EDF 1464 SMESH: detection of over-constrained elements of a mesh. --- diff --git a/resources/SalomeApp.xml.in b/resources/SalomeApp.xml.in index a3feab7a4..470e4a325 100644 --- a/resources/SalomeApp.xml.in +++ b/resources/SalomeApp.xml.in @@ -72,6 +72,7 @@ + diff --git a/src/OBJECT/SMESH_Actor.cxx b/src/OBJECT/SMESH_Actor.cxx index 4d5dcfd11..28cd31fc0 100644 --- a/src/OBJECT/SMESH_Actor.cxx +++ b/src/OBJECT/SMESH_Actor.cxx @@ -125,6 +125,7 @@ SMESH_ActorDef::SMESH_ActorDef() myTimeStamp = vtkTimeStamp::New(); myIsPointsVisible = false; + myIsEntityModeCache = false; myIsShrinkable = false; myIsShrunk = false; @@ -431,6 +432,7 @@ SMESH_ActorDef::SMESH_ActorDef() return; myEntityMode = eAllEntity; + myEntityModeCache = eAllEntity; // Clipping planes myImplicitBoolean = vtkImplicitBoolean::New(); @@ -827,29 +829,48 @@ SetControlMode(eControl theMode, } } - if(theCheckEntityMode){ - if(myControlActor == my1DActor) + if(theCheckEntityMode) { + if(myControlActor == my1DActor) { + if (!myIsEntityModeCache){ + myEntityModeCache = GetEntityMode(); + myIsEntityModeCache=true; + } SetEntityMode(eEdges); - else if(myControlActor == my2DActor){ - switch(myControlMode){ + } + else if(myControlActor == my2DActor) { + switch(myControlMode) { case eLength2D: case eFreeEdges: case eFreeFaces: case eMultiConnection2D: - //SetEntityMode(eEdges); + if (!myIsEntityModeCache){ + myEntityModeCache = GetEntityMode(); + myIsEntityModeCache=true; + } SetEntityMode(eFaces); break; default: + if (!myIsEntityModeCache){ + myEntityModeCache = GetEntityMode(); + myIsEntityModeCache=true; + } SetEntityMode(eFaces); } - }else if(myControlActor == my3DActor) + }else if(myControlActor == my3DActor) { + if (!myIsEntityModeCache){ + myEntityModeCache = GetEntityMode(); + myIsEntityModeCache=true; + } SetEntityMode(eVolumes); } + } } else { - if(theCheckEntityMode) - myEntityMode = eAllEntity; + if(theCheckEntityMode){ + myEntityMode = myEntityModeCache; + myIsEntityModeCache = false; + } myFunctor.reset(); } @@ -857,6 +878,7 @@ SetControlMode(eControl theMode, myTimeStamp->Modified(); Modified(); + Update(); } @@ -1611,6 +1633,11 @@ void SMESH_ActorDef::Update(){ if(myIsFacesOriented){ SetFacesOriented(myIsFacesOriented); } + + if(myVisualObj->GetEntitiesFlag()) { + myEntityMode |= myVisualObj->GetEntitiesState(); + } + SetEntityMode(GetEntityMode()); SetVisibility(GetVisibility()); diff --git a/src/OBJECT/SMESH_ActorDef.h b/src/OBJECT/SMESH_ActorDef.h index 6eec6aa2a..001806113 100644 --- a/src/OBJECT/SMESH_ActorDef.h +++ b/src/OBJECT/SMESH_ActorDef.h @@ -262,6 +262,8 @@ class SMESH_ActorDef : public SMESH_Actor unsigned int myEntityMode; unsigned int myEntityState; + unsigned int myEntityModeCache; + bool myIsEntityModeCache; bool myIsPointsVisible; bool myIsShrinkable;