27#ifndef SMESH_HypoFilter_HeaderFile
28#define SMESH_HypoFilter_HeaderFile
38#include <TopoDS_Shape.hxx>
39#include <TopTools_MapOfShape.hxx>
48 const TopoDS_Shape& aShape)
const = 0;
83 bool IsEmpty()
const {
return myNbPredicates == 0; }
89 const TopoDS_Shape& aShape)
const;
93 bool IsAny()
const {
return myNbPredicates > 0; }
116 myPredicates[ myNbPredicates++ ] = pred;
122 template <
typename TValue>
129 if ( _comp == EQUAL )
return _val == Value( aHyp );
130 else if ( _comp == NOT_EQUAL )
return _val != Value( aHyp );
131 else if ( _comp == MORE )
return _val < Value( aHyp );
132 else return _val > Value( aHyp );
140 const TopoDS_Shape& aShape)
const;
145 { _comp = comp; _val = hypType; }
151 { _comp = comp; _val = dim; }
159 const TopoDS_Shape& aShape)
const;
166 const TopoDS_Shape& aShape)
const;
173 const TopoDS_Shape& aShape)
const;
182 :_shape(shape),_mesh(mesh) { findPreferable(); }
184 const TopoDS_Shape& aShape)
const;
185 void findPreferable();
190 const TopoDS_Shape& aShape)
const;
#define SMESH_EXPORT
Definition: SMESH_SMESH.hxx:37
Definition: SMESH_HypoFilter.hxx:57
Comparison
Definition: SMESH_HypoFilter.hxx:108
bool IsAny() const
return true if contains no predicates
Definition: SMESH_HypoFilter.hxx:93
SMESH_HypoFilter(const SMESH_HypoFilter &)
Definition: SMESH_HypoFilter.hxx:110
void add(Logical bool_op, SMESH_HypoPredicate *pred)
Definition: SMESH_HypoFilter.hxx:112
Logical
Definition: SMESH_HypoFilter.hxx:107
@ AND
Definition: SMESH_HypoFilter.hxx:107
bool IsEmpty() const
Definition: SMESH_HypoFilter.hxx:83
int myNbPredicates
Definition: SMESH_HypoFilter.hxx:103
Definition: SMESH_HypoFilter.hxx:45
virtual ~SMESH_HypoPredicate()
Definition: SMESH_HypoFilter.hxx:50
int _logical_op
Definition: SMESH_HypoFilter.hxx:52
virtual bool IsOk(const SMESH_Hypothesis *aHyp, const TopoDS_Shape &aShape) const =0
Definition: SMESH_Hypothesis.hxx:48
Definition: SMESH_Mesh.hxx:80
TFloatVector TValue
Definition: MED_Structures.hxx:757
Definition: SMESH_HypoFilter.hxx:155
int _shapeType
Definition: SMESH_HypoFilter.hxx:156
Definition: SMESH_HypoFilter.hxx:149
DimPredicate(Comparison comp, int dim)
Definition: SMESH_HypoFilter.hxx:150
Definition: SMESH_HypoFilter.hxx:162
InstancePredicate(const SMESH_Hypothesis *hypo)
Definition: SMESH_HypoFilter.hxx:164
const SMESH_Hypothesis * _hypo
Definition: SMESH_HypoFilter.hxx:163
Definition: SMESH_HypoFilter.hxx:169
IsAssignedToPredicate(const TopoDS_Shape &mainShape)
Definition: SMESH_HypoFilter.hxx:171
TopoDS_Shape _mainShape
Definition: SMESH_HypoFilter.hxx:170
Definition: SMESH_HypoFilter.hxx:188
Definition: SMESH_HypoFilter.hxx:176
TopTools_MapOfShape _preferableShapes
Definition: SMESH_HypoFilter.hxx:179
const SMESH_Mesh & _mesh
Definition: SMESH_HypoFilter.hxx:178
TopoDS_Shape _shape
Definition: SMESH_HypoFilter.hxx:177
IsMoreLocalThanPredicate(const TopoDS_Shape &shape, const SMESH_Mesh &mesh)
Definition: SMESH_HypoFilter.hxx:180
Definition: SMESH_HypoFilter.hxx:136
NamePredicate(std::string name)
Definition: SMESH_HypoFilter.hxx:138
std::string _name
Definition: SMESH_HypoFilter.hxx:137
Definition: SMESH_HypoFilter.hxx:143
TypePredicate(Comparison comp, int hypType)
Definition: SMESH_HypoFilter.hxx:144
Definition: SMESH_HypoFilter.hxx:123
virtual TValue Value(const SMESH_Hypothesis *aHyp) const =0
virtual bool IsOk(const SMESH_Hypothesis *aHyp, const TopoDS_Shape &) const
Definition: SMESH_HypoFilter.hxx:127
TValue _val
Definition: SMESH_HypoFilter.hxx:125
Comparison _comp
Definition: SMESH_HypoFilter.hxx:124