From e453ca2b46b4fbbd4f821ce3796e660f144306d4 Mon Sep 17 00:00:00 2001 From: eap Date: Wed, 27 Feb 2013 13:21:20 +0000 Subject: [PATCH] fix failures of non-regression tests Perform a thorough analysis of mesh on FACEs even in case of 1 SOLID --- src/StdMeshers/StdMeshers_Prism_3D.cxx | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/StdMeshers/StdMeshers_Prism_3D.cxx b/src/StdMeshers/StdMeshers_Prism_3D.cxx index 2f783b418..afc135180 100644 --- a/src/StdMeshers/StdMeshers_Prism_3D.cxx +++ b/src/StdMeshers/StdMeshers_Prism_3D.cxx @@ -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; -- 2.39.2