From: eap Date: Fri, 29 Mar 2013 15:20:32 +0000 (+0000) Subject: 0022183: EDF SMESH: Error with ConvertToQuadratic X-Git-Tag: pluginMGCleaner~17 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7daf8d6589f711cb95332df9f79b72438a7da245;p=modules%2Fsmesh.git 0022183: EDF SMESH: Error with ConvertToQuadratic In getMediumNodeOnComposedWire(), prevent an exception at setting a medium node, already added to a sub-mesh in AddNode() due to mySetElemOnShape==true, to another EDGE. --- diff --git a/src/SMESH/SMESH_MesherHelper.cxx b/src/SMESH/SMESH_MesherHelper.cxx index 4388b6f01..47feba98b 100644 --- a/src/SMESH/SMESH_MesherHelper.cxx +++ b/src/SMESH/SMESH_MesherHelper.cxx @@ -1378,8 +1378,12 @@ const SMDS_MeshNode* SMESH_MesherHelper::getMediumNodeOnComposedWire(const SMDS_ } //if ( mySetElemOnShape ) node is not elem! - GetMeshDS()->SetNodeOnEdge(n12, edges[iOkEdge], u); - + { + int edgeID = GetMeshDS()->ShapeToIndex( edges[iOkEdge] ); + if ( edgeID != n12->getshapeId() ) + GetMeshDS()->UnSetNodeOnShape( n12 ); + GetMeshDS()->SetNodeOnEdge(n12, edgeID, u); + } myTLinkNodeMap.insert( make_pair( SMESH_TLink(n1,n2), n12 )); return n12;