mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-27 09:50:34 +05:00
SALOME_TESTS/Grids/smesh/mesh_Projection_2D_00/A0
Fix getCorners() for a closed split EDGE
This commit is contained in:
parent
a913b7ad54
commit
ba2a04ef34
@ -1134,45 +1134,28 @@ FaceQuadStruct::Ptr StdMeshers_Quadrangle_2D::CheckNbEdges(SMESH_Mesh &
|
|||||||
{
|
{
|
||||||
list< TopoDS_Edge > sideEdges;
|
list< TopoDS_Edge > sideEdges;
|
||||||
TopoDS_Vertex nextSideV = corners[( iSide + 1 - nbUsedDegen ) % corners.size() ];
|
TopoDS_Vertex nextSideV = corners[( iSide + 1 - nbUsedDegen ) % corners.size() ];
|
||||||
while ( edgeIt != edges.end() &&
|
bool nextSideVReached = false;
|
||||||
!nextSideV.IsSame( myHelper->IthVertex( 0, *edgeIt )))
|
do
|
||||||
{
|
{
|
||||||
if ( SMESH_Algo::isDegenerated( *edgeIt ) )
|
const TopoDS_Edge& edge = *edgeIt;
|
||||||
|
if ( SMESH_Algo::isDegenerated( edge ) && myNeedSmooth )
|
||||||
{
|
{
|
||||||
if ( myNeedSmooth )
|
// no side on a degenerated EDGE
|
||||||
{
|
|
||||||
++edgeIt; // no side on the degenerated EDGE
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if ( sideEdges.empty() )
|
|
||||||
{
|
|
||||||
++nbUsedDegen;
|
|
||||||
sideEdges.push_back( *edgeIt++ ); // a degenerated side
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
break; // do not append a degenerated EDGE to a regular side
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sideEdges.push_back( *edgeIt++ );
|
sideEdges.push_back( edge );
|
||||||
|
nextSideVReached = nextSideV.IsSame( myHelper->IthVertex( 1, edge ));
|
||||||
}
|
}
|
||||||
|
++edgeIt;
|
||||||
}
|
}
|
||||||
|
while ( edgeIt != edges.end() && !nextSideVReached );
|
||||||
|
|
||||||
if ( !sideEdges.empty() )
|
if ( !sideEdges.empty() )
|
||||||
{
|
{
|
||||||
quad->side.push_back( StdMeshers_FaceSide::New( F, sideEdges, &aMesh, iSide < QUAD_TOP_SIDE,
|
quad->side.push_back
|
||||||
ignoreMediumNodes, myProxyMesh ));
|
( StdMeshers_FaceSide::New( F, sideEdges, &aMesh, iSide < QUAD_TOP_SIDE,
|
||||||
++iSide;
|
ignoreMediumNodes, myProxyMesh ));
|
||||||
}
|
|
||||||
else if ( !SMESH_Algo::isDegenerated( *edgeIt ) && // closed EDGE
|
|
||||||
myHelper->IthVertex( 0, *edgeIt ).IsSame( myHelper->IthVertex( 1, *edgeIt )))
|
|
||||||
{
|
|
||||||
quad->side.push_back( StdMeshers_FaceSide::New( F, *edgeIt++, &aMesh, iSide < QUAD_TOP_SIDE,
|
|
||||||
ignoreMediumNodes, myProxyMesh));
|
|
||||||
++iSide;
|
++iSide;
|
||||||
}
|
}
|
||||||
if ( quad->side.size() == 4 )
|
if ( quad->side.size() == 4 )
|
||||||
@ -4281,7 +4264,7 @@ int StdMeshers_Quadrangle_2D::getCorners(const TopoDS_Face& theFace,
|
|||||||
if ( nbCorners == 3 )
|
if ( nbCorners == 3 )
|
||||||
vMap.Add( triaVertex );
|
vMap.Add( triaVertex );
|
||||||
multimap<double, TopoDS_Vertex>::reverse_iterator a2v = vertexByAngle.rbegin();
|
multimap<double, TopoDS_Vertex>::reverse_iterator a2v = vertexByAngle.rbegin();
|
||||||
for ( ; a2v != vertexByAngle.rend() && vMap.Extent() < nbCorners; ++a2v )
|
for ( int iC = 0; a2v != vertexByAngle.rend() && iC < nbCorners; ++a2v, ++iC )
|
||||||
vMap.Add( (*a2v).second );
|
vMap.Add( (*a2v).second );
|
||||||
|
|
||||||
// check if there are possible variations in choosing corners
|
// check if there are possible variations in choosing corners
|
||||||
|
Loading…
Reference in New Issue
Block a user