}
}
+ if ( myCurve->getNbSections() <= 0 )
+ {
+ theErrorMsg = tr( "EMPTY_POLYLINE_DATA" );
+ return false;
+ }
+
Handle(HYDROData_PolylineXY) aPolylineObj;
if( myIsEdit )
{
if( aPolylineObj.IsNull() )
return false;
- aPolylineObj->SetName(aPolylineName);
+ aPolylineObj->SetName( aPolylineName );
for ( int i = 0 ; i < myCurve->getNbSections() ; i++ )
{
// Add the points fro section
CurveCreator::Coordinates aCurveCoords = myCurve->getPoints( i );
+
+ if ( aCurveCoords.size() <= 2 )
+ {
+ theErrorMsg = tr( "NUMBER_OF_SECTION_POINTS_INCORRECT" );
+ return false;
+ }
+
for ( int k = 0 ; k + 1 < aCurveCoords.size() ; k++ )
{
HYDROData_PolylineXY::Point aSectPoint;