{
const Point& aSectPoint = aSectPointsList.Value( k );
+ QString anXStr = QString::number( aSectPoint.X(), 'f', 2 );
+ QString anYStr = QString::number( aSectPoint.Y(), 'f', 2 );
aResList << QString( "%1.AddPoint( %2, gp_XY( %3, %4 ) );" ).arg( aPolylineName )
- .arg( i - 1 ).arg( aSectPoint.X() ).arg( aSectPoint.Y() );
+ .arg( i - 1 ).arg( anXStr ).arg( anYStr );
}
}
}
return aPath;
}
+void HYDROData_PolylineXY::UpdateLocalCS( double theDx, double theDy )
+{
+ NCollection_Sequence<TCollection_AsciiString> aSectNames;
+ NCollection_Sequence<HYDROData_PolylineXY::SectionType> aSectTypes;
+ NCollection_Sequence<bool> aSectClosures;
+ GetSections( aSectNames, aSectTypes, aSectClosures );
+
+ 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 );
+ }
+ SetToUpdate( true );
+}
+
+