]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
fix failures of non-regression tests
authoreap <eap@opencascade.com>
Wed, 27 Feb 2013 13:21:20 +0000 (13:21 +0000)
committereap <eap@opencascade.com>
Wed, 27 Feb 2013 13:21:20 +0000 (13:21 +0000)
 Perform a thorough analysis of mesh on FACEs even in case of 1 SOLID

src/StdMeshers/StdMeshers_Prism_3D.cxx

index 2f783b4184c10ca4ed04a60b26767b54ef9126bd..afc135180cb7c5dd4d4832363c5f20da9bef8c19 100644 (file)
@@ -458,14 +458,6 @@ bool StdMeshers_Prism_3D::Compute(SMESH_Mesh& theMesh, const TopoDS_Shape& theSh
   if ( nbSolids < 1 )
     return true;
 
-  Prism_3D::TPrismTopo prism;
-
-  if ( nbSolids == 1 )
-  {
-    return ( initPrism( prism, TopExp_Explorer( theShape, TopAbs_SOLID ).Current() ) &&
-             compute( prism ));
-  }
-
   TopTools_IndexedDataMapOfShapeListOfShape faceToSolids;
   TopExp::MapShapesAndAncestors( theShape, TopAbs_FACE, TopAbs_SOLID, faceToSolids );
 
@@ -492,8 +484,15 @@ bool StdMeshers_Prism_3D::Compute(SMESH_Mesh& theMesh, const TopoDS_Shape& theSh
   // notQuadMeshedFaces are of highest priority
   meshedFaces.splice( meshedFaces.begin(), notQuadMeshedFaces );
 
-  // if ( meshedFaces.empty() )
-  //   return error( COMPERR_BAD_INPUT_MESH, "No meshed source faces found" );
+  Prism_3D::TPrismTopo prism;
+
+  if ( nbSolids == 1 )
+  {
+    if ( !meshedFaces.empty() )
+      prism.myBottom = meshedFaces.front();
+    return ( initPrism( prism, TopExp_Explorer( theShape, TopAbs_SOLID ).Current() ) &&
+             compute( prism ));
+  }
 
   TopTools_MapOfShape meshedSolids;
   list< Prism_3D::TPrismTopo > meshedPrism;