-// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#include "SMESH_TypeDefs.hxx"
-#include <BRepClass3d_SolidClassifier.hxx>
#include <Bnd_B3d.hxx>
#include <GeomAPI_ProjectPointOnCurve.hxx>
#include <GeomAPI_ProjectPointOnSurf.hxx>
class SMESHDS_SubMesh;
class SMESHDS_GroupBase;
+class BRepClass3d_SolidClassifier;
+class ShapeAnalysis_Surface;
+class gp_Pln;
class gp_Pnt;
namespace SMESH{
NumericalFunctor();
virtual void SetMesh( const SMDS_Mesh* theMesh );
virtual double GetValue( long theElementId );
- virtual double GetValue(const TSequenceOfXYZ& thePoints) { return -1.0;};
+ virtual double GetValue(const TSequenceOfXYZ& /*thePoints*/) { return -1.0;};
void GetHistogram(int nbIntervals,
std::vector<int>& nbEvents,
std::vector<double>& funValues,
const std::vector<int>& elements,
const double* minmax=0,
const bool isLogarithmic = false);
+ bool IsApplicable( long theElementId ) const;
+ virtual bool IsApplicable( const SMDS_MeshElement* element ) const;
virtual SMDSAbs_ElementType GetType() const = 0;
virtual double GetBadRate( double Value, int nbNodes ) const = 0;
long GetPrecision() const;
virtual double GetBadRate( double Value, int nbNodes ) const;
virtual SMDSAbs_ElementType GetType() const;
};
-
-
+
+
/*
Class : MaxElementLength3D
Description : Functor calculating maximum length of 3D element
virtual double GetValue( const TSequenceOfXYZ& thePoints );
virtual double GetBadRate( double Value, int nbNodes ) const;
virtual SMDSAbs_ElementType GetType() const;
+ virtual bool IsApplicable( const SMDS_MeshElement* element ) const;
};
virtual double GetValue( const TSequenceOfXYZ& thePoints );
virtual double GetBadRate( double Value, int nbNodes ) const;
virtual SMDSAbs_ElementType GetType() const;
+ virtual bool IsApplicable( const SMDS_MeshElement* element ) const;
};
virtual double GetValue( const TSequenceOfXYZ& thePoints );
virtual double GetBadRate( double Value, int nbNodes ) const;
virtual SMDSAbs_ElementType GetType() const;
-
+ virtual bool IsApplicable( const SMDS_MeshElement* element ) const;
+
private:
double ComputeA( const gp_XYZ&, const gp_XYZ&, const gp_XYZ&, const gp_XYZ& ) const;
};
virtual double GetValue( const TSequenceOfXYZ& thePoints );
virtual double GetBadRate( double Value, int nbNodes ) const;
virtual SMDSAbs_ElementType GetType() const;
+ virtual bool IsApplicable( const SMDS_MeshElement* element ) const;
};
/*
virtual double GetValue( const TSequenceOfXYZ& thePoints );
virtual double GetBadRate( double Value, int nbNodes ) const;
virtual SMDSAbs_ElementType GetType() const;
+ virtual bool IsApplicable( const SMDS_MeshElement* element ) const;
};
/*
Class : Length2D
- Description : Functor for calculating length of edge
+ Description : Functor for calculating minimal length of edges of element
*/
class SMESHCONTROLS_EXPORT Length2D: public virtual NumericalFunctor{
public:
- virtual double GetValue( long theElementId );
+ Length2D( SMDSAbs_ElementType type = SMDSAbs_Face );
+ virtual bool IsApplicable( const SMDS_MeshElement* element ) const;
+ virtual double GetValue( const TSequenceOfXYZ& thePoints );
virtual double GetBadRate( double Value, int nbNodes ) const;
virtual SMDSAbs_ElementType GetType() const;
struct Value{
};
typedef std::set<Value> TValues;
void GetValues(TValues& theValues);
+
+ private:
+ SMDSAbs_ElementType myType;
};
typedef boost::shared_ptr<Length2D> Length2DPtr;
+ /*
+ Class : Length2D
+ Description : Functor for calculating minimal length of edges of 3D element
+ */
+ class SMESHCONTROLS_EXPORT Length3D: public virtual Length2D {
+ public:
+ Length3D();
+ };
+ typedef boost::shared_ptr<Length3D> Length3DPtr;
+
+ /*
+ Class : Deflection2D
+ Description : Functor for calculating distance between a face and geometry
+ */
+ class SMESHCONTROLS_EXPORT Deflection2D: public virtual NumericalFunctor{
+ public:
+ virtual void SetMesh( const SMDS_Mesh* theMesh );
+ virtual double GetValue( const TSequenceOfXYZ& thePoints );
+ virtual double GetBadRate( double Value, int nbNodes ) const;
+ virtual SMDSAbs_ElementType GetType() const;
+ private:
+ Handle(ShapeAnalysis_Surface) mySurface;
+ int myShapeIndex;
+ boost::shared_ptr<gp_Pln> myPlane;
+ };
+
/*
Class : MultiConnection
Description : Functor for calculating number of faces connected to the edge
virtual bool IsSatisfy( long theElementId );
virtual SMDSAbs_ElementType GetType() const;
- void SetTolerance (const double theToler) { myToler = theToler; }
+ void SetTolerance (const double theToler);
double GetTolerance () const { return myToler; }
private:
~ManifoldPart();
//virtual Predicate* clone() const { return new ManifoldPart( *this ); }
virtual void SetMesh( const SMDS_Mesh* theMesh );
- // inoke when all parameters already set
+ // invoke when all parameters already set
virtual bool IsSatisfy( long theElementId );
virtual SMDSAbs_ElementType GetType() const;
virtual
void
- GetElementsId( const SMDS_Mesh* theMesh,
- TIdSequence& theSequence );
+ GetElementsId( const SMDS_Mesh* theMesh,
+ TIdSequence& theSequence,
+ SMDS_ElemIteratorPtr theElements=0);
static
void
- GetElementsId( const SMDS_Mesh* theMesh,
- PredicatePtr thePredicate,
- TIdSequence& theSequence );
+ GetElementsId( const SMDS_Mesh* theMesh,
+ PredicatePtr thePredicate,
+ TIdSequence& theSequence,
+ SMDS_ElemIteratorPtr theElements=0 );
protected:
PredicatePtr myPredicate;
};
- };
-};
+ }
+}
#endif