X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESH%2FSMESH_Algo.cxx;h=035c23c5919ccc309f758165820aa958c4cdbd78;hb=1286bbe881dab4f03c2041fd16fd9bd4f57f9fdd;hp=a6806c3d8eb5ca5e05ee643099be7c6ab182d7c5;hpb=145e217ae6852460e3f461e22fe34cf6bc15fc36;p=modules%2Fsmesh.git diff --git a/src/SMESH/SMESH_Algo.cxx b/src/SMESH/SMESH_Algo.cxx index a6806c3d8..035c23c59 100644 --- a/src/SMESH/SMESH_Algo.cxx +++ b/src/SMESH/SMESH_Algo.cxx @@ -231,7 +231,7 @@ SMESH_3D_Algo::SMESH_3D_Algo(int hypId, int studyId, SMESH_Gen* gen) //============================================================================= /*! - * Usually an algoritm has nothing to save + * Usually an algorithm has nothing to save */ //============================================================================= @@ -440,13 +440,15 @@ bool SMESH_Algo::GetSortedNodesOnEdge(const SMESHDS_Mesh* theM TopExp::Vertices(theEdge, v1, v2); const SMDS_MeshNode* n1 = VertexNode( v1, eSubMesh, 0 ); const SMDS_MeshNode* n2 = VertexNode( v2, eSubMesh, 0 ); + const SMDS_MeshNode* nEnd[2] = { nbNodes ? theNodes.begin()->second : 0, + nbNodes ? theNodes.rbegin()->second : 0 }; Standard_Real f, l; BRep_Tool::Range(theEdge, f, l); if ( v1.Orientation() != TopAbs_FORWARD ) std::swap( f, l ); - if ( n1 && ++nbNodes ) + if ( n1 && n1 != nEnd[0] && n1 != nEnd[1] && ++nbNodes ) theNodes.insert( make_pair( f, n1 )); - if ( n2 && ++nbNodes ) + if ( n2 && n2 != nEnd[0] && n2 != nEnd[1] && ++nbNodes ) theNodes.insert( make_pair( l, n2 )); return (int)theNodes.size() == nbNodes; @@ -749,7 +751,7 @@ SMESH_Algo::EMeshError SMESH_Algo::GetMeshError(SMESH_subMesh* subMesh) if ( !fIt->more() ) return MEr_EMPTY; - // We check that olny links on EDGEs encouter once, the rest links, twice + // We check that only links on EDGEs encouter once, the rest links, twice set< SMESH_TLink > links; while ( fIt->more() ) {