From: eap Date: Tue, 8 May 2007 10:34:01 +0000 (+0000) Subject: NPAL15894 (Projection 2D doesn't work) X-Git-Tag: T_PAL_15278 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b22070beb1078d4b4e3c92ace635ef59bd7fbd61;p=modules%2Fsmesh.git NPAL15894 (Projection 2D doesn't work) protect form SIGSEGV if not all mathcing nodes found --- diff --git a/src/StdMeshers/StdMeshers_RadialPrism_3D.cxx b/src/StdMeshers/StdMeshers_RadialPrism_3D.cxx index c83bff525..89946a7aa 100644 --- a/src/StdMeshers/StdMeshers_RadialPrism_3D.cxx +++ b/src/StdMeshers/StdMeshers_RadialPrism_3D.cxx @@ -222,12 +222,18 @@ bool StdMeshers_RadialPrism_3D::Compute(SMESH_Mesh& aMesh, const TopoDS_Shape& a vector< const TNodeColumn* > columns( nbNodes ); for ( int i = 0; i < nbNodes; ++i ) { - const SMDS_MeshNode* n = face->GetNode( i ); - TNode2ColumnMap::iterator n_col = node2columnMap.find( n ); - if ( n_col != node2columnMap.end() ) + const SMDS_MeshNode* nIn = face->GetNode( i ); + TNode2ColumnMap::iterator n_col = node2columnMap.find( nIn ); + if ( n_col != node2columnMap.end() ) { columns[ i ] = & n_col->second; - else - columns[ i ] = makeNodeColumn( node2columnMap, n, nodeIn2OutMap[ n ] ); + } + else { + TNodeNodeMap::iterator nInOut = nodeIn2OutMap.find( nIn ); + if ( nInOut == nodeIn2OutMap.end() ) + RETURN_BAD_RESULT("No matching node for "<< nIn->GetID() << + " in face "<< face->GetID()); + columns[ i ] = makeNodeColumn( node2columnMap, nIn, nInOut->second ); + } } StdMeshers_Prism_3D::AddPrisms( columns, myHelper );