]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
edit of stream (show profiles after edit op)
authorisn <isn@opencascade.com>
Mon, 14 Nov 2016 13:10:14 +0000 (16:10 +0300)
committerisn <isn@opencascade.com>
Mon, 14 Nov 2016 13:10:14 +0000 (16:10 +0300)
src/HYDROGUI/HYDROGUI_StreamOp.cxx

index 72702a6a063d41525f5a69d6509bb9c65d554300..95f499919eb608e6dee0a6d517091ac0ff95bbe4 100755 (executable)
@@ -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;
-
         }
-      }
+
+      }      
+
     }
   }