}
+void SMESH_ActorDef::SetControl(SMESH::Controls::FunctorPtr theFunctor)
+{
+ myFunctor = theFunctor;
+ if ( !theFunctor )
+ SetControlMode( eNone, true );
+ else
+ SetControlMode( eCustomControl, true );
+}
+
void SMESH_ActorDef::SetControlMode(eControl theMode)
{
SetControlMode(theMode,true);
}
-
void SMESH_ActorDef::SetControlMode( eControl theMode, bool theCheckEntityMode )
{
vtkLookupTable* lookupTable = static_cast<vtkLookupTable*>(myScalarBarActor->GetLookupTable());
myControlActor = myNodeActor;
break;
}
+ case eCustomControl:
+ {
+ if ( !myFunctor )
+ return;
+ switch ( myFunctor->GetType() ) {
+ case SMDSAbs_Node : myControlActor = myNodeActor; break;
+ case SMDSAbs_Edge : myControlActor = my1DActor; break;
+ case SMDSAbs_Face : myControlActor = my2DActor; break;
+ case SMDSAbs_Volume : myControlActor = my3DActor; break;
+ default : return;
+ }
+ break;
+ }
default:
return;
}
eMinimumAngle, eWarping, eSkew, eAspectRatio3D, eMultiConnection2D, eVolume3D,
eMaxElementLength2D, eMaxElementLength3D, eBareBorderFace, eBareBorderVolume,
eOverConstrainedFace, eOverConstrainedVolume, eCoincidentNodes,
- eCoincidentElems1D, eCoincidentElems2D, eCoincidentElems3D, eNodeConnectivityNb };
+ eCoincidentElems1D, eCoincidentElems2D, eCoincidentElems3D, eNodeConnectivityNb,
+ eCustomControl };
virtual void SetControlMode(eControl theMode) = 0;
+ virtual void SetControl(SMESH::Controls::FunctorPtr) = 0;
virtual eControl GetControlMode() = 0;
virtual SMESH::Controls::FunctorPtr GetFunctor() = 0;
virtual int GetNumberControlEntities() = 0;
virtual bool GetFacesOrientation3DVectors();
virtual void SetControlMode(eControl theMode);
+ virtual void SetControl(SMESH::Controls::FunctorPtr theFunctor);
virtual int GetNumberControlEntities();
virtual eControl GetControlMode(){ return myControlMode;}
virtual SMESH::Controls::FunctorPtr GetFunctor() { return myFunctor; }