-namespace Controls
-{
-
-/*
- Class : BelongToGeom
- Description : Predicate for verifying whether entiy belong to
- specified geometrical support
-*/
-class BelongToGeom: public virtual Predicate
-{
-public:
- BelongToGeom();
-
- virtual void SetMesh( SMDS_Mesh* theMesh );
- virtual void SetGeom( const TopoDS_Shape& theShape );
-
- virtual bool IsSatisfy( long theElementId );
-
- virtual void SetType( SMDSAbs_ElementType theType );
- virtual SMDSAbs_ElementType GetType() const;
-
- TopoDS_Shape GetShape();
- SMESHDS_Mesh* GetMeshDS();
-
-private:
- TopoDS_Shape myShape;
- SMESHDS_Mesh* myMeshDS;
- SMDSAbs_ElementType myType;
-};
-typedef boost::shared_ptr<BelongToGeom> BelongToGeomPtr;
-
-/*
- Class : LyingOnGeom
- Description : Predicate for verifying whether entiy lying or partially lying on
- specified geometrical support
-*/
-class LyingOnGeom: public virtual Predicate
-{
-public:
- LyingOnGeom();
-
- virtual void SetMesh( SMDS_Mesh* theMesh );
- virtual void SetGeom( const TopoDS_Shape& theShape );
-
- virtual bool IsSatisfy( long theElementId );
-
- virtual void SetType( SMDSAbs_ElementType theType );
- virtual SMDSAbs_ElementType GetType() const;
-
- TopoDS_Shape GetShape();
- SMESHDS_Mesh* GetMeshDS();
-
- virtual bool Contains( SMESHDS_Mesh* theMeshDS,
- const TopoDS_Shape& theShape,
- const SMDS_MeshElement* theElem,
- TopAbs_ShapeEnum theFindShapeEnum,
- TopAbs_ShapeEnum theAvoidShapeEnum = TopAbs_SHAPE );
-private:
- TopoDS_Shape myShape;
- SMESHDS_Mesh* myMeshDS;
- SMDSAbs_ElementType myType;
-};
-typedef boost::shared_ptr<LyingOnGeom> LyingOnGeomPtr;
-}
-
-/*
- FUNCTORS
-*/
-
-/*
- Class : Functor_i
- Description : An abstact class for all functors
-*/
-class Functor_i: public virtual POA_SMESH::Functor,
- public virtual SALOME::GenericObj_i
-{
-public:
- void SetMesh( SMESH_Mesh_ptr theMesh );
- Controls::FunctorPtr GetFunctor(){ return myFunctorPtr;}
- ElementType GetElementType();
-
-protected:
- Functor_i();
-protected:
- Controls::FunctorPtr myFunctorPtr;
-};
-
-
-/*
- Class : NumericalFunctor_i
- Description : Base class for numerical functors
-*/
-class NumericalFunctor_i: public virtual POA_SMESH::NumericalFunctor,
- public virtual Functor_i
-{
-public:
- CORBA::Double GetValue( CORBA::Long theElementId );
- void SetPrecision( CORBA::Long thePrecision );
- CORBA::Long GetPrecision();
- Controls::NumericalFunctorPtr GetNumericalFunctor();
-
-protected:
- Controls::NumericalFunctorPtr myNumericalFunctorPtr;
-};
-
-
-/*
- Class : SMESH_MinimumAngleFunct
- Description : Functor for calculation of minimum angle
-*/
-class MinimumAngle_i: public virtual POA_SMESH::MinimumAngle,
- public virtual NumericalFunctor_i
-{
-public:
- MinimumAngle_i();
- FunctorType GetFunctorType();
-};
-
-
-/*
- Class : AspectRatio_i
- Description : Functor for calculating aspect ratio
-*/
-class AspectRatio_i: public virtual POA_SMESH::AspectRatio,
- public virtual NumericalFunctor_i
-{
-public:
- AspectRatio_i();
- FunctorType GetFunctorType();
-};
-
-
-/*
- Class : AspectRatio3D_i
- Description : Functor for calculating aspect ratio for 3D
-*/
-class AspectRatio3D_i: public virtual POA_SMESH::AspectRatio3D,
- public virtual NumericalFunctor_i
-{
-public:
- AspectRatio3D_i();
- FunctorType GetFunctorType();
-};
-
+ namespace Controls
+ {
+
+ /*
+ Class : BelongToGeom
+ Description : Predicate for verifying whether entiy belong to
+ specified geometrical support
+ */
+ class SMESH_I_EXPORT BelongToGeom: public virtual Predicate
+ {
+ public:
+ BelongToGeom();
+
+ virtual void SetMesh( const SMDS_Mesh* theMesh );
+ virtual void SetGeom( const TopoDS_Shape& theShape );
+
+ virtual bool IsSatisfy( long theElementId );
+
+ virtual void SetType( SMDSAbs_ElementType theType );
+ virtual SMDSAbs_ElementType GetType() const;
+
+ TopoDS_Shape GetShape();
+ const SMESHDS_Mesh* GetMeshDS() const;
+
+ void SetTolerance( double );
+ double GetTolerance();
+
+ private:
+ virtual void init();
+
+ TopoDS_Shape myShape;
+ const SMESHDS_Mesh* myMeshDS;
+ SMDSAbs_ElementType myType;
+ bool myIsSubshape;
+ double myTolerance; // only if myIsSubshape == false
+ Controls::ElementsOnShapePtr myElementsOnShapePtr; // only if myIsSubshape == false
+ };
+ typedef boost::shared_ptr<BelongToGeom> BelongToGeomPtr;
+
+ /*
+ Class : LyingOnGeom
+ Description : Predicate for verifying whether entiy lying or partially lying on
+ specified geometrical support
+ */
+ class SMESH_I_EXPORT LyingOnGeom: public virtual Predicate
+ {
+ public:
+ LyingOnGeom();
+
+ virtual void SetMesh( const SMDS_Mesh* theMesh );
+ virtual void SetGeom( const TopoDS_Shape& theShape );
+
+ virtual bool IsSatisfy( long theElementId );
+
+ virtual void SetType( SMDSAbs_ElementType theType );
+ virtual SMDSAbs_ElementType GetType() const;
+
+ TopoDS_Shape GetShape();
+ const SMESHDS_Mesh* GetMeshDS() const;
+
+ void SetTolerance( double );
+ double GetTolerance();
+
+ virtual bool Contains( const SMESHDS_Mesh* theMeshDS,
+ const TopoDS_Shape& theShape,
+ const SMDS_MeshElement* theElem,
+ TopAbs_ShapeEnum theFindShapeEnum,
+ TopAbs_ShapeEnum theAvoidShapeEnum = TopAbs_SHAPE );
+ private:
+ virtual void init();
+
+ TopoDS_Shape myShape;
+ const SMESHDS_Mesh* myMeshDS;
+ SMDSAbs_ElementType myType;
+ bool myIsSubshape;
+ double myTolerance; // only if myIsSubshape == false
+ Controls::ElementsOnShapePtr myElementsOnShapePtr; // only if myIsSubshape == false
+ };
+ typedef boost::shared_ptr<LyingOnGeom> LyingOnGeomPtr;
+ }
+
+ /*
+ FUNCTORS
+ */
+
+ /*
+ Class : Functor_i
+ Description : An abstact class for all functors
+ */
+ class SMESH_I_EXPORT Functor_i: public virtual POA_SMESH::Functor,
+ public virtual SALOME::GenericObj_i
+ {
+ public:
+ void SetMesh( SMESH_Mesh_ptr theMesh );
+ Controls::FunctorPtr GetFunctor(){ return myFunctorPtr;}
+ ElementType GetElementType();
+
+ protected:
+ Functor_i();
+ ~Functor_i();
+ protected:
+ Controls::FunctorPtr myFunctorPtr;
+ };
+
+ /*
+ Class : NumericalFunctor_i
+ Description : Base class for numerical functors
+ */
+ class SMESH_I_EXPORT NumericalFunctor_i: public virtual POA_SMESH::NumericalFunctor,
+ public virtual Functor_i
+ {
+ public:
+ CORBA::Double GetValue( CORBA::Long theElementId );
+ void SetPrecision( CORBA::Long thePrecision );
+ CORBA::Long GetPrecision();
+ Controls::NumericalFunctorPtr GetNumericalFunctor();
+
+ protected:
+ Controls::NumericalFunctorPtr myNumericalFunctorPtr;
+ };
+
+
+ /*
+ Class : SMESH_MinimumAngleFunct
+ Description : Functor for calculation of minimum angle
+ */
+ class SMESH_I_EXPORT MinimumAngle_i: public virtual POA_SMESH::MinimumAngle,
+ public virtual NumericalFunctor_i
+ {
+ public:
+ MinimumAngle_i();
+ FunctorType GetFunctorType();
+ };
+
+
+ /*
+ Class : AspectRatio_i
+ Description : Functor for calculating aspect ratio
+ */
+ class SMESH_I_EXPORT AspectRatio_i: public virtual POA_SMESH::AspectRatio,
+ public virtual NumericalFunctor_i
+ {
+ public:
+ AspectRatio_i();
+ FunctorType GetFunctorType();
+ };
+
+
+ /*
+ Class : AspectRatio3D_i
+ Description : Functor for calculating aspect ratio for 3D
+ */
+ class SMESH_I_EXPORT AspectRatio3D_i: public virtual POA_SMESH::AspectRatio3D,
+ public virtual NumericalFunctor_i
+ {
+ public:
+ AspectRatio3D_i();
+ FunctorType GetFunctorType();
+ };
+