Salome HOME
patch for correct compilation on Linux
[modules/hydro.git] / src / HYDROData / HYDROData_PolylineXY.h
index 315fe7f1932d9988ca6ca8893b1040509df203d2..5ce65a94cb72fa52920917ca99db967fb3b65191 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,23 @@ public:
    */
   HYDRODATA_EXPORT virtual QVariant GetDataVariant();
 
+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 +81,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.
    */