+ gp_XY aDelta( theDx, theDy );
+ for ( int i = 0, aNbSects = aSectNames.Size(); i < aNbSects; i++ )
+ {
+ PointsList aPoints = GetPoints( i );
+ for( int j = 1, n = aPoints.Size(); j <= n; ++j )
+ {
+ Point& aPoint = aPoints.ChangeValue( j );
+ aPoint += aDelta;
+ }
+ SetPoints( i, aPoints );
+ }
+ Changed( Geom_2d );
+}
+
+void HYDROData_PolylineXY::Transform( const QTransform& theTrsf )
+{
+ NCollection_Sequence<TCollection_AsciiString> aSectNames;
+ NCollection_Sequence<HYDROData_PolylineXY::SectionType> aSectTypes;
+ NCollection_Sequence<bool> aSectClosures;
+ GetSections( aSectNames, aSectTypes, aSectClosures );
+
+ for ( int i = 0, aNbSects = aSectNames.Size(); i < aNbSects; i++ ) {
+ PointsList aPoints = GetPoints( i );
+ for( int j = 1, n = aPoints.Size(); j <= n; ++j ) {
+ Point& aPoint = aPoints.ChangeValue( j );
+
+ QPointF aTrsfPoint = theTrsf.map( QPointF( aPoint.X(), aPoint.Y() ) );
+
+ aPoint.SetX( aTrsfPoint.x() );
+ aPoint.SetY( aTrsfPoint.y() );
+ }
+ SetPoints( i, aPoints );
+ }
+
+ Update();
+}
+
+bool HYDROData_PolylineXY::IsCustom() const
+{
+ if( myIsInCustomFlag )
+ return false;
+
+ bool isNull = GetShape().IsNull();
+ int aNbPoints = 0;
+
+ HYDROData_PolylineXY* aThat = const_cast<HYDROData_PolylineXY*>( this );
+ aThat->myIsInCustomFlag = true;
+ for( int i=0, n=NbSections(); i<n; i++ )
+ aNbPoints += NbPoints( i );
+ aThat->myIsInCustomFlag = false;
+
+ return !isNull && aNbPoints == 0;
+}
+
+void HYDROData_PolylineXY::Interpolate()
+{
+ ImportShape( GetShape(), true );
+}