Salome HOME
22368: EDF SMESH: Pattern mapping to assign new nodes to sub-shapes
authoreap <eap@opencascade.com>
Thu, 26 Dec 2013 15:08:31 +0000 (15:08 +0000)
committereap <eap@opencascade.com>
Thu, 26 Dec 2013 15:08:31 +0000 (15:08 +0000)
In GetSortedNodesOnEdge(), do not return false if there are nodes but
no segments on an EDGE

src/SMESH/SMESH_Algo.cxx

index 19a1e4b0916dee1a2e9fb8b251008e6287959381..8beda034e2fc3fedfdceb0efe6a1ef87f09ebccb 100644 (file)
@@ -410,7 +410,7 @@ bool SMESH_Algo::GetSortedNodesOnEdge(const SMESHDS_Mesh*                   theM
     return false;
 
   SMESHDS_SubMesh * eSubMesh = theMesh->MeshElements( theEdge );
-  if ( !eSubMesh || !eSubMesh->GetElements()->more() )
+  if ( !eSubMesh || ( eSubMesh->NbElements()==0 && eSubMesh->NbNodes() == 0))
     return false; // edge is not meshed
 
   int nbNodes = 0;