From 5eeb7596d358e5527cb8dc5548423408d18fcd9e Mon Sep 17 00:00:00 2001 From: eap Date: Thu, 12 Jan 2017 21:46:54 +0300 Subject: [PATCH] Fix regressions caused by the preceding commit failed tests: SALOME_TESTS/Grids/smesh/viscous_layers_01/B2 SALOME_TESTS/Grids/smesh/viscous_layers_01/B3 --- src/StdMeshers/StdMeshers_ViscousLayers.cxx | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/StdMeshers/StdMeshers_ViscousLayers.cxx b/src/StdMeshers/StdMeshers_ViscousLayers.cxx index cd43e8f27..5d19beb85 100644 --- a/src/StdMeshers/StdMeshers_ViscousLayers.cxx +++ b/src/StdMeshers/StdMeshers_ViscousLayers.cxx @@ -10070,7 +10070,8 @@ bool _ViscousBuilder::shrink(_SolidData& theData) { _LayerEdge* edge = subEOS[iS]->_edges[i]; SMDS_MeshNode* tgtNode = const_cast< SMDS_MeshNode*& >( edge->_nodes.back() ); - if ( edge->_pos.empty() ) continue; + if ( edge->_pos.empty() || + edge->Is( _LayerEdge::SHRUNK )) continue; if ( subEOS[iS]->SWOLType() == TopAbs_FACE ) { SMDS_FacePosition* pos = static_cast( tgtNode->GetPosition() ); @@ -10876,9 +10877,18 @@ void _Shrinker1D::AddEdge( const _LayerEdge* e, while ( nIt->more() ) { const SMDS_MeshNode* node = nIt->next(); + + // skip refinement nodes if ( node->NbInverseElements(SMDSAbs_Edge) == 0 || node == tgtNode0 || node == tgtNode1 ) - continue; // refinement nodes + continue; + bool hasMarkedFace = false; + SMDS_ElemIteratorPtr fIt = node->GetInverseElementIterator(SMDSAbs_Face); + while ( fIt->more() && !hasMarkedFace ) + hasMarkedFace = fIt->next()->isMarked(); + if ( !hasMarkedFace ) + continue; + _nodes.push_back( node ); _initU.push_back( helper.GetNodeU( _geomEdge, node )); double len = GCPnts_AbscissaPoint::Length(aCurve, f, _initU.back()); @@ -10929,7 +10939,6 @@ void _Shrinker1D::Compute(bool set3D, SMESH_MesherHelper& helper) for ( size_t i = 0; i < _nodes.size(); ++i ) { if ( !_nodes[i] ) continue; - if ( _initU[i] < f || l < _initU[i] ) continue; double len = totLen * _normPar[i]; GCPnts_AbscissaPoint discret( aCurve, len, f ); if ( !discret.IsDone() ) @@ -10952,7 +10961,6 @@ void _Shrinker1D::Compute(bool set3D, SMESH_MesherHelper& helper) for ( size_t i = 0; i < _nodes.size(); ++i ) { if ( !_nodes[i] ) continue; - if ( _initU[i] < f || l < _initU[i] ) continue; double u = f * ( 1-_normPar[i] ) + l * _normPar[i]; SMDS_EdgePosition* pos = static_cast( _nodes[i]->GetPosition() ); pos->SetUParameter( u ); -- 2.39.2