mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-11-12 00:29:17 +05:00
IMP 10199 (add Volume Control). Add Volume NumericalFunctor.
This commit is contained in:
parent
52f87e4dea
commit
2875648bdb
@ -204,6 +204,42 @@ double NumericalFunctor::GetValue( long theId )
|
||||
return 0.;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : GetValue
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
double Volume::GetValue( long theElementId )
|
||||
{
|
||||
if ( theElementId && myMesh ) {
|
||||
SMDS_VolumeTool aVolumeTool;
|
||||
if ( aVolumeTool.Set( myMesh->FindElement( theElementId )))
|
||||
return aVolumeTool.GetSize();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : GetBadRate
|
||||
//purpose : meaningless as it is not quality control functor
|
||||
//=======================================================================
|
||||
|
||||
double Volume::GetBadRate( double Value, int /*nbNodes*/ ) const
|
||||
{
|
||||
return Value;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : GetType
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
SMDSAbs_ElementType Volume::GetType() const
|
||||
{
|
||||
return SMDSAbs_Volume;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Class : MinimumAngle
|
||||
Description : Functor for calculation of minimum angle
|
||||
@ -792,6 +828,7 @@ double Area::GetValue( const TSequenceOfXYZ& P )
|
||||
|
||||
double Area::GetBadRate( double Value, int /*nbNodes*/ ) const
|
||||
{
|
||||
// meaningless as it is not quality control functor
|
||||
return Value;
|
||||
}
|
||||
|
||||
@ -812,6 +849,7 @@ double Length::GetValue( const TSequenceOfXYZ& P )
|
||||
|
||||
double Length::GetBadRate( double Value, int /*nbNodes*/ ) const
|
||||
{
|
||||
// meaningless as it is not quality control functor
|
||||
return Value;
|
||||
}
|
||||
|
||||
@ -943,6 +981,7 @@ double Length2D::GetValue( long theElementId)
|
||||
|
||||
double Length2D::GetBadRate( double Value, int /*nbNodes*/ ) const
|
||||
{
|
||||
// meaningless as it is not quality control functor
|
||||
return Value;
|
||||
}
|
||||
|
||||
@ -1022,6 +1061,7 @@ double MultiConnection::GetValue( long theId )
|
||||
|
||||
double MultiConnection::GetBadRate( double Value, int /*nbNodes*/ ) const
|
||||
{
|
||||
// meaningless as it is not quality control functor
|
||||
return Value;
|
||||
}
|
||||
|
||||
@ -1099,6 +1139,7 @@ double MultiConnection2D::GetValue( long theElementId )
|
||||
|
||||
double MultiConnection2D::GetBadRate( double Value, int /*nbNodes*/ ) const
|
||||
{
|
||||
// meaningless as it is not quality control functor
|
||||
return Value;
|
||||
}
|
||||
|
||||
|
@ -93,6 +93,10 @@ namespace SMESH{
|
||||
const_reference operator[](size_type n) const;
|
||||
};
|
||||
|
||||
/*
|
||||
Class : Functor
|
||||
Description : Root of all Functors
|
||||
*/
|
||||
class Functor
|
||||
{
|
||||
public:
|
||||
@ -101,6 +105,10 @@ namespace SMESH{
|
||||
virtual SMDSAbs_ElementType GetType() const = 0;
|
||||
};
|
||||
|
||||
/*
|
||||
Class : NumericalFunctor
|
||||
Description : Root of all Functors returning numeric value
|
||||
*/
|
||||
class NumericalFunctor: public virtual Functor{
|
||||
public:
|
||||
NumericalFunctor();
|
||||
@ -122,6 +130,19 @@ namespace SMESH{
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
Class : Volume
|
||||
Description : Functor calculating volume of 3D mesh element
|
||||
*/
|
||||
class Volume: public virtual NumericalFunctor{
|
||||
public:
|
||||
virtual double GetValue( long theElementId );
|
||||
//virtual double GetValue( const TSequenceOfXYZ& thePoints );
|
||||
virtual double GetBadRate( double Value, int nbNodes ) const;
|
||||
virtual SMDSAbs_ElementType GetType() const;
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
Class : SMESH_MinimumAngle
|
||||
Description : Functor for calculation of minimum angle
|
||||
|
Loading…
Reference in New Issue
Block a user