From: eap Date: Fri, 28 Feb 2020 13:05:59 +0000 (+0300) Subject: Fix regression of 3D_mesh_GHS3D_01/B1 X-Git-Tag: V9_5_0a2~24 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d7e7b8a466336561da07e6566c2d15248d37bdf5;p=modules%2Fsmesh.git Fix regression of 3D_mesh_GHS3D_01/B1 --- diff --git a/src/StdMeshers/StdMeshers_ViscousLayers.cxx b/src/StdMeshers/StdMeshers_ViscousLayers.cxx index 270330be4..d82b30bcc 100644 --- a/src/StdMeshers/StdMeshers_ViscousLayers.cxx +++ b/src/StdMeshers/StdMeshers_ViscousLayers.cxx @@ -1771,7 +1771,7 @@ namespace VISCOUS_3D PyDump(SMESH_Mesh& m) { int tag = 3 + m.GetId(); const char* fname = "/tmp/viscous.py"; - cout << "execfile('"<IsSame( face ) || + _periodicFaces[ i ]._shriFace[1]->IsSame( face )) + _periodicFaces[ i ].Clear(); + } }; //================================================================================ @@ -10765,6 +10774,7 @@ namespace VISCOUS_3D bool PeriodicFaces::IncludeShrunk( const TopoDS_Face& face, const TopTools_MapOfShape& shrunkFaces ) const { + if ( IsEmpty() ) return false; return (( _shriFace[0]->IsSame( face ) && _shriFace[1]->IsShrunk( shrunkFaces )) || ( _shriFace[1]->IsSame( face ) && _shriFace[0]->IsShrunk( shrunkFaces ))); } @@ -10785,7 +10795,8 @@ namespace VISCOUS_3D if ( iSrc != 0 ) { trsfInverse = _trsf; - trsfInverse.Invert(); + if ( !trsfInverse.Invert()) + return false; trsf = &trsfInverse; } SMESHDS_Mesh* meshDS = dataSrc->GetHelper().GetMeshDS(); @@ -10823,10 +10834,10 @@ namespace VISCOUS_3D } } bool done = ( n2n == _nnMap.end() ); - // cout << "MMMMMMMOOOOOOOOOOVVVVVVVVVVVEEEEEEEE " - // << _shriFace[iSrc]->_subMesh->GetId() << " -> " - // << _shriFace[iTgt]->_subMesh->GetId() << " -- " - // << ( done ? "DONE" : "FAIL") << endl; + debugMsg( "PeriodicFaces::MoveNodes " + << _shriFace[iSrc]->_subMesh->GetId() << " -> " + << _shriFace[iTgt]->_subMesh->GetId() << " -- " + << ( done ? "DONE" : "FAIL")); return done; } @@ -11286,6 +11297,8 @@ bool _ViscousBuilder::shrink(_SolidData& theData) getMeshDS()->RemoveFreeNode( n, smDS, /*fromGroups=*/false ); } } + _periodicity->ClearPeriodic( F ); + // restore position and UV of target nodes gp_Pnt p; for ( size_t iS = 0; iS < subEOS.size(); ++iS ) @@ -11528,6 +11541,13 @@ bool _ViscousBuilder::prepareEdgeToShrink( _LayerEdge& edge, if ( !n2 ) return error(SMESH_Comment("Wrongly meshed EDGE ") << getMeshDS()->ShapeToIndex( E )); + if ( n2 == tgtNode ) // for 3D_mesh_GHS3D_01/B1 + { + // shrunk by other SOLID + edge.Set( _LayerEdge::SHRUNK ); // ??? + return true; + } + double uSrc = helper.GetNodeU( E, srcNode, n2 ); double uTgt = helper.GetNodeU( E, tgtNode, srcNode ); double u2 = helper.GetNodeU( E, n2, srcNode );