From: eap Date: Tue, 11 Mar 2014 13:33:49 +0000 (+0400) Subject: 22507: EDF 2845 SMESH : regression with 3D extrusion algo X-Git-Tag: V7_4_0a1~40 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=28140bb1c82c79dce2df65c7cc92fbddfc5f09ee;p=modules%2Fsmesh.git 22507: EDF 2845 SMESH : regression with 3D extrusion algo Fix a case of a triangular base FACE with a sole triangular element --- diff --git a/src/StdMeshers/StdMeshers_Prism_3D.cxx b/src/StdMeshers/StdMeshers_Prism_3D.cxx index 71412270d..c43a126c3 100644 --- a/src/StdMeshers/StdMeshers_Prism_3D.cxx +++ b/src/StdMeshers/StdMeshers_Prism_3D.cxx @@ -3927,6 +3927,8 @@ TPCurveOnHorFaceAdaptor::TPCurveOnHorFaceAdaptor( const TSideFace* sideFace, const int Z = isTop ? sideFace->ColumnHeight() - 1 : 0; map u2nodes; sideFace->GetNodesAtZ( Z, u2nodes ); + if ( u2nodes.empty() ) + return; SMESH_MesherHelper helper( *sideFace->GetMesh() ); helper.SetSubShape( horFace ); @@ -3991,7 +3993,7 @@ gp_Pnt2d StdMeshers_PrismAsBlock::TPCurveOnHorFaceAdaptor::Value(const Standard_ map< double, gp_XY >::const_iterator i1 = myUVmap.upper_bound( U ); if ( i1 == myUVmap.end() ) - return myUVmap.rbegin()->second; + return myUVmap.empty() ? gp_XY(0,0) : myUVmap.rbegin()->second; if ( i1 == myUVmap.begin() ) return (*i1).second;