1 // Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License, or (at your option) any later version.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 // SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes
24 // File : SMESH_Filter_i.hxx
25 // Author : Alexey Petrov, OCC
28 #ifndef _SMESH_FILTER_I_HXX_
29 #define _SMESH_FILTER_I_HXX_
33 #include <SALOMEconfig.h>
34 #include CORBA_SERVER_HEADER(SMESH_Filter)
36 #include <LDOM_Document.hxx>
37 #include <TopoDS_Shape.hxx>
39 #include "SALOME_GenericObj_i.hh"
40 #include "SMESH_ControlsDef.hxx"
44 class SMESH_GroupBase_i;
50 * \brief Object notified on change of base objects and
51 * notifying dependent objects in its turn.
52 * This interface is used to track the following dependencies:
53 * - GroupOnFiler depending on Filter predicates
54 * - Filter depending on a Group via FT_BelongToMeshGroup predicate
56 struct NotifyerAndWaiter
58 virtual void OnBaseObjModified(NotifyerAndWaiter* /*obj*/, bool /*removed*/) {};
59 // specific reaction on modification of a base object
61 void Modified( bool removed=false, NotifyerAndWaiter* who = 0);
62 // calls OnBaseObjModified(), if who != 0, and myWaiters[i]->Modified(who)
64 void AddModifWaiter ( NotifyerAndWaiter* waiter ); // adds a dependent object to notify
65 void RemoveModifWaiter ( NotifyerAndWaiter* waiter ); // CALL IT when a waiter dies!!!
66 bool ContainModifWaiter( NotifyerAndWaiter* waiter );
67 std::list<NotifyerAndWaiter*> myWaiters;
69 // ================================================================================
76 Description : An abstract class for all functors
78 class SMESH_I_EXPORT Functor_i: public virtual POA_SMESH::Functor,
79 public virtual SALOME::GenericObj_i
82 virtual void SetMesh( SMESH_Mesh_ptr theMesh );
83 Controls::FunctorPtr GetFunctor() { return myFunctorPtr; }
84 ElementType GetElementType();
90 Controls::FunctorPtr myFunctorPtr;
94 Class : NumericalFunctor_i
95 Description : Base class for numerical functors
97 class SMESH_I_EXPORT NumericalFunctor_i: public virtual POA_SMESH::NumericalFunctor,
98 public virtual Functor_i
101 CORBA::Double GetValue( CORBA::Long theElementId );
102 CORBA::Boolean IsApplicable( CORBA::Long theElementId );
103 SMESH::Histogram* GetHistogram(CORBA::Short nbIntervals,
104 CORBA::Boolean isLogarithmic);
105 SMESH::Histogram* GetLocalHistogram(CORBA::Short nbIntervals,
106 CORBA::Boolean isLogarithmic,
107 SMESH::SMESH_IDSource_ptr object);
108 void SetPrecision( CORBA::Long thePrecision );
109 CORBA::Long GetPrecision();
110 Controls::NumericalFunctorPtr GetNumericalFunctor();
113 Controls::NumericalFunctorPtr myNumericalFunctorPtr;
118 Class : SMESH_MinimumAngleFunct
119 Description : Functor for calculation of minimum angle
121 class SMESH_I_EXPORT MinimumAngle_i: public virtual POA_SMESH::MinimumAngle,
122 public virtual NumericalFunctor_i
126 FunctorType GetFunctorType();
131 Class : AspectRatio_i
132 Description : Functor for calculating aspect ratio
134 class SMESH_I_EXPORT AspectRatio_i: public virtual POA_SMESH::AspectRatio,
135 public virtual NumericalFunctor_i
139 FunctorType GetFunctorType();
144 Class : AspectRatio3D_i
145 Description : Functor for calculating aspect ratio for 3D
147 class SMESH_I_EXPORT AspectRatio3D_i: public virtual POA_SMESH::AspectRatio3D,
148 public virtual NumericalFunctor_i
152 FunctorType GetFunctorType();
158 Description : Functor for calculating warping
160 class SMESH_I_EXPORT Warping_i: public virtual POA_SMESH::Warping,
161 public virtual NumericalFunctor_i
165 FunctorType GetFunctorType();
171 Description : Functor for calculating taper
173 class SMESH_I_EXPORT Taper_i: public virtual POA_SMESH::Taper,
174 public virtual NumericalFunctor_i
178 FunctorType GetFunctorType();
184 Description : Functor for calculating skew in degrees
186 class SMESH_I_EXPORT Skew_i: public virtual POA_SMESH::Skew,
187 public virtual NumericalFunctor_i
191 FunctorType GetFunctorType();
197 Description : Functor for calculating area
199 class SMESH_I_EXPORT Area_i: public virtual POA_SMESH::Area,
200 public virtual NumericalFunctor_i
204 FunctorType GetFunctorType();
210 Description : Functor for calculating volume of 3D element
212 class SMESH_I_EXPORT Volume3D_i: public virtual POA_SMESH::Volume3D,
213 public virtual NumericalFunctor_i
217 FunctorType GetFunctorType();
222 Class : MaxElementLength2D_i
223 Description : Functor for calculating maximum length of 2D element
225 class SMESH_I_EXPORT MaxElementLength2D_i: public virtual POA_SMESH::MaxElementLength2D,
226 public virtual NumericalFunctor_i
229 MaxElementLength2D_i();
230 FunctorType GetFunctorType();
235 Class : MaxElementLength3D_i
236 Description : Functor for calculating maximum length of 3D element
238 class SMESH_I_EXPORT MaxElementLength3D_i: public virtual POA_SMESH::MaxElementLength3D,
239 public virtual NumericalFunctor_i
242 MaxElementLength3D_i();
243 FunctorType GetFunctorType();
249 Description : Functor for calculating length of edge
251 class SMESH_I_EXPORT Length_i: public virtual POA_SMESH::Length,
252 public virtual NumericalFunctor_i
256 FunctorType GetFunctorType();
261 Description : Functor for calculating length of edge
263 class SMESH_I_EXPORT Length2D_i: public virtual POA_SMESH::Length2D,
264 public virtual NumericalFunctor_i
268 SMESH::Length2D::Values* GetValues();
269 FunctorType GetFunctorType();
272 Controls::Length2DPtr myLength2DPtr;
277 Description : Functor for calculating length of edge
279 class SMESH_I_EXPORT Length3D_i: public virtual POA_SMESH::Length3D,
280 public virtual NumericalFunctor_i
284 //SMESH::Length2D::Values* GetValues();
285 FunctorType GetFunctorType();
288 Controls::Length3DPtr myLength3DPtr;
292 Class : Deflection2D_i
293 Description : Functor for calculating distance between a face and geometry
295 class SMESH_I_EXPORT Deflection2D_i: public virtual POA_SMESH::Deflection2D,
296 public virtual NumericalFunctor_i
300 FunctorType GetFunctorType();
304 Class : MultiConnection_i
305 Description : Functor for calculating number of faces conneted to the edge
307 class SMESH_I_EXPORT MultiConnection_i: public virtual POA_SMESH::MultiConnection,
308 public virtual NumericalFunctor_i
312 FunctorType GetFunctorType();
316 Class : MultiConnection2D_i
317 Description : Functor for calculating number of faces conneted to the edge
319 class SMESH_I_EXPORT MultiConnection2D_i: public virtual POA_SMESH::MultiConnection2D,
320 public virtual NumericalFunctor_i
323 MultiConnection2D_i();
324 SMESH::MultiConnection2D::Values* GetValues();
325 FunctorType GetFunctorType();
328 Controls::MultiConnection2DPtr myMulticonnection2DPtr;
332 Class : BallDiameter_i
333 Description : Functor returning diameter of a ball element
335 class SMESH_I_EXPORT BallDiameter_i: public virtual POA_SMESH::BallDiameter,
336 public virtual NumericalFunctor_i
340 FunctorType GetFunctorType();
344 Class : NodeConnectivityNumber_i
345 Description : Functor returning diameter of a ball element
347 class SMESH_I_EXPORT NodeConnectivityNumber_i: public virtual POA_SMESH::NodeConnectivityNumber,
348 public virtual NumericalFunctor_i
351 NodeConnectivityNumber_i();
352 FunctorType GetFunctorType();
361 Description : Base class for all predicates
363 class SMESH_I_EXPORT Predicate_i: public virtual POA_SMESH::Predicate,
364 public virtual Functor_i
367 CORBA::Boolean IsSatisfy( CORBA::Long theElementId );
368 CORBA::Long NbSatisfying( SMESH::SMESH_IDSource_ptr obj );
369 Controls::PredicatePtr GetPredicate();
372 Controls::PredicatePtr myPredicatePtr;
377 Class : BadOrientedVolume_i
378 Description : Verify whether a mesh volume is incorrectly oriented from
379 the point of view of MED convention
381 class SMESH_I_EXPORT BadOrientedVolume_i: public virtual POA_SMESH::BadOrientedVolume,
382 public virtual Predicate_i
385 BadOrientedVolume_i();
386 FunctorType GetFunctorType();
390 Class : BareBorderVolume_i
391 Description : Verify whether a mesh volume has a free facet without a face on it
393 class SMESH_I_EXPORT BareBorderVolume_i: public virtual POA_SMESH::BareBorderVolume,
394 public virtual Predicate_i
397 BareBorderVolume_i();
398 FunctorType GetFunctorType();
402 Class : BareBorderFace_i
403 Description : Verify whether a mesh face has a free border without an edge on it
405 class SMESH_I_EXPORT BareBorderFace_i: public virtual POA_SMESH::BareBorderFace,
406 public virtual Predicate_i
410 FunctorType GetFunctorType();
414 Class : OverConstrainedVolume_i
415 Description : Verify whether a mesh volume has only one facet shared with other volumes
417 class SMESH_I_EXPORT OverConstrainedVolume_i: public virtual POA_SMESH::OverConstrainedVolume,
418 public virtual Predicate_i
421 OverConstrainedVolume_i();
422 FunctorType GetFunctorType();
426 Class : OverConstrainedFace_i
427 Description : Verify whether a mesh face has only one border shared with other faces
429 class SMESH_I_EXPORT OverConstrainedFace_i: public virtual POA_SMESH::OverConstrainedFace,
430 public virtual Predicate_i
433 OverConstrainedFace_i();
434 FunctorType GetFunctorType();
438 Class : BelongToMeshGroup_i
439 Description : Verify whether a mesh element is included into a mesh group
441 class SMESH_I_EXPORT BelongToMeshGroup_i: public virtual POA_SMESH::BelongToMeshGroup,
442 public virtual Predicate_i
444 std::string myID; // IOR or StoreName
445 SMESH::SMESH_GroupBase_var myGroup;
446 Controls::BelongToMeshGroupPtr myBelongToMeshGroup;
448 BelongToMeshGroup_i();
449 ~BelongToMeshGroup_i();
450 void SetGroup( SMESH::SMESH_GroupBase_ptr theGroup );
451 void SetGroupID( const char* theID ); // IOR or StoreName
452 SMESH::SMESH_GroupBase_ptr GetGroup();
454 std::string GetGroupID();
455 FunctorType GetFunctorType();
456 //virtual void SetMesh( SMESH_Mesh_ptr theMesh );
460 Class : BelongToGeom_i
461 Description : Predicate for selection on geometrical support
463 class SMESH_I_EXPORT BelongToGeom_i: public virtual POA_SMESH::BelongToGeom,
464 public virtual Predicate_i
468 virtual ~BelongToGeom_i();
470 void SetGeom( GEOM::GEOM_Object_ptr theGeom );
471 void SetElementType( ElementType theType );
472 FunctorType GetFunctorType();
474 void SetGeom( const TopoDS_Shape& theShape );
476 void SetShapeName( const char* theName );
477 void SetShape( const char* theID, const char* theName );
478 char* GetShapeName();
481 void SetTolerance( CORBA::Double );
482 CORBA::Double GetTolerance();
485 Controls::BelongToGeomPtr myBelongToGeomPtr;
491 Class : BelongToSurface_i
492 Description : Verify whether mesh element lie in pointed Geom planar object
494 class SMESH_I_EXPORT BelongToSurface_i: public virtual POA_SMESH::BelongToSurface,
495 public virtual Predicate_i
498 BelongToSurface_i( const Handle(Standard_Type)& );
499 virtual ~BelongToSurface_i();
501 void SetSurface( GEOM::GEOM_Object_ptr theGeom, ElementType theType );
503 void SetShapeName( const char* theName, ElementType theType );
504 void SetShape( const char* theID, const char* theName, ElementType theType );
505 char* GetShapeName();
508 void SetTolerance( CORBA::Double );
509 CORBA::Double GetTolerance();
511 void SetUseBoundaries( CORBA::Boolean theUseBndRestrictions );
512 CORBA::Boolean GetUseBoundaries();
515 Controls::ElementsOnSurfacePtr myElementsOnSurfacePtr;
518 Handle(Standard_Type) mySurfaceType;
522 Class : BelongToPlane_i
523 Description : Verify whether mesh element lie in pointed Geom planar object
525 class SMESH_I_EXPORT BelongToPlane_i: public virtual POA_SMESH::BelongToPlane,
526 public virtual BelongToSurface_i
530 void SetPlane( GEOM::GEOM_Object_ptr theGeom, ElementType theType );
531 FunctorType GetFunctorType();
535 Class : BelongToCylinder_i
536 Description : Verify whether mesh element lie in pointed Geom cylindrical object
538 class SMESH_I_EXPORT BelongToCylinder_i: public virtual POA_SMESH::BelongToCylinder,
539 public virtual BelongToSurface_i
542 BelongToCylinder_i();
543 void SetCylinder( GEOM::GEOM_Object_ptr theGeom, ElementType theType );
544 FunctorType GetFunctorType();
548 Class : BelongToGenSurface_i
549 Description : Verify whether mesh element lie on pointed Geom surfasic object
551 class BelongToGenSurface_i: public virtual POA_SMESH::BelongToGenSurface,
552 public virtual BelongToSurface_i
555 BelongToGenSurface_i();
556 void SetSurface( GEOM::GEOM_Object_ptr theGeom, ElementType theType );
557 FunctorType GetFunctorType();
561 Class : LyingOnGeom_i
562 Description : Predicate for selection on geometrical support(lying or partially lying)
564 class SMESH_I_EXPORT LyingOnGeom_i: public virtual POA_SMESH::LyingOnGeom,
565 public virtual Predicate_i
569 virtual ~LyingOnGeom_i();
571 void SetGeom( GEOM::GEOM_Object_ptr theGeom );
572 void SetElementType( ElementType theType );
573 FunctorType GetFunctorType();
575 void SetGeom( const TopoDS_Shape& theShape );
577 void SetShapeName( const char* theName );
578 void SetShape( const char* theID, const char* theName );
579 char* GetShapeName();
582 void SetTolerance( CORBA::Double );
583 CORBA::Double GetTolerance();
586 Controls::LyingOnGeomPtr myLyingOnGeomPtr;
592 Class : FreeBorders_i
593 Description : Predicate for free borders
595 class SMESH_I_EXPORT FreeBorders_i: public virtual POA_SMESH::FreeBorders,
596 public virtual Predicate_i
600 FunctorType GetFunctorType();
606 Description : Predicate for free edges
608 class SMESH_I_EXPORT FreeEdges_i: public virtual POA_SMESH::FreeEdges,
609 public virtual Predicate_i
613 SMESH::FreeEdges::Borders* GetBorders();
614 FunctorType GetFunctorType();
617 Controls::FreeEdgesPtr myFreeEdgesPtr;
623 Description : Predicate for free faces
625 class SMESH_I_EXPORT FreeFaces_i: public virtual POA_SMESH::FreeFaces,
626 public virtual Predicate_i
630 FunctorType GetFunctorType();
636 Description : Predicate for free nodes
638 class SMESH_I_EXPORT FreeNodes_i: public virtual POA_SMESH::FreeNodes,
639 public virtual Predicate_i
643 FunctorType GetFunctorType();
649 Description : Predicate for equal nodes
651 class SMESH_I_EXPORT EqualNodes_i: public virtual POA_SMESH::EqualNodes,
652 public virtual Predicate_i
656 FunctorType GetFunctorType();
657 void SetTolerance( double );
658 double GetTolerance();
661 Controls::CoincidentNodesPtr myCoincidentNodesPtr;
665 Description : Predicate for equal edges
667 class SMESH_I_EXPORT EqualEdges_i: public virtual POA_SMESH::EqualEdges,
668 public virtual Predicate_i
672 FunctorType GetFunctorType();
676 Description : Predicate for equal Faces
678 class SMESH_I_EXPORT EqualFaces_i: public virtual POA_SMESH::EqualFaces,
679 public virtual Predicate_i
683 FunctorType GetFunctorType();
686 Class : EqualVolumes_i
687 Description : Predicate for equal Volumes
689 class SMESH_I_EXPORT EqualVolumes_i: public virtual POA_SMESH::EqualVolumes,
690 public virtual Predicate_i
694 FunctorType GetFunctorType();
700 Description : Predicate for Range of Ids
702 class SMESH_I_EXPORT RangeOfIds_i: public virtual POA_SMESH::RangeOfIds,
703 public virtual Predicate_i
707 void SetRange( const SMESH::long_array& theIds );
708 CORBA::Boolean SetRangeStr( const char* theRange );
711 void SetElementType( ElementType theType );
712 FunctorType GetFunctorType();
715 Controls::RangeOfIdsPtr myRangeOfIdsPtr;
719 Class : LinearOrQuadratic_i
720 Description : Verify whether a mesh element is linear
722 class SMESH_I_EXPORT LinearOrQuadratic_i: public virtual POA_SMESH::LinearOrQuadratic,
723 public virtual Predicate_i
726 LinearOrQuadratic_i();
727 FunctorType GetFunctorType();
728 void SetElementType( ElementType theType );
731 Controls::LinearOrQuadraticPtr myLinearOrQuadraticPtr;
736 Description : Functor for check color of group to which mesh element belongs to
738 class SMESH_I_EXPORT GroupColor_i: public virtual POA_SMESH::GroupColor,
739 public virtual Predicate_i
743 FunctorType GetFunctorType();
745 void SetElementType( ElementType theType );
746 void SetColorStr( const char* theColor );
750 Controls::GroupColorPtr myGroupColorPtr;
754 Class : ElemGeomType_i
755 Description : Functor for check element geometry type
757 class SMESH_I_EXPORT ElemGeomType_i: public virtual POA_SMESH::ElemGeomType,
758 public virtual Predicate_i
762 FunctorType GetFunctorType();
764 void SetElementType ( ElementType theType );
765 void SetGeometryType( GeometryType theType );
766 GeometryType GetGeometryType() const;
769 Controls::ElemGeomTypePtr myElemGeomTypePtr;
773 Class : ElemEntityType_i
774 Description : Functor for check element entity type
776 class SMESH_I_EXPORT ElemEntityType_i: public virtual POA_SMESH::ElemEntityType,
777 public virtual Predicate_i
781 FunctorType GetFunctorType();
783 void SetElementType ( ElementType theType );
784 void SetEntityType( EntityType theEntityType );
785 EntityType GetEntityType() const;
788 Controls::ElemEntityTypePtr myElemEntityTypePtr;
792 Class : CoplanarFaces_i
793 Description : Returns true if a mesh face is a coplanar neighbour to a given one
795 class SMESH_I_EXPORT CoplanarFaces_i: public virtual POA_SMESH::CoplanarFaces,
796 public virtual Predicate_i
800 FunctorType GetFunctorType();
802 void SetFace ( CORBA::Long theFaceID );
803 void SetTolerance( CORBA::Double theToler );
804 char* GetFaceAsString () const;
805 CORBA::Long GetFace () const;
806 CORBA::Double GetTolerance () const;
808 Controls::CoplanarFacesPtr myCoplanarFacesPtr;
812 * Class : ConnectedElements_i
813 * Description : Returns true if an element is connected via other elements to the element
814 * located at a given point.
816 class SMESH_I_EXPORT ConnectedElements_i: public virtual POA_SMESH::ConnectedElements,
817 public virtual Predicate_i
820 ConnectedElements_i();
821 FunctorType GetFunctorType();
823 void SetElementType( ElementType theType );
824 void SetPoint( CORBA::Double x, CORBA::Double y, CORBA::Double z );
825 void SetVertex( GEOM::GEOM_Object_ptr vertex );
826 void SetNode ( CORBA::Long nodeID );
827 void SetThreshold ( const char* threshold,
828 SMESH::ConnectedElements::ThresholdType type );
829 char* GetThreshold ( SMESH::ConnectedElements::ThresholdType& type );
832 Controls::ConnectedElementsPtr myConnectedElementsPtr;
833 std::string myVertexID;
838 Description : Base class for comparators
840 class SMESH_I_EXPORT Comparator_i: public virtual POA_SMESH::Comparator,
841 public virtual Predicate_i
844 virtual ~Comparator_i();
846 virtual void SetMargin( CORBA::Double );
847 virtual void SetNumFunctor( NumericalFunctor_ptr );
849 Controls::ComparatorPtr GetComparator();
850 NumericalFunctor_i* GetNumFunctor_i();
851 CORBA::Double GetMargin();
856 Controls::ComparatorPtr myComparatorPtr;
857 NumericalFunctor_i* myNumericalFunctor;
863 Description : Comparator "<"
865 class SMESH_I_EXPORT LessThan_i: public virtual POA_SMESH::LessThan,
866 public virtual Comparator_i
870 FunctorType GetFunctorType();
876 Description : Comparator ">"
878 class SMESH_I_EXPORT MoreThan_i: public virtual POA_SMESH::MoreThan,
879 public virtual Comparator_i
883 FunctorType GetFunctorType();
889 Description : Comparator "="
891 class SMESH_I_EXPORT EqualTo_i: public virtual POA_SMESH::EqualTo,
892 public virtual Comparator_i
896 virtual void SetTolerance( CORBA::Double );
897 CORBA::Double GetTolerance();
898 FunctorType GetFunctorType();
901 Controls::EqualToPtr myEqualToPtr;
907 Description : Logical NOT predicate
909 class SMESH_I_EXPORT LogicalNOT_i: public virtual POA_SMESH::LogicalNOT,
910 public virtual Predicate_i
914 virtual ~LogicalNOT_i();
916 virtual void SetPredicate( Predicate_ptr );
917 Predicate_i* GetPredicate_i();
918 FunctorType GetFunctorType();
921 Controls::LogicalNOTPtr myLogicalNOTPtr;
922 Predicate_i* myPredicate;
927 Class : LogicalBinary_i
928 Description : Base class for binary logical predicate
930 class SMESH_I_EXPORT LogicalBinary_i: public virtual POA_SMESH::LogicalBinary,
931 public virtual Predicate_i
934 virtual ~LogicalBinary_i();
935 virtual void SetMesh( SMESH_Mesh_ptr theMesh );
936 virtual void SetPredicate1( Predicate_ptr );
937 virtual void SetPredicate2( Predicate_ptr );
939 Controls::LogicalBinaryPtr GetLogicalBinary();
940 Predicate_i* GetPredicate1_i();
941 Predicate_i* GetPredicate2_i();
946 Controls::LogicalBinaryPtr myLogicalBinaryPtr;
947 Predicate_i* myPredicate1;
948 Predicate_i* myPredicate2;
954 Description : Logical AND
956 class SMESH_I_EXPORT LogicalAND_i: public virtual POA_SMESH::LogicalAND,
957 public virtual LogicalBinary_i
961 FunctorType GetFunctorType();
967 Description : Logical OR
969 class SMESH_I_EXPORT LogicalOR_i: public virtual POA_SMESH::LogicalOR,
970 public virtual LogicalBinary_i
974 FunctorType GetFunctorType();
981 class SMESH_I_EXPORT Filter_i: public virtual POA_SMESH::Filter,
982 public virtual SALOME::GenericObj_i,
983 public NotifyerAndWaiter
991 SetPredicate( Predicate_ptr );
995 SetMesh( SMESH_Mesh_ptr );
999 GetElementsId( Predicate_i*,
1001 Controls::Filter::TIdSequence& );
1004 GetElementsId( Predicate_i*,
1006 Controls::Filter::TIdSequence& );
1010 GetElementsId( SMESH_Mesh_ptr );
1014 GetElementsIdFromParts( const ListOfIDSources& theParts );
1022 GetCriteria( SMESH::Filter::Criteria_out theCriteria );
1026 SetCriteria( const SMESH::Filter::Criteria& theCriteria );
1032 Predicate_i* GetPredicate_i();
1034 void FindBaseObjects();
1035 // finds groups it depends on
1037 virtual void OnBaseObjModified(NotifyerAndWaiter* group, bool removed);
1038 // notified on change of myBaseGroups[i]
1040 // =========================
1041 // SMESH_IDSource interface
1042 // =========================
1043 virtual SMESH::long_array* GetIDs();
1044 virtual SMESH::long_array* GetMeshInfo();
1045 virtual SMESH::long_array* GetNbElementsByType();
1046 virtual SMESH::array_of_ElementType* GetTypes();
1047 virtual SMESH::SMESH_Mesh_ptr GetMesh();
1048 virtual bool IsMeshInfoCorrect() { return true; }
1049 virtual SALOMEDS::TMPFile* GetVtkUgStream();
1052 Controls::Filter myFilter;
1053 Predicate_i* myPredicate;
1054 SMESH_Mesh_var myMesh;
1056 std::vector< SMESH_GroupBase_i* > myBaseGroups;
1063 class SMESH_I_EXPORT FilterLibrary_i: public virtual POA_SMESH::FilterLibrary,
1064 public virtual SALOME::GenericObj_i
1067 FilterLibrary_i( const char* theFileName );
1071 Filter_ptr Copy( const char* theFilterName );
1073 CORBA::Boolean Add ( const char* theFilterName, Filter_ptr theFilter );
1074 CORBA::Boolean AddEmpty( const char* theFilterName, ElementType theType );
1075 CORBA::Boolean Delete ( const char* theFilterName );
1076 CORBA::Boolean Replace ( const char* theFilterName,
1077 const char* theNewName,
1078 Filter_ptr theFilter );
1080 CORBA::Boolean Save();
1081 CORBA::Boolean SaveAs( const char* aFileName );
1083 CORBA::Boolean IsPresent( const char* aFilterName );
1084 CORBA::Long NbFilters( ElementType );
1085 string_array* GetNames( ElementType );
1086 string_array* GetAllNames();
1087 void SetFileName( const char* theFileName );
1088 char* GetFileName();
1092 LDOM_Document myDoc;
1093 FilterManager_var myFilterMgr;
1101 class SMESH_I_EXPORT FilterManager_i: public virtual POA_SMESH::FilterManager,
1102 public virtual SALOME::GenericObj_i
1108 MinimumAngle_ptr CreateMinimumAngle();
1109 AspectRatio_ptr CreateAspectRatio();
1110 AspectRatio3D_ptr CreateAspectRatio3D();
1111 Warping_ptr CreateWarping();
1112 Taper_ptr CreateTaper();
1113 Skew_ptr CreateSkew();
1114 Area_ptr CreateArea();
1115 Volume3D_ptr CreateVolume3D();
1116 MaxElementLength2D_ptr CreateMaxElementLength2D();
1117 MaxElementLength3D_ptr CreateMaxElementLength3D();
1118 Length_ptr CreateLength();
1119 Length2D_ptr CreateLength2D();
1120 Length3D_ptr CreateLength3D();
1121 Deflection2D_ptr CreateDeflection2D();
1122 NodeConnectivityNumber_ptr CreateNodeConnectivityNumber();
1123 MultiConnection_ptr CreateMultiConnection();
1124 MultiConnection2D_ptr CreateMultiConnection2D();
1125 BallDiameter_ptr CreateBallDiameter();
1127 BelongToMeshGroup_ptr CreateBelongToMeshGroup();
1128 BelongToGeom_ptr CreateBelongToGeom();
1129 BelongToPlane_ptr CreateBelongToPlane();
1130 BelongToCylinder_ptr CreateBelongToCylinder();
1131 BelongToGenSurface_ptr CreateBelongToGenSurface();
1133 LyingOnGeom_ptr CreateLyingOnGeom();
1135 FreeBorders_ptr CreateFreeBorders();
1136 FreeEdges_ptr CreateFreeEdges();
1137 FreeNodes_ptr CreateFreeNodes();
1138 FreeFaces_ptr CreateFreeFaces();
1140 EqualNodes_ptr CreateEqualNodes();
1141 EqualEdges_ptr CreateEqualEdges();
1142 EqualFaces_ptr CreateEqualFaces();
1143 EqualVolumes_ptr CreateEqualVolumes();
1145 RangeOfIds_ptr CreateRangeOfIds();
1146 BadOrientedVolume_ptr CreateBadOrientedVolume();
1147 BareBorderFace_ptr CreateBareBorderFace();
1148 BareBorderVolume_ptr CreateBareBorderVolume();
1149 OverConstrainedFace_ptr CreateOverConstrainedFace();
1150 OverConstrainedVolume_ptr CreateOverConstrainedVolume();
1151 LinearOrQuadratic_ptr CreateLinearOrQuadratic();
1152 GroupColor_ptr CreateGroupColor();
1153 ElemGeomType_ptr CreateElemGeomType();
1154 ElemEntityType_ptr CreateElemEntityType();
1155 CoplanarFaces_ptr CreateCoplanarFaces();
1156 ConnectedElements_ptr CreateConnectedElements();
1158 LessThan_ptr CreateLessThan();
1159 MoreThan_ptr CreateMoreThan();
1160 EqualTo_ptr CreateEqualTo();
1162 LogicalNOT_ptr CreateLogicalNOT();
1163 LogicalAND_ptr CreateLogicalAND();
1164 LogicalOR_ptr CreateLogicalOR();
1166 Filter_ptr CreateFilter();
1168 FilterLibrary_ptr LoadLibrary( const char* aFileName );
1169 FilterLibrary_ptr CreateLibrary();
1170 CORBA::Boolean DeleteLibrary( const char* aFileName );
1175 GetPredicate( SMESH::Predicate_ptr thePredicate );
1177 const char* FunctorTypeToString(SMESH::FunctorType ft);
1178 SMESH::FunctorType StringToFunctorType(const char* str);