Additional fix for the bug 0020944: EDF 1464 SMESH: detection of over-constrained elements of a mesh.

This commit is contained in:
ana 2011-12-15 14:35:34 +00:00
parent 6665afd414
commit 44a302322a
3 changed files with 38 additions and 8 deletions

View File

@ -72,6 +72,7 @@
<parameter name="DisplayMode" value="true" /> <parameter name="DisplayMode" value="true" />
<parameter name="auto_update" value="true" /> <parameter name="auto_update" value="true" />
<parameter name="update_limit" value="500000" /> <parameter name="update_limit" value="500000" />
<parameter name="display_entity" value="true" />
<parameter name="display_mode" value="1" /> <parameter name="display_mode" value="1" />
<parameter name="auto_groups" value="false"/> <parameter name="auto_groups" value="false"/>
<parameter name="show_result_notification" value="2"/> <parameter name="show_result_notification" value="2"/>

View File

@ -125,6 +125,7 @@ SMESH_ActorDef::SMESH_ActorDef()
myTimeStamp = vtkTimeStamp::New(); myTimeStamp = vtkTimeStamp::New();
myIsPointsVisible = false; myIsPointsVisible = false;
myIsEntityModeCache = false;
myIsShrinkable = false; myIsShrinkable = false;
myIsShrunk = false; myIsShrunk = false;
@ -431,6 +432,7 @@ SMESH_ActorDef::SMESH_ActorDef()
return; return;
myEntityMode = eAllEntity; myEntityMode = eAllEntity;
myEntityModeCache = eAllEntity;
// Clipping planes // Clipping planes
myImplicitBoolean = vtkImplicitBoolean::New(); myImplicitBoolean = vtkImplicitBoolean::New();
@ -827,29 +829,48 @@ SetControlMode(eControl theMode,
} }
} }
if(theCheckEntityMode){ if(theCheckEntityMode) {
if(myControlActor == my1DActor) if(myControlActor == my1DActor) {
if (!myIsEntityModeCache){
myEntityModeCache = GetEntityMode();
myIsEntityModeCache=true;
}
SetEntityMode(eEdges); SetEntityMode(eEdges);
else if(myControlActor == my2DActor){ }
switch(myControlMode){ else if(myControlActor == my2DActor) {
switch(myControlMode) {
case eLength2D: case eLength2D:
case eFreeEdges: case eFreeEdges:
case eFreeFaces: case eFreeFaces:
case eMultiConnection2D: case eMultiConnection2D:
//SetEntityMode(eEdges); if (!myIsEntityModeCache){
myEntityModeCache = GetEntityMode();
myIsEntityModeCache=true;
}
SetEntityMode(eFaces); SetEntityMode(eFaces);
break; break;
default: default:
if (!myIsEntityModeCache){
myEntityModeCache = GetEntityMode();
myIsEntityModeCache=true;
}
SetEntityMode(eFaces); SetEntityMode(eFaces);
} }
}else if(myControlActor == my3DActor) }else if(myControlActor == my3DActor) {
if (!myIsEntityModeCache){
myEntityModeCache = GetEntityMode();
myIsEntityModeCache=true;
}
SetEntityMode(eVolumes); SetEntityMode(eVolumes);
} }
}
} }
else { else {
if(theCheckEntityMode) if(theCheckEntityMode){
myEntityMode = eAllEntity; myEntityMode = myEntityModeCache;
myIsEntityModeCache = false;
}
myFunctor.reset(); myFunctor.reset();
} }
@ -857,6 +878,7 @@ SetControlMode(eControl theMode,
myTimeStamp->Modified(); myTimeStamp->Modified();
Modified(); Modified();
Update();
} }
@ -1611,6 +1633,11 @@ void SMESH_ActorDef::Update(){
if(myIsFacesOriented){ if(myIsFacesOriented){
SetFacesOriented(myIsFacesOriented); SetFacesOriented(myIsFacesOriented);
} }
if(myVisualObj->GetEntitiesFlag()) {
myEntityMode |= myVisualObj->GetEntitiesState();
}
SetEntityMode(GetEntityMode()); SetEntityMode(GetEntityMode());
SetVisibility(GetVisibility()); SetVisibility(GetVisibility());

View File

@ -262,6 +262,8 @@ class SMESH_ActorDef : public SMESH_Actor
unsigned int myEntityMode; unsigned int myEntityMode;
unsigned int myEntityState; unsigned int myEntityState;
unsigned int myEntityModeCache;
bool myIsEntityModeCache;
bool myIsPointsVisible; bool myIsPointsVisible;
bool myIsShrinkable; bool myIsShrinkable;