From b4cac59e90d65d42c74ec15671b9d21e58dd412f Mon Sep 17 00:00:00 2001 From: asl Date: Tue, 30 Jun 2015 09:44:25 +0300 Subject: [PATCH] #refs 585: the method IsCustom() --- src/HYDROData/HYDROData_PolylineXY.cxx | 14 ++++++++++++++ src/HYDROData/HYDROData_PolylineXY.h | 2 ++ 2 files changed, 16 insertions(+) diff --git a/src/HYDROData/HYDROData_PolylineXY.cxx b/src/HYDROData/HYDROData_PolylineXY.cxx index ab34af79..8071d35c 100755 --- a/src/HYDROData/HYDROData_PolylineXY.cxx +++ b/src/HYDROData/HYDROData_PolylineXY.cxx @@ -1080,6 +1080,11 @@ HYDROData_PolylineXY::PointsList HYDROData_PolylineXY::GetPoints( const int theS { PointsList aResList; + if( IsCustom() ) + { + //TODO: make interpolation to fill the list + } + Handle(TDataStd_RealList) aListX, aListY; getPointsLists( theSectionIndex, aListX, aListY, false ); if ( aListX.IsNull() || aListY.IsNull() || aListX->IsEmpty() ) @@ -1174,3 +1179,12 @@ void HYDROData_PolylineXY::Transform( const QTransform& theTrsf ) Update(); } +bool HYDROData_PolylineXY::IsCustom() const +{ + bool isNull = getPolylineShape().IsNull(); + int aNbPoints = 0; + for( int i=0, n=NbSections(); i