mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-02-01 01:10:33 +05:00
PAL20948 EDF 1468 SMESH: Histogram of the quality controls
This commit is contained in:
parent
72832de1e2
commit
a415d418f6
@ -721,51 +721,50 @@ SetControlMode(eControl theMode,
|
|||||||
bool anIsScalarVisible = theMode > eNone;
|
bool anIsScalarVisible = theMode > eNone;
|
||||||
|
|
||||||
if(anIsScalarVisible){
|
if(anIsScalarVisible){
|
||||||
SMESH::Controls::FunctorPtr aFunctor;
|
|
||||||
switch(theMode){
|
switch(theMode){
|
||||||
case eLength:
|
case eLength:
|
||||||
{
|
{
|
||||||
SMESH::Controls::Length* aControl = new SMESH::Controls::Length();
|
SMESH::Controls::Length* aControl = new SMESH::Controls::Length();
|
||||||
aControl->SetPrecision( myControlsPrecision );
|
aControl->SetPrecision( myControlsPrecision );
|
||||||
aFunctor.reset( aControl );
|
myFunctor.reset( aControl );
|
||||||
myControlActor = my1DActor;
|
myControlActor = my1DActor;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case eLength2D:
|
case eLength2D:
|
||||||
{
|
{
|
||||||
aFunctor.reset(new SMESH::Controls::Length2D());
|
myFunctor.reset(new SMESH::Controls::Length2D());
|
||||||
myControlActor = my2DActor;
|
myControlActor = my2DActor;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case eFreeBorders:
|
case eFreeBorders:
|
||||||
aFunctor.reset(new SMESH::Controls::FreeBorders());
|
myFunctor.reset(new SMESH::Controls::FreeBorders());
|
||||||
myControlActor = my1DActor;
|
myControlActor = my1DActor;
|
||||||
break;
|
break;
|
||||||
case eFreeEdges:
|
case eFreeEdges:
|
||||||
aFunctor.reset(new SMESH::Controls::FreeEdges());
|
myFunctor.reset(new SMESH::Controls::FreeEdges());
|
||||||
myControlActor = my2DActor;
|
myControlActor = my2DActor;
|
||||||
break;
|
break;
|
||||||
case eFreeNodes:
|
case eFreeNodes:
|
||||||
aFunctor.reset(new SMESH::Controls::FreeNodes());
|
myFunctor.reset(new SMESH::Controls::FreeNodes());
|
||||||
myControlActor = myNodeActor;
|
myControlActor = myNodeActor;
|
||||||
break;
|
break;
|
||||||
case eFreeFaces:
|
case eFreeFaces:
|
||||||
aFunctor.reset(new SMESH::Controls::FreeFaces());
|
myFunctor.reset(new SMESH::Controls::FreeFaces());
|
||||||
myControlActor = my2DActor;
|
myControlActor = my2DActor;
|
||||||
break;
|
break;
|
||||||
case eMultiConnection:
|
case eMultiConnection:
|
||||||
aFunctor.reset(new SMESH::Controls::MultiConnection());
|
myFunctor.reset(new SMESH::Controls::MultiConnection());
|
||||||
myControlActor = my1DActor;
|
myControlActor = my1DActor;
|
||||||
break;
|
break;
|
||||||
case eMultiConnection2D:
|
case eMultiConnection2D:
|
||||||
aFunctor.reset(new SMESH::Controls::MultiConnection2D());
|
myFunctor.reset(new SMESH::Controls::MultiConnection2D());
|
||||||
myControlActor = my2DActor;
|
myControlActor = my2DActor;
|
||||||
break;
|
break;
|
||||||
case eArea:
|
case eArea:
|
||||||
{
|
{
|
||||||
SMESH::Controls::Area* aControl = new SMESH::Controls::Area();
|
SMESH::Controls::Area* aControl = new SMESH::Controls::Area();
|
||||||
aControl->SetPrecision( myControlsPrecision );
|
aControl->SetPrecision( myControlsPrecision );
|
||||||
aFunctor.reset( aControl );
|
myFunctor.reset( aControl );
|
||||||
myControlActor = my2DActor;
|
myControlActor = my2DActor;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -773,7 +772,7 @@ SetControlMode(eControl theMode,
|
|||||||
{
|
{
|
||||||
SMESH::Controls::Taper* aControl = new SMESH::Controls::Taper();
|
SMESH::Controls::Taper* aControl = new SMESH::Controls::Taper();
|
||||||
aControl->SetPrecision( myControlsPrecision );
|
aControl->SetPrecision( myControlsPrecision );
|
||||||
aFunctor.reset( aControl );
|
myFunctor.reset( aControl );
|
||||||
myControlActor = my2DActor;
|
myControlActor = my2DActor;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -781,7 +780,7 @@ SetControlMode(eControl theMode,
|
|||||||
{
|
{
|
||||||
SMESH::Controls::AspectRatio* aControl = new SMESH::Controls::AspectRatio();
|
SMESH::Controls::AspectRatio* aControl = new SMESH::Controls::AspectRatio();
|
||||||
aControl->SetPrecision( myControlsPrecision );
|
aControl->SetPrecision( myControlsPrecision );
|
||||||
aFunctor.reset( aControl );
|
myFunctor.reset( aControl );
|
||||||
myControlActor = my2DActor;
|
myControlActor = my2DActor;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -789,7 +788,7 @@ SetControlMode(eControl theMode,
|
|||||||
{
|
{
|
||||||
SMESH::Controls::AspectRatio3D* aControl = new SMESH::Controls::AspectRatio3D();
|
SMESH::Controls::AspectRatio3D* aControl = new SMESH::Controls::AspectRatio3D();
|
||||||
aControl->SetPrecision( myControlsPrecision );
|
aControl->SetPrecision( myControlsPrecision );
|
||||||
aFunctor.reset( aControl );
|
myFunctor.reset( aControl );
|
||||||
myControlActor = my3DActor;
|
myControlActor = my3DActor;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -797,7 +796,7 @@ SetControlMode(eControl theMode,
|
|||||||
{
|
{
|
||||||
SMESH::Controls::Volume* aControl = new SMESH::Controls::Volume();
|
SMESH::Controls::Volume* aControl = new SMESH::Controls::Volume();
|
||||||
aControl->SetPrecision( myControlsPrecision );
|
aControl->SetPrecision( myControlsPrecision );
|
||||||
aFunctor.reset( aControl );
|
myFunctor.reset( aControl );
|
||||||
myControlActor = my3DActor;
|
myControlActor = my3DActor;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -805,7 +804,7 @@ SetControlMode(eControl theMode,
|
|||||||
{
|
{
|
||||||
SMESH::Controls::MaxElementLength2D* aControl = new SMESH::Controls::MaxElementLength2D();
|
SMESH::Controls::MaxElementLength2D* aControl = new SMESH::Controls::MaxElementLength2D();
|
||||||
aControl->SetPrecision( myControlsPrecision );
|
aControl->SetPrecision( myControlsPrecision );
|
||||||
aFunctor.reset( aControl );
|
myFunctor.reset( aControl );
|
||||||
myControlActor = my2DActor;
|
myControlActor = my2DActor;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -813,7 +812,7 @@ SetControlMode(eControl theMode,
|
|||||||
{
|
{
|
||||||
SMESH::Controls::MaxElementLength3D* aControl = new SMESH::Controls::MaxElementLength3D();
|
SMESH::Controls::MaxElementLength3D* aControl = new SMESH::Controls::MaxElementLength3D();
|
||||||
aControl->SetPrecision( myControlsPrecision );
|
aControl->SetPrecision( myControlsPrecision );
|
||||||
aFunctor.reset( aControl );
|
myFunctor.reset( aControl );
|
||||||
myControlActor = my3DActor;
|
myControlActor = my3DActor;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -821,7 +820,7 @@ SetControlMode(eControl theMode,
|
|||||||
{
|
{
|
||||||
SMESH::Controls::MinimumAngle* aControl = new SMESH::Controls::MinimumAngle();
|
SMESH::Controls::MinimumAngle* aControl = new SMESH::Controls::MinimumAngle();
|
||||||
aControl->SetPrecision( myControlsPrecision );
|
aControl->SetPrecision( myControlsPrecision );
|
||||||
aFunctor.reset( aControl );
|
myFunctor.reset( aControl );
|
||||||
myControlActor = my2DActor;
|
myControlActor = my2DActor;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -829,7 +828,7 @@ SetControlMode(eControl theMode,
|
|||||||
{
|
{
|
||||||
SMESH::Controls::Warping* aControl = new SMESH::Controls::Warping();
|
SMESH::Controls::Warping* aControl = new SMESH::Controls::Warping();
|
||||||
aControl->SetPrecision( myControlsPrecision );
|
aControl->SetPrecision( myControlsPrecision );
|
||||||
aFunctor.reset( aControl );
|
myFunctor.reset( aControl );
|
||||||
myControlActor = my2DActor;
|
myControlActor = my2DActor;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -837,7 +836,7 @@ SetControlMode(eControl theMode,
|
|||||||
{
|
{
|
||||||
SMESH::Controls::Skew* aControl = new SMESH::Controls::Skew();
|
SMESH::Controls::Skew* aControl = new SMESH::Controls::Skew();
|
||||||
aControl->SetPrecision( myControlsPrecision );
|
aControl->SetPrecision( myControlsPrecision );
|
||||||
aFunctor.reset( aControl );
|
myFunctor.reset( aControl );
|
||||||
myControlActor = my2DActor;
|
myControlActor = my2DActor;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -851,21 +850,21 @@ SetControlMode(eControl theMode,
|
|||||||
myControlMode = theMode;
|
myControlMode = theMode;
|
||||||
switch(myControlMode){
|
switch(myControlMode){
|
||||||
case eFreeNodes:
|
case eFreeNodes:
|
||||||
myNodeExtActor->SetExtControlMode(aFunctor);
|
myNodeExtActor->SetExtControlMode(myFunctor);
|
||||||
break;
|
break;
|
||||||
case eFreeEdges:
|
case eFreeEdges:
|
||||||
case eFreeBorders:
|
case eFreeBorders:
|
||||||
my1DExtActor->SetExtControlMode(aFunctor);
|
my1DExtActor->SetExtControlMode(myFunctor);
|
||||||
break;
|
break;
|
||||||
case eFreeFaces:
|
case eFreeFaces:
|
||||||
my2DExtActor->SetExtControlMode(aFunctor);
|
my2DExtActor->SetExtControlMode(myFunctor);
|
||||||
break;
|
break;
|
||||||
case eLength2D:
|
case eLength2D:
|
||||||
case eMultiConnection2D:
|
case eMultiConnection2D:
|
||||||
my1DExtActor->SetExtControlMode(aFunctor,myScalarBarActor,myLookupTable);
|
my1DExtActor->SetExtControlMode(myFunctor,myScalarBarActor,myLookupTable);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
myControlActor->SetControlMode(aFunctor,myScalarBarActor,myLookupTable);
|
myControlActor->SetControlMode(myFunctor,myScalarBarActor,myLookupTable);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -888,8 +887,11 @@ SetControlMode(eControl theMode,
|
|||||||
SetEntityMode(eVolumes);
|
SetEntityMode(eVolumes);
|
||||||
}
|
}
|
||||||
|
|
||||||
}else if(theCheckEntityMode){
|
}
|
||||||
|
else {
|
||||||
|
if(theCheckEntityMode)
|
||||||
myEntityMode = eAllEntity;
|
myEntityMode = eAllEntity;
|
||||||
|
myFunctor.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
SetRepresentation(GetRepresentation());
|
SetRepresentation(GetRepresentation());
|
||||||
|
@ -119,6 +119,7 @@ class SMESHOBJECT_EXPORT SMESH_Actor: public SALOME_Actor
|
|||||||
eMaxElementLength2D, eMaxElementLength3D};
|
eMaxElementLength2D, eMaxElementLength3D};
|
||||||
virtual void SetControlMode(eControl theMode) = 0;
|
virtual void SetControlMode(eControl theMode) = 0;
|
||||||
virtual eControl GetControlMode() = 0;
|
virtual eControl GetControlMode() = 0;
|
||||||
|
virtual SMESH::Controls::FunctorPtr GetFunctor() = 0;
|
||||||
|
|
||||||
virtual vtkScalarBarActor* GetScalarBarActor() = 0;
|
virtual vtkScalarBarActor* GetScalarBarActor() = 0;
|
||||||
|
|
||||||
|
@ -185,6 +185,7 @@ class SMESH_ActorDef : public SMESH_Actor
|
|||||||
|
|
||||||
virtual void SetControlMode(eControl theMode);
|
virtual void SetControlMode(eControl theMode);
|
||||||
virtual eControl GetControlMode(){ return myControlMode;}
|
virtual eControl GetControlMode(){ return myControlMode;}
|
||||||
|
virtual SMESH::Controls::FunctorPtr GetFunctor() { return myFunctor; }
|
||||||
|
|
||||||
virtual vtkScalarBarActor* GetScalarBarActor(){ return myScalarBarActor;}
|
virtual vtkScalarBarActor* GetScalarBarActor(){ return myScalarBarActor;}
|
||||||
|
|
||||||
@ -235,6 +236,7 @@ class SMESH_ActorDef : public SMESH_Actor
|
|||||||
SMESH_DeviceActor* myHighlitableActor;
|
SMESH_DeviceActor* myHighlitableActor;
|
||||||
|
|
||||||
eControl myControlMode;
|
eControl myControlMode;
|
||||||
|
SMESH::Controls::FunctorPtr myFunctor;
|
||||||
vtkProperty* my2DExtProp;
|
vtkProperty* my2DExtProp;
|
||||||
SMESH_DeviceActor* my2DActor;
|
SMESH_DeviceActor* my2DActor;
|
||||||
SMESH_DeviceActor* my2DExtActor;
|
SMESH_DeviceActor* my2DExtActor;
|
||||||
|
Loading…
Reference in New Issue
Block a user