From 9d89499d1c2283b3ce8c95ca63c6ab68950b6533 Mon Sep 17 00:00:00 2001 From: isn Date: Mon, 14 Nov 2016 16:10:14 +0300 Subject: [PATCH] edit of stream (show profiles after edit op) --- src/HYDROGUI/HYDROGUI_StreamOp.cxx | 35 +++++++++++++++--------------- 1 file changed, 18 insertions(+), 17 deletions(-) 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; - } - } + + } + } } -- 2.39.2