}
}
+ 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;
HYDROData_ProfileUZ::PointsList aProfileParamPoints;
CurveCreator::Coordinates aCurveCoords = myProfile->getPoints( 0 );
+ if ( aCurveCoords.size() <= 2 )
+ {
+ theErrorMsg = tr( "NUMBER_OF_PROFILE_POINTS_INCORRECT" );
+ return false;
+ }
+
for ( int k = 0 ; k + 1 < aCurveCoords.size() ; k++ )
{
HYDROData_ProfileUZ::Point aProfileParamPoint;
<source>EDIT_POLYLINE</source>
<translation>Edit polyline</translation>
</message>
+ <message>
+ <source>EMPTY_POLYLINE_DATA</source>
+ <translation>No one section is created for polyline, should be at least one.</translation>
+ </message>
+ <message>
+ <source>NUMBER_OF_SECTION_POINTS_INCORRECT</source>
+ <translation>Number of points in each polyline section should not be less than 2.</translation>
+ </message>
</context>
<context>
<source>EDIT_PROFILE</source>
<translation>Edit profile</translation>
</message>
+ <message>
+ <source>NUMBER_OF_PROFILE_POINTS_INCORRECT</source>
+ <translation>Number of profile points should not be less than 2.</translation>
+ </message>
</context>
<context>