From: isn Date: Mon, 14 Nov 2016 13:10:14 +0000 (+0300) Subject: edit of stream (show profiles after edit op) X-Git-Tag: v1.6~47 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9d89499d1c2283b3ce8c95ca63c6ab68950b6533;p=modules%2Fhydro.git edit of stream (show profiles after edit op) --- diff --git a/src/HYDROGUI/HYDROGUI_StreamOp.cxx b/src/HYDROGUI/HYDROGUI_StreamOp.cxx index 72702a6a..95f49991 100755 --- a/src/HYDROGUI/HYDROGUI_StreamOp.cxx +++ b/src/HYDROGUI/HYDROGUI_StreamOp.cxx @@ -117,32 +117,33 @@ void HYDROGUI_StreamOp::startOperation() // Hydraulic axis Handle(HYDROData_PolylineXY) aHydraulicAxis = myEditedObject->GetHydraulicAxis(); + + TopoDS_Face aPlane; + HYDROData_Stream::BuildRefFace( aPlane ) ; if ( !aHydraulicAxis.IsNull() ) - { myHydAxis = aHydraulicAxis->GetName(); - TopoDS_Face aPlane; - HYDROData_Stream::BuildRefFace( aPlane ) ; - - // Stream profiles - HYDROData_SequenceOfObjects aStreamProfiles = myEditedObject->GetProfiles(); - for ( int i = 1, n = aStreamProfiles.Length(); i <= n; ++i ) - { - Handle(HYDROData_Profile) aProfile = - Handle(HYDROData_Profile)::DownCast( aStreamProfiles.Value( i ) ); - if ( aProfile.IsNull() ) - continue; + // Stream profiles + HYDROData_SequenceOfObjects aStreamProfiles = myEditedObject->GetProfiles(); + for ( int i = 1, n = aStreamProfiles.Length(); i <= n; ++i ) + { + Handle(HYDROData_Profile) aProfile = + Handle(HYDROData_Profile)::DownCast( aStreamProfiles.Value( i ) ); + if ( aProfile.IsNull() ) + continue; - QString aProfileName = aProfile->GetName(); + QString aProfileName = aProfile->GetName(); + myProfiles << aProfileName; + if (!aHydraulicAxis.IsNull()) + { Standard_Real aProfilePar = 0.0; HYDROData_Stream::HasIntersection( aHydraulicAxis, aProfile, aPlane, aProfilePar ); - - myProfiles << aProfileName; myProfileParams << aProfilePar; - } - } + + } + } }