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=3b654e8809658c008950ddd88a0cee166388d755;hp=2e885b7fcac338f034f4076cac9e3f6a7541fd4d;hb=0635c9fc80f67d1e5dc0e94ec85f487286a92070;hpb=4f27e7392a109bdc465b943b8d92d969e93f129c diff --git a/src/SMESH_I/SMESH_Filter_i.hxx b/src/SMESH_I/SMESH_Filter_i.hxx index 2e885b7fc..3b654e880 100644 --- a/src/SMESH_I/SMESH_Filter_i.hxx +++ b/src/SMESH_I/SMESH_Filter_i.hxx @@ -1,33 +1,34 @@ -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// Copyright (C) 2007-2008 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 +// +// 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. // -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. // +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses // File : SMESH_Filter_i.hxx // Author : Alexey Petrov, OCC // Module : SMESH - +// #ifndef _SMESH_FILTER_I_HXX_ #define _SMESH_FILTER_I_HXX_ +#include "SMESH.hxx" + #include #include CORBA_SERVER_HEADER(SMESH_Filter) @@ -44,41 +45,49 @@ namespace SMESH namespace Controls { - + /* Class : BelongToGeom Description : Predicate for verifying whether entiy belong to specified geometrical support */ - class BelongToGeom: public virtual Predicate + 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 LyingOnGeom: public virtual Predicate + class SMESH_I_EXPORT LyingOnGeom: public virtual Predicate { public: LyingOnGeom(); @@ -93,6 +102,9 @@ namespace SMESH TopoDS_Shape GetShape(); const SMESHDS_Mesh* GetMeshDS() const; + + void SetTolerance( double ); + double GetTolerance(); virtual bool Contains( const SMESHDS_Mesh* theMeshDS, const TopoDS_Shape& theShape, @@ -100,9 +112,14 @@ namespace SMESH 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; } @@ -115,7 +132,7 @@ namespace SMESH Class : Functor_i Description : An abstact class for all functors */ - class Functor_i: public virtual POA_SMESH::Functor, + class SMESH_I_EXPORT Functor_i: public virtual POA_SMESH::Functor, public virtual SALOME::GenericObj_i { public: @@ -134,7 +151,7 @@ namespace SMESH Class : NumericalFunctor_i Description : Base class for numerical functors */ - class NumericalFunctor_i: public virtual POA_SMESH::NumericalFunctor, + class SMESH_I_EXPORT NumericalFunctor_i: public virtual POA_SMESH::NumericalFunctor, public virtual Functor_i { public: @@ -152,7 +169,7 @@ namespace SMESH Class : SMESH_MinimumAngleFunct Description : Functor for calculation of minimum angle */ - class MinimumAngle_i: public virtual POA_SMESH::MinimumAngle, + class SMESH_I_EXPORT MinimumAngle_i: public virtual POA_SMESH::MinimumAngle, public virtual NumericalFunctor_i { public: @@ -165,7 +182,7 @@ namespace SMESH Class : AspectRatio_i Description : Functor for calculating aspect ratio */ - class AspectRatio_i: public virtual POA_SMESH::AspectRatio, + class SMESH_I_EXPORT AspectRatio_i: public virtual POA_SMESH::AspectRatio, public virtual NumericalFunctor_i { public: @@ -178,7 +195,7 @@ namespace SMESH Class : AspectRatio3D_i Description : Functor for calculating aspect ratio for 3D */ - class AspectRatio3D_i: public virtual POA_SMESH::AspectRatio3D, + class SMESH_I_EXPORT AspectRatio3D_i: public virtual POA_SMESH::AspectRatio3D, public virtual NumericalFunctor_i { public: @@ -191,7 +208,7 @@ namespace SMESH Class : Warping_i Description : Functor for calculating warping */ - class Warping_i: public virtual POA_SMESH::Warping, + class SMESH_I_EXPORT Warping_i: public virtual POA_SMESH::Warping, public virtual NumericalFunctor_i { public: @@ -204,7 +221,7 @@ namespace SMESH Class : Taper_i Description : Functor for calculating taper */ - class Taper_i: public virtual POA_SMESH::Taper, + class SMESH_I_EXPORT Taper_i: public virtual POA_SMESH::Taper, public virtual NumericalFunctor_i { public: @@ -217,7 +234,7 @@ namespace SMESH Class : Skew_i Description : Functor for calculating skew in degrees */ - class Skew_i: public virtual POA_SMESH::Skew, + class SMESH_I_EXPORT Skew_i: public virtual POA_SMESH::Skew, public virtual NumericalFunctor_i { public: @@ -230,7 +247,7 @@ namespace SMESH Class : Area_i Description : Functor for calculating area */ - class Area_i: public virtual POA_SMESH::Area, + class SMESH_I_EXPORT Area_i: public virtual POA_SMESH::Area, public virtual NumericalFunctor_i { public: @@ -243,7 +260,7 @@ namespace SMESH Class : Volume3D_i Description : Functor for calculating volume of 3D element */ - class Volume3D_i: public virtual POA_SMESH::Volume3D, + class SMESH_I_EXPORT Volume3D_i: public virtual POA_SMESH::Volume3D, public virtual NumericalFunctor_i { public: @@ -256,7 +273,7 @@ namespace SMESH Class : Length_i Description : Functor for calculating length of edge */ - class Length_i: public virtual POA_SMESH::Length, + class SMESH_I_EXPORT Length_i: public virtual POA_SMESH::Length, public virtual NumericalFunctor_i { public: @@ -268,7 +285,7 @@ namespace SMESH Class : Length2D_i Description : Functor for calculating length of edge */ - class Length2D_i: public virtual POA_SMESH::Length2D, + class SMESH_I_EXPORT Length2D_i: public virtual POA_SMESH::Length2D, public virtual NumericalFunctor_i { public: @@ -285,7 +302,7 @@ namespace SMESH Class : MultiConnection_i Description : Functor for calculating number of faces conneted to the edge */ - class MultiConnection_i: public virtual POA_SMESH::MultiConnection, + class SMESH_I_EXPORT MultiConnection_i: public virtual POA_SMESH::MultiConnection, public virtual NumericalFunctor_i { public: @@ -297,7 +314,7 @@ namespace SMESH Class : MultiConnection2D_i Description : Functor for calculating number of faces conneted to the edge */ - class MultiConnection2D_i: public virtual POA_SMESH::MultiConnection2D, + class SMESH_I_EXPORT MultiConnection2D_i: public virtual POA_SMESH::MultiConnection2D, public virtual NumericalFunctor_i { public: @@ -317,7 +334,7 @@ namespace SMESH Class : Predicate_i Description : Base class for all predicates */ - class Predicate_i: public virtual POA_SMESH::Predicate, + class SMESH_I_EXPORT Predicate_i: public virtual POA_SMESH::Predicate, public virtual Functor_i { public: @@ -334,7 +351,7 @@ namespace SMESH Description : Verify whether a mesh volume is incorrectly oriented from the point of view of MED convention */ - class BadOrientedVolume_i: public virtual POA_SMESH::BadOrientedVolume, + class SMESH_I_EXPORT BadOrientedVolume_i: public virtual POA_SMESH::BadOrientedVolume, public virtual Predicate_i { public: @@ -346,7 +363,7 @@ namespace SMESH Class : BelongToGeom_i Description : Predicate for selection on geometrical support */ - class BelongToGeom_i: public virtual POA_SMESH::BelongToGeom, + class SMESH_I_EXPORT BelongToGeom_i: public virtual POA_SMESH::BelongToGeom, public virtual Predicate_i { public: @@ -360,18 +377,24 @@ namespace SMESH void SetGeom( const TopoDS_Shape& theShape ); void SetShapeName( const char* theName ); + void SetShape( const char* theID, const char* theName ); char* GetShapeName(); + char* GetShapeID(); + + void SetTolerance( CORBA::Double ); + CORBA::Double GetTolerance(); protected: Controls::BelongToGeomPtr myBelongToGeomPtr; char* myShapeName; + char* myShapeID; }; /* Class : BelongToSurface_i Description : Verify whether mesh element lie in pointed Geom planar object */ - class BelongToSurface_i: public virtual POA_SMESH::BelongToSurface, + class SMESH_I_EXPORT BelongToSurface_i: public virtual POA_SMESH::BelongToSurface, public virtual Predicate_i { public: @@ -381,14 +404,20 @@ namespace SMESH void SetSurface( GEOM::GEOM_Object_ptr theGeom, ElementType theType ); void SetShapeName( const char* theName, ElementType theType ); + void SetShape( const char* theID, const char* theName, ElementType theType ); char* GetShapeName(); - + char* GetShapeID(); + void SetTolerance( CORBA::Double ); CORBA::Double GetTolerance(); + void SetUseBoundaries( CORBA::Boolean theUseBndRestrictions ); + CORBA::Boolean GetUseBoundaries(); + protected: Controls::ElementsOnSurfacePtr myElementsOnSurfacePtr; char* myShapeName; + char* myShapeID; Handle(Standard_Type) mySurfaceType; }; @@ -396,7 +425,7 @@ namespace SMESH Class : BelongToPlane_i Description : Verify whether mesh element lie in pointed Geom planar object */ - class BelongToPlane_i: public virtual POA_SMESH::BelongToPlane, + class SMESH_I_EXPORT BelongToPlane_i: public virtual POA_SMESH::BelongToPlane, public virtual BelongToSurface_i { public: @@ -409,7 +438,7 @@ namespace SMESH Class : BelongToCylinder_i Description : Verify whether mesh element lie in pointed Geom cylindrical object */ - class BelongToCylinder_i: public virtual POA_SMESH::BelongToCylinder, + class SMESH_I_EXPORT BelongToCylinder_i: public virtual POA_SMESH::BelongToCylinder, public virtual BelongToSurface_i { public: @@ -417,12 +446,25 @@ namespace SMESH void SetCylinder( GEOM::GEOM_Object_ptr theGeom, ElementType theType ); FunctorType GetFunctorType(); }; + + /* + Class : BelongToGenSurface_i + Description : Verify whether mesh element lie on pointed Geom surfasic object + */ + class BelongToGenSurface_i: public virtual POA_SMESH::BelongToGenSurface, + public virtual BelongToSurface_i + { + public: + BelongToGenSurface_i(); + void SetSurface( GEOM::GEOM_Object_ptr theGeom, ElementType theType ); + FunctorType GetFunctorType(); + }; /* Class : LyingOnGeom_i Description : Predicate for selection on geometrical support(lying or partially lying) */ - class LyingOnGeom_i: public virtual POA_SMESH::LyingOnGeom, + class SMESH_I_EXPORT LyingOnGeom_i: public virtual POA_SMESH::LyingOnGeom, public virtual Predicate_i { public: @@ -436,18 +478,24 @@ namespace SMESH void SetGeom( const TopoDS_Shape& theShape ); void SetShapeName( const char* theName ); + void SetShape( const char* theID, const char* theName ); char* GetShapeName(); + char* GetShapeID(); + + void SetTolerance( CORBA::Double ); + CORBA::Double GetTolerance(); protected: Controls::LyingOnGeomPtr myLyingOnGeomPtr; char* myShapeName; + char* myShapeID; }; /* Class : FreeBorders_i Description : Predicate for free borders */ - class FreeBorders_i: public virtual POA_SMESH::FreeBorders, + class SMESH_I_EXPORT FreeBorders_i: public virtual POA_SMESH::FreeBorders, public virtual Predicate_i { public: @@ -460,7 +508,7 @@ namespace SMESH Class : FreeEdges_i Description : Predicate for free edges */ - class FreeEdges_i: public virtual POA_SMESH::FreeEdges, + class SMESH_I_EXPORT FreeEdges_i: public virtual POA_SMESH::FreeEdges, public virtual Predicate_i { public: @@ -472,12 +520,38 @@ namespace SMESH Controls::FreeEdgesPtr myFreeEdgesPtr; }; + + /* + Class : FreeFaces_i + Description : Predicate for free faces + */ + class SMESH_I_EXPORT FreeFaces_i: public virtual POA_SMESH::FreeFaces, + public virtual Predicate_i + { + public: + FreeFaces_i(); + FunctorType GetFunctorType(); + }; + + + /* + Class : FreeNodes_i + Description : Predicate for free nodes + */ + class SMESH_I_EXPORT FreeNodes_i: public virtual POA_SMESH::FreeNodes, + public virtual Predicate_i + { + public: + FreeNodes_i(); + FunctorType GetFunctorType(); + }; + /* Class : RangeOfIds_i Description : Predicate for Range of Ids */ - class RangeOfIds_i: public virtual POA_SMESH::RangeOfIds, + class SMESH_I_EXPORT RangeOfIds_i: public virtual POA_SMESH::RangeOfIds, public virtual Predicate_i { public: @@ -492,12 +566,66 @@ namespace SMESH protected: Controls::RangeOfIdsPtr myRangeOfIdsPtr; }; + + /* + Class : LinearOrQuadratic_i + Description : Verify whether a mesh element is linear + */ + class SMESH_I_EXPORT LinearOrQuadratic_i: public virtual POA_SMESH::LinearOrQuadratic, + public virtual Predicate_i + { + public: + LinearOrQuadratic_i(); + FunctorType GetFunctorType(); + void SetElementType( ElementType theType ); + + private: + Controls::LinearOrQuadraticPtr myLinearOrQuadraticPtr; + }; + + /* + Class : GroupColor_i + Description : Functor for check color of group to whic mesh element belongs to + */ + class SMESH_I_EXPORT GroupColor_i: public virtual POA_SMESH::GroupColor, + public virtual Predicate_i + { + public: + GroupColor_i(); + FunctorType GetFunctorType(); + + void SetElementType( ElementType theType ); + void SetColorStr( const char* theColor ); + char* GetColorStr(); + + private: + Controls::GroupColorPtr myGroupColorPtr; + }; + + /* + Class : ElemGeomType_i + Description : Functor for check element geometry type + */ + class SMESH_I_EXPORT ElemGeomType_i: public virtual POA_SMESH::ElemGeomType, + public virtual Predicate_i + { + public: + ElemGeomType_i(); + FunctorType GetFunctorType(); + + void SetElementType ( ElementType theType ); + void SetGeometryType( GeometryType theType ); + GeometryType GetGeometryType() const; + + private: + Controls::ElemGeomTypePtr myElemGeomTypePtr; + }; /* Class : Comparator_i Description : Base class for comparators */ - class Comparator_i: public virtual POA_SMESH::Comparator, + class SMESH_I_EXPORT Comparator_i: public virtual POA_SMESH::Comparator, public virtual Predicate_i { public: @@ -522,7 +650,7 @@ namespace SMESH Class : LessThan_i Description : Comparator "<" */ - class LessThan_i: public virtual POA_SMESH::LessThan, + class SMESH_I_EXPORT LessThan_i: public virtual POA_SMESH::LessThan, public virtual Comparator_i { public: @@ -535,7 +663,7 @@ namespace SMESH Class : MoreThan_i Description : Comparator ">" */ - class MoreThan_i: public virtual POA_SMESH::MoreThan, + class SMESH_I_EXPORT MoreThan_i: public virtual POA_SMESH::MoreThan, public virtual Comparator_i { public: @@ -548,7 +676,7 @@ namespace SMESH Class : EqualTo_i Description : Comparator "=" */ - class EqualTo_i: public virtual POA_SMESH::EqualTo, + class SMESH_I_EXPORT EqualTo_i: public virtual POA_SMESH::EqualTo, public virtual Comparator_i { public: @@ -566,7 +694,7 @@ namespace SMESH Class : LogicalNOT_i Description : Logical NOT predicate */ - class LogicalNOT_i: public virtual POA_SMESH::LogicalNOT, + class SMESH_I_EXPORT LogicalNOT_i: public virtual POA_SMESH::LogicalNOT, public virtual Predicate_i { public: @@ -587,7 +715,7 @@ namespace SMESH Class : LogicalBinary_i Description : Base class for binary logical predicate */ - class LogicalBinary_i: public virtual POA_SMESH::LogicalBinary, + class SMESH_I_EXPORT LogicalBinary_i: public virtual POA_SMESH::LogicalBinary, public virtual Predicate_i { public: @@ -613,7 +741,7 @@ namespace SMESH Class : LogicalAND_i Description : Logical AND */ - class LogicalAND_i: public virtual POA_SMESH::LogicalAND, + class SMESH_I_EXPORT LogicalAND_i: public virtual POA_SMESH::LogicalAND, public virtual LogicalBinary_i { public: @@ -626,7 +754,7 @@ namespace SMESH Class : LogicalOR_i Description : Logical OR */ - class LogicalOR_i: public virtual POA_SMESH::LogicalOR, + class SMESH_I_EXPORT LogicalOR_i: public virtual POA_SMESH::LogicalOR, public virtual LogicalBinary_i { public: @@ -638,7 +766,7 @@ namespace SMESH /* FILTER */ - class Filter_i: public virtual POA_SMESH::Filter, + class SMESH_I_EXPORT Filter_i: public virtual POA_SMESH::Filter, public virtual SALOME::GenericObj_i { public: @@ -700,7 +828,7 @@ namespace SMESH /* FILTER LIBRARY */ - class FilterLibrary_i: public virtual POA_SMESH::FilterLibrary, + class SMESH_I_EXPORT FilterLibrary_i: public virtual POA_SMESH::FilterLibrary, public virtual SALOME::GenericObj_i { public: @@ -738,7 +866,7 @@ namespace SMESH FILTER MANAGER */ - class FilterManager_i: public virtual POA_SMESH::FilterManager, + class SMESH_I_EXPORT FilterManager_i: public virtual POA_SMESH::FilterManager, public virtual SALOME::GenericObj_i { public: @@ -761,16 +889,24 @@ namespace SMESH BelongToGeom_ptr CreateBelongToGeom(); BelongToPlane_ptr CreateBelongToPlane(); BelongToCylinder_ptr CreateBelongToCylinder(); + BelongToGenSurface_ptr CreateBelongToGenSurface(); LyingOnGeom_ptr CreateLyingOnGeom(); FreeBorders_ptr CreateFreeBorders(); FreeEdges_ptr CreateFreeEdges(); + FreeNodes_ptr CreateFreeNodes(); + FreeFaces_ptr CreateFreeFaces(); RangeOfIds_ptr CreateRangeOfIds(); BadOrientedVolume_ptr CreateBadOrientedVolume(); + LinearOrQuadratic_ptr CreateLinearOrQuadratic(); + GroupColor_ptr CreateGroupColor(); + + ElemGeomType_ptr CreateElemGeomType(); + LessThan_ptr CreateLessThan(); MoreThan_ptr CreateMoreThan(); EqualTo_ptr CreateEqualTo();