From: eap Date: Thu, 23 Jan 2014 12:46:37 +0000 (+0000) Subject: 22362: EDF SMESH: Quadrangle (mapping) algorithm: enforced vertices X-Git-Tag: V7_4_0a1~96 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f20247815467a8508064fdee11cdba9ba390d392;p=modules%2Fsmesh.git 22362: EDF SMESH: Quadrangle (mapping) algorithm: enforced vertices fix for a case of http://www.salome-platform.org/forum/forum_10/863809970#478269857 --- diff --git a/src/StdMeshers/StdMeshers_Quadrangle_2D.cxx b/src/StdMeshers/StdMeshers_Quadrangle_2D.cxx index e24cc375c..7bec7bfca 100644 --- a/src/StdMeshers/StdMeshers_Quadrangle_2D.cxx +++ b/src/StdMeshers/StdMeshers_Quadrangle_2D.cxx @@ -317,17 +317,25 @@ bool StdMeshers_Quadrangle_2D::computeTriangles(SMESH_Mesh& aMesh, if ( !setNormalizedGrid( quad )) return false; - if ( quad->nbNodeOut( QUAD_BOTTOM_SIDE )) - { - splitQuad( quad, 0, 1 ); - } if ( quad->nbNodeOut( QUAD_TOP_SIDE )) { splitQuad( quad, 0, quad->jSize-2 ); } + if ( quad->nbNodeOut( QUAD_BOTTOM_SIDE )) // this should not happen + { + splitQuad( quad, 0, 1 ); + } FaceQuadStruct::Ptr newQuad = myQuadList.back(); if ( quad != newQuad ) // split done { + { + FaceQuadStruct::Ptr botQuad = // a bottom part + ( quad->side[ QUAD_LEFT_SIDE ].from == 0 ) ? quad : newQuad; + if ( botQuad->nbNodeOut( QUAD_LEFT_SIDE ) > 0 ) + botQuad->side[ QUAD_LEFT_SIDE ].to += botQuad->nbNodeOut( QUAD_LEFT_SIDE ); + else if ( botQuad->nbNodeOut( QUAD_RIGHT_SIDE ) > 0 ) + botQuad->side[ QUAD_RIGHT_SIDE ].to += botQuad->nbNodeOut( QUAD_RIGHT_SIDE ); + } // make quad be a greatest one if ( quad->side[ QUAD_LEFT_SIDE ].NbPoints() == 2 || quad->side[ QUAD_RIGHT_SIDE ].NbPoints() == 2 )