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
double Area::GetBadRate( double Value, int /*nbNodes*/ ) const
{
+ // meaningless as it is not quality control functor
return Value;
}
double Length::GetBadRate( double Value, int /*nbNodes*/ ) const
{
+ // meaningless as it is not quality control functor
return Value;
}
double Length2D::GetBadRate( double Value, int /*nbNodes*/ ) const
{
+ // meaningless as it is not quality control functor
return Value;
}
double MultiConnection::GetBadRate( double Value, int /*nbNodes*/ ) const
{
+ // meaningless as it is not quality control functor
return Value;
}
double MultiConnection2D::GetBadRate( double Value, int /*nbNodes*/ ) const
{
+ // meaningless as it is not quality control functor
return Value;
}
const_reference operator[](size_type n) const;
};
+ /*
+ Class : Functor
+ Description : Root of all Functors
+ */
class Functor
{
public:
virtual SMDSAbs_ElementType GetType() const = 0;
};
+ /*
+ Class : NumericalFunctor
+ Description : Root of all Functors returning numeric value
+ */
class NumericalFunctor: public virtual Functor{
public:
NumericalFunctor();
};
+ /*
+ 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