X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROGUI%2FHYDROGUI_ProfileInterpolateOp.cxx;h=7caefc3b9a22c621b75f3b40431c67b9bb0df118;hb=d8b6bd16c744f2704c01fc83f9426aea1849f659;hp=dab1a59e4f123294089f5b96f0098d605960e4bc;hpb=3524c916e16d5c5c545c0ddbda4b570139612afe;p=modules%2Fhydro.git diff --git a/src/HYDROGUI/HYDROGUI_ProfileInterpolateOp.cxx b/src/HYDROGUI/HYDROGUI_ProfileInterpolateOp.cxx index dab1a59e..7caefc3b 100644 --- a/src/HYDROGUI/HYDROGUI_ProfileInterpolateOp.cxx +++ b/src/HYDROGUI/HYDROGUI_ProfileInterpolateOp.cxx @@ -136,7 +136,7 @@ bool HYDROGUI_ProfileInterpolateOp::processApply( int& theUpdateFlags, QString& if ( !aRiver.IsNull() ) { startDocOperation(); - //aRiver->Interpolate( anIterp ); + aRiver->Interpolate( anIterp ); if ( anIterp->GetErrorCode() == OK ) commitDocOperation(); else @@ -176,9 +176,10 @@ void HYDROGUI_ProfileInterpolateOp::updatePreview() if ( anIterp ) { updateInterpolator( anIterp ); - if ( anIterp->Calculate() == OK ) + anIterp->Calculate(); + if ( anIterp->GetErrorCode() == OK ) { - TopoDS_Shape aShape = previewShape( anIterp, aDlg->profileNumber() ); + TopoDS_Shape aShape = previewShape( anIterp ); if ( !aShape.IsNull() ) { myPreview = new AIS_Shape( aShape ); @@ -284,22 +285,22 @@ HYDROData_IProfilesInterpolator* HYDROGUI_ProfileInterpolateOp::interpolator( co return aRes; } -TopoDS_Shape HYDROGUI_ProfileInterpolateOp::previewShape( HYDROData_IProfilesInterpolator* theInterp, int theNumber ) const +TopoDS_Shape HYDROGUI_ProfileInterpolateOp::previewShape( HYDROData_IProfilesInterpolator* theInterp ) const { TopoDS_Compound aPreviewShape; if ( theInterp ) { BRep_Builder aBuilder; aBuilder.MakeCompound( aPreviewShape ); - for ( int i = 0; i < theNumber; i++ ) + for ( int i = 0; i < theInterp->GetCalculatedProfilesNumber(); i++ ) { NCollection_Sequence pointSeq; std::vector aPoints = theInterp->GetResultProfile( i ); - for ( int i = 0; i < aPoints.size(); i += 3 ) + for ( int i = 0; i < (int) aPoints.size(); i += 3 ) pointSeq.Append( gp_XYZ( aPoints[i], aPoints[i+1], aPoints[i+2] ) ); TopoDS_Shape aWire = HYDROData_PolylineXY::BuildWire( HYDROData_IPolyline::SECTION_SPLINE, false, pointSeq ); if ( !aWire.IsNull() ) - aBuilder.Add( aWire, aPreviewShape ); + aBuilder.Add( aPreviewShape, aWire ); } }