From: eap Date: Fri, 27 Dec 2013 18:18:24 +0000 (+0000) Subject: 22360: EDF SMESH: Body Fitting algorithm: incorporate edges X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3c3543845ec2ae0501bf882cc9403d6b0445585d;p=modules%2Fsmesh.git 22360: EDF SMESH: Body Fitting algorithm: incorporate edges --- diff --git a/src/StdMeshers/StdMeshers_Cartesian_3D.cxx b/src/StdMeshers/StdMeshers_Cartesian_3D.cxx index 863c66cd6..36b2e2d48 100644 --- a/src/StdMeshers/StdMeshers_Cartesian_3D.cxx +++ b/src/StdMeshers/StdMeshers_Cartesian_3D.cxx @@ -1704,6 +1704,21 @@ namespace if ( nbSplits < 2 && quad._edgeNodes.empty() ) nbSplits = 0; + if ( nbSplits == 0 && !quad._edgeNodes.empty() ) + { + // make _vertexNodes from _edgeNodes of an empty quad + const double tol2 = _grid->_tol * _grid->_tol; + for ( size_t iP = 0; iP < quad._edgeNodes.size(); ++iP ) + { + _Node* equalNode = + FindEqualNode( _vertexNodes, quad._edgeNodes[ iP ].EdgeIntPnt(), tol2 ); + if ( equalNode ) + equalNode->Add( quad._edgeNodes[ iP ].EdgeIntPnt() ); + else + _vertexNodes.push_back( quad._edgeNodes[ iP ]); + } + } + while ( nbSplits > 0 ) { size_t iS = 0; @@ -1767,6 +1782,8 @@ namespace } else { + if ( n2->IsLinked( nFirst->_intPoint )) + break; polyLink._nodes[0] = n2; polyLink._nodes[1] = n1; polygon->_polyLinks.push_back( polyLink );