Fix SALOME_TESTS/Grids/smesh/bugs_07/H5 as the geometry changed

This commit is contained in:
eap 2017-01-27 22:16:01 +03:00
parent 845b5221ba
commit 9b504e4867
3 changed files with 12 additions and 3 deletions

View File

@ -440,13 +440,15 @@ bool SMESH_Algo::GetSortedNodesOnEdge(const SMESHDS_Mesh* theM
TopExp::Vertices(theEdge, v1, v2);
const SMDS_MeshNode* n1 = VertexNode( v1, eSubMesh, 0 );
const SMDS_MeshNode* n2 = VertexNode( v2, eSubMesh, 0 );
const SMDS_MeshNode* nEnd[2] = { nbNodes ? theNodes.begin()->second : 0,
nbNodes ? theNodes.rbegin()->second : 0 };
Standard_Real f, l;
BRep_Tool::Range(theEdge, f, l);
if ( v1.Orientation() != TopAbs_FORWARD )
std::swap( f, l );
if ( n1 && ++nbNodes )
if ( n1 && n1 != nEnd[0] && n1 != nEnd[1] && ++nbNodes )
theNodes.insert( make_pair( f, n1 ));
if ( n2 && ++nbNodes )
if ( n2 && n2 != nEnd[0] && n2 != nEnd[1] && ++nbNodes )
theNodes.insert( make_pair( l, n2 ));
return (int)theNodes.size() == nbNodes;

View File

@ -2568,6 +2568,7 @@ bool SMESH_MesherHelper::LoadNodeColumns(TParam2ColumnMap & theParam2
}
// get nodes on theBaseEdge sorted by param on edge and initialize theParam2ColumnMap with them
const SMDS_MeshNode* prevEndNodes[2] = { 0, 0 };
edge = theBaseSide.begin();
for ( int iE = 0; edge != theBaseSide.end(); ++edge, ++iE )
{
@ -2635,11 +2636,16 @@ bool SMESH_MesherHelper::LoadNodeColumns(TParam2ColumnMap & theParam2
const double prevPar = theParam2ColumnMap.empty() ? 0 : theParam2ColumnMap.rbegin()->first;
for ( u_n = sortedBaseNN.begin(); u_n != sortedBaseNN.end(); u_n++ )
{
if ( u_n->second == prevEndNodes[0] ||
u_n->second == prevEndNodes[1] )
continue;
double par = prevPar + coeff * ( u_n->first - f );
TParam2ColumnMap::iterator u2nn =
theParam2ColumnMap.insert( theParam2ColumnMap.end(), make_pair( par, TNodeColumn()));
u2nn->second.push_back( u_n->second );
}
prevEndNodes[0] = sortedBaseNN.begin()->second;
prevEndNodes[1] = sortedBaseNN.rbegin()->second;
}
if ( theParam2ColumnMap.size() < 2 )
return false;

View File

@ -380,7 +380,8 @@ bool StdMeshers_Hexa_3D::Compute(SMESH_Mesh & aMesh,
StdMeshers_Quadrangle_2D quadAlgo( _gen->GetANewId(), GetStudyId(), _gen);
for ( int i = 0; i < 6; ++i )
{
if ( !( quad[i] = FaceQuadStructPtr( quadAlgo.CheckNbEdges( aMesh, FF( i+1 )))))
if ( !( quad[i] = FaceQuadStructPtr( quadAlgo.CheckNbEdges( aMesh, FF( i+1 ),
/*considerMesh=*/true))))
return error( quadAlgo.GetComputeError() );
if ( quad[i]->side.size() != 4 )
return error( COMPERR_BAD_SHAPE, "Not a quadrangular box side" );