mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-11-11 16:19:16 +05:00
0022229: [CEA 829] Error "Edge multiple times in surface mesh"
Fix IsReversedSubMesh(), avoid getting uv on a faces at a singularity point of sphere
This commit is contained in:
parent
f0faaf2c4f
commit
9a93fe49f9
@ -2489,9 +2489,16 @@ bool SMESH_MesherHelper::IsReversedSubMesh (const TopoDS_Face& theFace)
|
||||
{
|
||||
SMESH_TNodeXYZ nPnt[3];
|
||||
SMDS_ElemIteratorPtr nodesIt = elem->nodesIterator();
|
||||
int iNodeOnFace = 0, iPosDim = SMDS_TOP_VERTEX;
|
||||
for ( int iN = 0; nodesIt->more() && iN < 3; ++iN) // loop on nodes
|
||||
{
|
||||
nPnt[ iN ] = nodesIt->next();
|
||||
|
||||
if ( nPnt[ iN ]._node->GetPosition()->GetTypeOfPosition() > iPosDim )
|
||||
{
|
||||
iNodeOnFace = iN;
|
||||
iPosDim = nPnt[ iN ]._node->GetPosition()->GetTypeOfPosition();
|
||||
}
|
||||
}
|
||||
// compute normal
|
||||
gp_Vec v01( nPnt[0], nPnt[1] ), v02( nPnt[0], nPnt[2] );
|
||||
if ( v01.SquareMagnitude() > RealSmall() &&
|
||||
@ -2499,7 +2506,7 @@ bool SMESH_MesherHelper::IsReversedSubMesh (const TopoDS_Face& theFace)
|
||||
{
|
||||
Ne = v01 ^ v02;
|
||||
if (( normalOK = ( Ne.SquareMagnitude() > RealSmall() )))
|
||||
uv = GetNodeUV( theFace, nPnt[0]._node, nPnt[2]._node, &normalOK );
|
||||
uv = GetNodeUV( theFace, nPnt[iNodeOnFace]._node, 0, &normalOK );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user