From: eap Date: Tue, 4 Mar 2014 12:04:11 +0000 (+0400) Subject: 22502: [CEA 1070] "Convert to quadratic" does not work if some edges are not set... X-Git-Tag: V7_4_0a1~47 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=590f139ee40a4ac3923f029ae4fe6a94da30ba00;p=modules%2Fsmesh.git 22502: [CEA 1070] "Convert to quadratic" does not work if some edges are not set by some elements during meshing Fix a case of a node on VERTEX not belonging to EDGE the segment of node is on --- diff --git a/src/SMESH/SMESH_MesherHelper.cxx b/src/SMESH/SMESH_MesherHelper.cxx index 98339a189..ded66ca31 100644 --- a/src/SMESH/SMESH_MesherHelper.cxx +++ b/src/SMESH/SMESH_MesherHelper.cxx @@ -1423,8 +1423,15 @@ const SMDS_MeshNode* SMESH_MesherHelper::GetMediumNode(const SMDS_MeshNode* n1, return getMediumNodeOnComposedWire(n1,n2,force3d); } E = TopoDS::Edge(meshDS->IndexToShape( edgeID = pos.first )); - u[0] = GetNodeU(E,n1,n2, force3d ? 0 : &uvOK[0]); - u[1] = GetNodeU(E,n2,n1, force3d ? 0 : &uvOK[1]); + try { + u[0] = GetNodeU(E,n1,n2, force3d ? 0 : &uvOK[0]); + u[1] = GetNodeU(E,n2,n1, force3d ? 0 : &uvOK[1]); + } + catch ( Standard_Failure& f ) + { + // issue 22502 / a node is on VERTEX not belonging to E + return getMediumNodeOnComposedWire(n1,n2,force3d); + } } if ( !force3d & uvOK[0] && uvOK[1] )