- /*
- int aDimInt = 3;
- if( myCurve->getDimension() == CurveCreator::Dim2d )
- aDimInt = 2;
- aProfileObj->SetDimension(aDimInt);
- QList<PolylineSection> aPolylineData;
- for( int i=0 ; i < myCurve->getNbSections() ; i++ ){
- PolylineSection aSect;
- aSect.mySectionName = HYDROGUI_Tool::ToExtString( QString::fromLocal8Bit(myCurve->getSectionName(i).c_str()));
- aSect.myIsClosed = myCurve->isClosed(i);
- aSect.myType = PolylineSection::SECTION_POLYLINE;
- if( myCurve->getSectionType(i) == CurveCreator::Spline ){
- aSect.myType = PolylineSection::SECTION_SPLINE;
- }
- CurveCreator::Coordinates aCoords = myCurve->getPoints(i);
- for( int j = 0 ; j < aCoords.size() ; j++ ){
- aSect.myCoords << aCoords.at(j);
- }
- aPolylineData << aSect;
+
+ 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;
+
+ aProfileParamPoint.SetX( aCurveCoords.at( k ) );
+ k++;
+ aProfileParamPoint.SetY( aCurveCoords.at( k ) );
+
+ aProfileParamPoints.Append( aProfileParamPoint );
+ }
+ aProfileObj->SetParametricPoints( aProfileParamPoints );
+
+ HYDROData_ProfileUZ::SectionType aSectType = HYDROData_ProfileUZ::SECTION_POLYLINE;
+ if ( myProfile->getSectionType( 0 ) == CurveCreator::Spline )
+ aSectType = HYDROData_ProfileUZ::SECTION_SPLINE;
+
+ aProfileUZ->SetSectionType( 0, aSectType );
+
+ if ( !myIsEdit )
+ {
+ aProfileObj->SetBorderColor( HYDROData_Profile::DefaultBorderColor() );