class TopoDS_Vertex;
class TopoDS_Edge;
class TopTools_SequenceOfShape;
+class TopTools_ListOfShape;
class HYDRODATA_EXPORT HYDROData_ShapesTool {
const TopAbs_ShapeEnum& theExpType,
TopTools_SequenceOfShape& theOutShapes );
+ /**
+ * \brief Gets the first and last vertex from shape. Shape can be an Edge or Wire.
+ * \param theInShape object to explore
+ * \param theFirstVertex[out] first shape vertex
+ * \param theLastVertex[out] last shape vertex
+ * \return true if shape is of correct type
+ */
+ static bool Vertices( const TopoDS_Shape& theInShape,
+ TopoDS_Vertex& theFirstVertex,
+ TopoDS_Vertex& theLastVertex,
+ const bool theIsCumOri = false );
+
/**
* \brief Compare two vertices on coordinates equation.
* \param theFirstVert first vertex
* \param theSecondVert second vertex
+ * \param theIs2D flag indicating the 2D equation (ie. z coord will be ignored)
* \return \c true if cooredinates of vertices is equals
*/
static bool IsVerticesEquals( const TopoDS_Vertex& theFirstVert,
- const TopoDS_Vertex& theSecondVert );
+ const TopoDS_Vertex& theSecondVert,
+ const bool theIs2D = false );
/**
* \brief Compare two edges on points coordinates equation.
* \param theFirstVert first edge
* \param theSecondVert second edge
+ * \param theIs2D flag indicating the 2D equation (ie. z coord will be ignored)
* \return \c true if coordinates of all points of given edges is equals
*/
static bool IsEdgesEquals( const TopoDS_Edge& theFirstEdge,
- const TopoDS_Edge& theSecondEdge );
+ const TopoDS_Edge& theSecondEdge,
+ const bool theIs2D = false );
+
+ /**
+ * \brief Adds the sequence of shapes to other sequence.
+ * \param theShapes sequence to which the shapes will be added
+ * \param theShapesToAdd sequence from which the shapes will be extracted
+ */
+ static void AddShapes( TopTools_SequenceOfShape& theShapes,
+ const TopTools_SequenceOfShape& theShapesToAdd );
+
+ /**
+ * \brief Adds the list of shapes to the sequence.
+ * \param theShapes sequence to which the shapes will be added
+ * \param theShapesToAdd list from which the shapes will be extracted
+ */
+ static void AddShapes( TopTools_SequenceOfShape& theShapes,
+ const TopTools_ListOfShape& theShapesToAdd );
+
+ /**
+ * \brief Adds the sequence of shapes to the list.
+ * \param theShapes list to which the shapes will be added
+ * \param theShapesToAdd sequence from which the shapes will be extracted
+ */
+ static void AddShapes( TopTools_ListOfShape& theShapes,
+ const TopTools_SequenceOfShape& theShapesToAdd );
+
+ /**
+ * \brief Adds the list of shapes to other list.
+ * \param theShapes list to which the shapes will be added
+ * \param theShapesToAdd list from which the shapes will be extracted
+ */
+ static void AddShapes( TopTools_ListOfShape& theShapes,
+ const TopTools_ListOfShape& theShapesToAdd );
+
+
+ /**
+ * \brief Explode and dump the shape to the stream.
+ */
+ static void DumpShapeSubShapes( std::ostream& theStream,
+ const char* theTitle,
+ const TopoDS_Shape& theShape,
+ const TopAbs_ShapeEnum& theExpType );
+
+ /**
+ * \brief Dump the shapes sequence to the stream.
+ */
+ static void DumpSequenceOfShapes( std::ostream& theStream,
+ const TopTools_SequenceOfShape& theShapes );
};