X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESH_I%2FSMESH_Filter_i.hxx;h=92c4618df1bc21d77a11d057c435f77639c83331;hp=cb82aa6d5637d0448f017525c07789acd44ed5d5;hb=be0348c630bec8c50d15094deeec95f5cc2d7a8b;hpb=bd4e115a78b52e3fbc016e5e30bb0e19b2a9e7d6 diff --git a/src/SMESH_I/SMESH_Filter_i.hxx b/src/SMESH_I/SMESH_Filter_i.hxx index cb82aa6d5..92c4618df 100644 --- a/src/SMESH_I/SMESH_Filter_i.hxx +++ b/src/SMESH_I/SMESH_Filter_i.hxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2014 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 @@ -6,7 +6,7 @@ // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either -// version 2.1 of the License. +// version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -24,7 +24,7 @@ // File : SMESH_Filter_i.hxx // Author : Alexey Petrov, OCC // Module : SMESH -// + #ifndef _SMESH_FILTER_I_HXX_ #define _SMESH_FILTER_I_HXX_ @@ -41,94 +41,8 @@ #include -class SMESHDS_Mesh; - namespace SMESH { - - // ================================================================================ - 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 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 LyingOnGeomPtr; - - } // namespace Controls - // ================================================================================ /* FUNCTORS @@ -142,10 +56,10 @@ namespace SMESH public virtual SALOME::GenericObj_i { public: - void SetMesh( SMESH_Mesh_ptr theMesh ); - Controls::FunctorPtr GetFunctor(){ return myFunctorPtr;} + virtual void SetMesh( SMESH_Mesh_ptr theMesh ); + Controls::FunctorPtr GetFunctor() { return myFunctorPtr; } ElementType GetElementType(); - + protected: Functor_i(); ~Functor_i(); @@ -162,7 +76,11 @@ namespace SMESH { public: CORBA::Double GetValue( CORBA::Long theElementId ); - SMESH::Histogram* GetHistogram(CORBA::Short nbIntervals); + SMESH::Histogram* GetHistogram(CORBA::Short nbIntervals, + CORBA::Boolean isLogarithmic); + SMESH::Histogram* GetLocalHistogram(CORBA::Short nbIntervals, + CORBA::Boolean isLogarithmic, + SMESH::SMESH_IDSource_ptr object); void SetPrecision( CORBA::Long thePrecision ); CORBA::Long GetPrecision(); Controls::NumericalFunctorPtr GetNumericalFunctor(); @@ -330,7 +248,6 @@ namespace SMESH Controls::Length2DPtr myLength2DPtr; }; - /* Class : MultiConnection_i Description : Functor for calculating number of faces conneted to the edge @@ -384,6 +301,7 @@ namespace SMESH { public: CORBA::Boolean IsSatisfy( CORBA::Long theElementId ); + CORBA::Long NbSatisfying( SMESH::SMESH_IDSource_ptr obj ); Controls::PredicatePtr GetPredicate(); protected: @@ -451,7 +369,7 @@ namespace SMESH OverConstrainedFace_i(); FunctorType GetFunctorType(); }; - + /* Class : BelongToGeom_i Description : Predicate for selection on geometrical support @@ -764,6 +682,25 @@ namespace SMESH private: Controls::ElemGeomTypePtr myElemGeomTypePtr; }; + + /* + Class : ElemEntityType_i + Description : Functor for check element entity type + */ + class SMESH_I_EXPORT ElemEntityType_i: public virtual POA_SMESH::ElemEntityType, + public virtual Predicate_i + { + public: + ElemEntityType_i(); + FunctorType GetFunctorType(); + + void SetElementType ( ElementType theType ); + void SetEntityType( EntityType theEntityType ); + EntityType GetEntityType() const; + + private: + Controls::ElemEntityTypePtr myElemEntityTypePtr; + }; /* Class : CoplanarFaces_i @@ -784,6 +721,34 @@ namespace SMESH private: Controls::CoplanarFacesPtr myCoplanarFacesPtr; }; + + /* + * Class : ConnectedElements_i + * Description : Returns true if an element is connected via other elements to the element + * located at a given point. + */ + class SMESH_I_EXPORT ConnectedElements_i: public virtual POA_SMESH::ConnectedElements, + public virtual Predicate_i + { + public: + ConnectedElements_i(); + FunctorType GetFunctorType(); + + void SetElementType( ElementType theType ); + void SetPoint( CORBA::Double x, CORBA::Double y, CORBA::Double z ); + void SetVertex( GEOM::GEOM_Object_ptr vertex ) + throw (SALOME::SALOME_Exception); + void SetNode ( CORBA::Long nodeID ) + throw (SALOME::SALOME_Exception); + void SetThreshold ( const char* threshold, + SMESH::ConnectedElements::ThresholdType type ) + throw (SALOME::SALOME_Exception); + char* GetThreshold ( SMESH::ConnectedElements::ThresholdType& type ); + + private: + Controls::ConnectedElementsPtr myConnectedElementsPtr; + std::string myVertexID; + }; /* Class : Comparator_i @@ -983,6 +948,7 @@ namespace SMESH // ========================= virtual SMESH::long_array* GetIDs(); virtual SMESH::long_array* GetMeshInfo(); + virtual SMESH::long_array* GetNbElementsByType(); virtual SMESH::array_of_ElementType* GetTypes(); virtual SMESH::SMESH_Mesh_ptr GetMesh(); virtual bool IsMeshInfoCorrect() { return true; } @@ -1096,7 +1062,9 @@ namespace SMESH LinearOrQuadratic_ptr CreateLinearOrQuadratic(); GroupColor_ptr CreateGroupColor(); ElemGeomType_ptr CreateElemGeomType(); + ElemEntityType_ptr CreateElemEntityType(); CoplanarFaces_ptr CreateCoplanarFaces(); + ConnectedElements_ptr CreateConnectedElements(); LessThan_ptr CreateLessThan(); MoreThan_ptr CreateMoreThan();