+
+
+ /*
+ Class : ElementsOnShape
+ Description : Predicate elements that lying on indicated shape
+ (1D, 2D or 3D)
+ */
+ class SMESHCONTROLS_EXPORT ElementsOnShape : public virtual Predicate
+ {
+ public:
+ ElementsOnShape();
+ ~ElementsOnShape();
+
+ virtual void SetMesh (const SMDS_Mesh* theMesh);
+ virtual bool IsSatisfy (long theElementId);
+ virtual SMDSAbs_ElementType GetType() const;
+
+ void SetTolerance (const double theToler);
+ double GetTolerance() const;
+ void SetAllNodes (bool theAllNodes);
+ bool GetAllNodes() const { return myAllNodesFlag; }
+ void SetShape (const TopoDS_Shape& theShape,
+ const SMDSAbs_ElementType theType);
+
+ private:
+ void addShape (const TopoDS_Shape& theShape);
+ void process();
+ void process (const SMDS_MeshElement* theElem);
+
+ private:
+ TMeshModifTracer myMeshModifTracer;
+ TColStd_MapOfInteger myIds;
+ SMDSAbs_ElementType myType;
+ TopoDS_Shape myShape;
+ double myToler;
+ bool myAllNodesFlag;
+
+ TopTools_MapOfShape myShapesMap;
+ TopAbs_ShapeEnum myCurShapeType; // type of current sub-shape
+ BRepClass3d_SolidClassifier myCurSC; // current SOLID
+ GeomAPI_ProjectPointOnSurf myCurProjFace; // current FACE
+ TopoDS_Face myCurFace; // current FACE
+ GeomAPI_ProjectPointOnCurve myCurProjEdge; // current EDGE
+ gp_Pnt myCurPnt; // current VERTEX
+ };
+
+ typedef boost::shared_ptr<ElementsOnShape> ElementsOnShapePtr;
+
+
+ /*
+ Class : FreeFaces
+ Description : Predicate for free faces
+ */
+ class SMESHCONTROLS_EXPORT FreeFaces: public virtual Predicate{
+ public:
+ FreeFaces();
+ virtual void SetMesh( const SMDS_Mesh* theMesh );
+ virtual bool IsSatisfy( long theElementId );
+ virtual SMDSAbs_ElementType GetType() const;
+
+ private:
+ const SMDS_Mesh* myMesh;
+ };
+
+ /*
+ Class : LinearOrQuadratic
+ Description : Predicate for free faces
+ */
+ class SMESHCONTROLS_EXPORT LinearOrQuadratic: public virtual Predicate{
+ public:
+ LinearOrQuadratic();
+ virtual void SetMesh( const SMDS_Mesh* theMesh );
+ virtual bool IsSatisfy( long theElementId );
+ void SetType( SMDSAbs_ElementType theType );
+ virtual SMDSAbs_ElementType GetType() const;
+
+ private:
+ const SMDS_Mesh* myMesh;
+ SMDSAbs_ElementType myType;
+ };
+ typedef boost::shared_ptr<LinearOrQuadratic> LinearOrQuadraticPtr;
+
+ /*
+ Class : GroupColor
+ Description : Functor for check color of group to whic mesh element belongs to
+ */
+ class SMESHCONTROLS_EXPORT GroupColor: public virtual Predicate{
+ public:
+ GroupColor();
+ virtual void SetMesh( const SMDS_Mesh* theMesh );
+ virtual bool IsSatisfy( long theElementId );
+ void SetType( SMDSAbs_ElementType theType );
+ virtual SMDSAbs_ElementType GetType() const;
+ void SetColorStr( const TCollection_AsciiString& );
+ void GetColorStr( TCollection_AsciiString& ) const;