From: eap Date: Thu, 28 Nov 2013 17:01:37 +0000 (+0000) Subject: 0022423: EDF SMESH Regression: Quadrangle algo fails X-Git-Tag: V7_3_0b1~21 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5fbe78b19007300e2937dca0e341ded1d51d4e15;p=modules%2Fsmesh.git 0022423: EDF SMESH Regression: Quadrangle algo fails fix CheckNbEdges() for the case of a degenerated 5-th edge --- diff --git a/src/StdMeshers/StdMeshers_Quadrangle_2D.cxx b/src/StdMeshers/StdMeshers_Quadrangle_2D.cxx index a5fd66d29..21f8c15e1 100644 --- a/src/StdMeshers/StdMeshers_Quadrangle_2D.cxx +++ b/src/StdMeshers/StdMeshers_Quadrangle_2D.cxx @@ -931,6 +931,8 @@ FaceQuadStruct::Ptr StdMeshers_Quadrangle_2D::CheckNbEdges(SMESH_Mesh & ignoreMediumNodes, myProxyMesh)); ++iSide; } + if ( quad->side.size() == 4 ) + break; if ( nbLoops > 8 ) { error(TComm("Bug: infinite loop in StdMeshers_Quadrangle_2D::CheckNbEdges()")); @@ -3582,9 +3584,10 @@ int StdMeshers_Quadrangle_2D::getCorners(const TopoDS_Face& theFace, theVertices.clear(); vector< double > angles; vector< TopoDS_Edge > edgeVec; - vector< int > cornerInd; + vector< int > cornerInd, nbSeg; angles.reserve( vertexByAngle.size() ); edgeVec.reserve( vertexByAngle.size() ); + nbSeg.reserve( vertexByAngle.size() ); cornerInd.reserve( nbCorners ); for ( edge = theWire.begin(); edge != theWire.end(); ++edge ) { @@ -3599,6 +3602,13 @@ int StdMeshers_Quadrangle_2D::getCorners(const TopoDS_Face& theFace, } angles.push_back( angleByVertex.IsBound( v ) ? angleByVertex( v ) : -M_PI ); edgeVec.push_back( *edge ); + if ( theConsiderMesh && isThereVariants ) + { + if ( SMESHDS_SubMesh* sm = helper.GetMeshDS()->MeshElements( *edge )) + nbSeg.push_back( sm->NbNodes() + 1 ); + else + nbSeg.push_back( 0 ); + } } // refine the result vector - make sides elual by length if