]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
0022183: EDF SMESH: Error with ConvertToQuadratic
authoreap <eap@opencascade.com>
Fri, 29 Mar 2013 15:20:32 +0000 (15:20 +0000)
committereap <eap@opencascade.com>
Fri, 29 Mar 2013 15:20:32 +0000 (15:20 +0000)
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.

src/SMESH/SMESH_MesherHelper.cxx

index 4388b6f011ea60a186d00477eabeca3e9d18f61e..47feba98bff396c1969b9910eec00f2772cda5d5 100644 (file)
@@ -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;