]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
Minor corrections.
authormzn <mzn@opencascade.com>
Fri, 22 Nov 2013 07:32:56 +0000 (07:32 +0000)
committermzn <mzn@opencascade.com>
Fri, 22 Nov 2013 07:32:56 +0000 (07:32 +0000)
src/HYDROData/HYDROData_CalculationCase.cxx

index 4a75528ca44800db58791a6f757aa3f61d79b865..e6976786bf3c1df5c4f3d67b8782a8cab972935f 100644 (file)
@@ -394,8 +394,14 @@ TopoDS_Shell HYDROData_CalculationCase::GetShell()
 
     TopoDS_Shape aRegionShape = aRegion->GetShape();
     if( !aRegionShape.IsNull() ) {
-      TopExp_Explorer anExp( aRegionShape, TopAbs_FACE );
-      if ( anExp.More() ) {
+      if ( aRegionShape.ShapeType() == TopAbs_FACE ) {
+        TopoDS_Face aFace = TopoDS::Face( aRegionShape );
+        if ( !aFace.IsNull() ) {
+          aFacesList.Append( aFace );
+          aSewing.Add( aFace );
+        }
+      } else {
+        TopExp_Explorer anExp( aRegionShape, TopAbs_FACE );
         for ( ; anExp.More(); anExp.Next() ) {
           TopoDS_Face aFace = TopoDS::Face( anExp.Current() );
           if ( !aFace.IsNull() ) {
@@ -403,11 +409,6 @@ TopoDS_Shell HYDROData_CalculationCase::GetShell()
             aSewing.Add( aFace );
           }
         }
-      } else {
-        if ( aRegionShape.ShapeType() == TopAbs_FACE ) {
-          aFacesList.Append( aRegionShape );
-        }
-        aSewing.Add( aRegionShape );
       }
     }
   } // regions iterator