From 765b0f3571e1e31aed63bce7d9646bff50e9dc32 Mon Sep 17 00:00:00 2001 From: mzn Date: Fri, 22 Nov 2013 07:32:56 +0000 Subject: [PATCH] Minor corrections. --- src/HYDROData/HYDROData_CalculationCase.cxx | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/HYDROData/HYDROData_CalculationCase.cxx b/src/HYDROData/HYDROData_CalculationCase.cxx index 4a75528c..e6976786 100644 --- a/src/HYDROData/HYDROData_CalculationCase.cxx +++ b/src/HYDROData/HYDROData_CalculationCase.cxx @@ -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 -- 2.39.2