Salome HOME
Creation of group for channel (Feature #242).
[modules/hydro.git] / src / HYDROData / HYDROData_ShapesTool.h
1
2 #ifndef HYDROData_ShapesTool_HeaderFile
3 #define HYDROData_ShapesTool_HeaderFile
4
5 #include "HYDROData.h"
6
7 #include <TopAbs_ShapeEnum.hxx>
8
9 class TopoDS_Shape;
10 class TopoDS_Vertex;
11 class TopoDS_Edge;
12 class TopTools_SequenceOfShape;
13
14 class HYDRODATA_EXPORT HYDROData_ShapesTool {
15
16 public:
17
18   /**
19    * \brief Explore the incoming shape to shapes with given type.
20    * \param theInShape object to explore
21    * \param theExpType type to explore
22    * \param theOutShapes[out] list of result shapes if any
23    */
24   static void                           ExploreShapeToShapes( const TopoDS_Shape&       theInShape,
25                                                               const TopAbs_ShapeEnum&   theExpType,
26                                                               TopTools_SequenceOfShape& theOutShapes );
27
28   /**
29    * \brief Gets the first and last vertex from shape. Shape can be an Edge or Wire.
30    * \param theInShape object to explore
31    * \param theFirstVertex[out] first shape vertex
32    * \param theLastVertex[out] last shape vertex
33    * \return true if shape is of correct type
34    */
35   static bool                           Vertices( const TopoDS_Shape& theInShape,
36                                                   TopoDS_Vertex&      theFirstVertex,
37                                                   TopoDS_Vertex&      theLastVertex,
38                                                   const bool          theIsCumOri = false );
39
40   /**
41    * \brief Compare two vertices on coordinates equation.
42    * \param theFirstVert first vertex
43    * \param theSecondVert second vertex
44    * \param theIs2D flag indicating the 2D equation (ie. z coord will be ignored)
45    * \return \c true if cooredinates of vertices is equals
46    */
47   static bool                           IsVerticesEquals( const TopoDS_Vertex& theFirstVert,
48                                                           const TopoDS_Vertex& theSecondVert,
49                                                           const bool           theIs2D = false  );
50
51   /**
52    * \brief Compare two edges on points coordinates equation.
53    * \param theFirstVert first edge
54    * \param theSecondVert second edge
55    * \param theIs2D flag indicating the 2D equation (ie. z coord will be ignored)
56    * \return \c true if coordinates of all points of given edges is equals
57    */
58   static bool                           IsEdgesEquals( const TopoDS_Edge& theFirstEdge,
59                                                        const TopoDS_Edge& theSecondEdge,
60                                                        const bool         theIs2D = false );
61 };
62
63
64 #endif
65
66