Salome HOME
17.12.2013. Added Partition algorithm (draft version).
[modules/hydro.git] / src / HYDROData / HYDROData_PolylineXY.h
index 315fe7f1932d9988ca6ca8893b1040509df203d2..d14212e163ab7e52694d798d7752b2236b572510 100644 (file)
@@ -7,6 +7,8 @@
 DEFINE_STANDARD_HANDLE(HYDROData_PolylineXY, HYDROData_IPolyline)
 
 class QPainterPath;
+class TopoDS_Wire;
+class gp_XYZ;
 
 /**\class HYDROData_PolylineXY
  * \brief Class that stores/retreives information about the 
@@ -43,6 +45,28 @@ public:
    */
   HYDRODATA_EXPORT virtual QVariant GetDataVariant();
 
+  /**
+   * Returns default wire color for new polyline.
+   */
+  HYDRODATA_EXPORT static QColor DefaultWireColor();
+
+public:
+
+  /**
+   * Returns the presentation of polyline section in CAS maner.
+   */
+  HYDRODATA_EXPORT static TopoDS_Wire BuildWire( const SectionType&                  theType,
+                                                 const bool&                         theIsClosed,
+                                                 const NCollection_Sequence<gp_XYZ>& thePoints );
+
+  /**
+   * Returns the presentation of polyline section in Qt maner.
+   */
+  HYDRODATA_EXPORT static void BuildPainterPath( QPainterPath&                       thePath,
+                                                 const SectionType&                  theType,
+                                                 const bool&                         theIsClosed,
+                                                 const NCollection_Sequence<gp_XYZ>& thePoints );
+
 public:
 
   /**
@@ -62,7 +86,14 @@ public:
    */
   HYDRODATA_EXPORT bool IsClosed() const;
 
-  
+   /**
+   * Returns the distance beetwen first and point with index thePointIndex
+   * at the section with index theSectionIndex. -1 is returned if error is occurred.
+   */
+  HYDRODATA_EXPORT double GetDistance( const int theSectionIndex,
+                                       const int thePointIndex ) const;
+
+
   /**
    * Returns number of sections.
    */