mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-14 21:50:36 +05:00
23118: EDF 11115 SMESH: Hexahedric mesh produces degenerate elements in quadratic conversion.
Fix an invalid commit
This commit is contained in:
parent
b52b396dce
commit
aba3768b2f
@ -105,6 +105,7 @@ public:
|
|||||||
const _FaceSide* GetSide(const int i) const;
|
const _FaceSide* GetSide(const int i) const;
|
||||||
int size() const { return myChildren.size(); }
|
int size() const { return myChildren.size(); }
|
||||||
int NbVertices() const;
|
int NbVertices() const;
|
||||||
|
int NbCommonVertices( const TopTools_MapOfShape& VV ) const;
|
||||||
TopoDS_Vertex FirstVertex() const;
|
TopoDS_Vertex FirstVertex() const;
|
||||||
TopoDS_Vertex LastVertex() const;
|
TopoDS_Vertex LastVertex() const;
|
||||||
TopoDS_Vertex Vertex(int i) const;
|
TopoDS_Vertex Vertex(int i) const;
|
||||||
@ -1172,26 +1173,22 @@ bool _QuadFaceGrid::isContinuousMesh(TopoDS_Edge E1, TopoDS_Edge E2, SMESH_Mesh&
|
|||||||
bool _QuadFaceGrid::needContinuationAtSide( int iSide,
|
bool _QuadFaceGrid::needContinuationAtSide( int iSide,
|
||||||
const TopTools_MapOfShape& cornerVertices ) const
|
const TopTools_MapOfShape& cornerVertices ) const
|
||||||
{
|
{
|
||||||
if ( cornerVertices.empty() )
|
if ( cornerVertices.IsEmpty() )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
// current solution is rough. Take more care of composite sides!
|
||||||
|
|
||||||
// check presence of corners at iSide
|
// check presence of corners at iSide
|
||||||
int nbCorners = 0;
|
|
||||||
const _FaceSide* side = mySides.GetSide( iSide );
|
const _FaceSide* side = mySides.GetSide( iSide );
|
||||||
if ( !side ) return false;
|
if ( !side ) return false;
|
||||||
int iV, nbV = side->NbVertices();
|
int nbCorners = side->NbCommonVertices( cornerVertices );
|
||||||
for ( iV = 0; iV < nbV && nbCorners == 0; ++iV )
|
|
||||||
nbCorners += cornerVertices.Contains( side->Vertex( iV ));
|
|
||||||
if ( nbCorners > 0 )
|
if ( nbCorners > 0 )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// check presence of corners at other sides
|
// check presence of corners at other sides
|
||||||
nbCorners = 0;
|
nbCorners = mySides.NbCommonVertices( cornerVertices );
|
||||||
nbV = mySides.NbVertices();
|
|
||||||
for ( iV = 0; iV < nbV && nbCorners == 0; ++iV )
|
|
||||||
nbCorners += cornerVertices.Contains( mySides.Vertex( iV ));
|
|
||||||
|
|
||||||
return ( nbCorners > 0 ); // if nbCorners == 2 additional check is needed!!!
|
return ( 0 < nbCorners && nbCorners <= 2 ); // if nbCorners == 2 additional check is needed!!!
|
||||||
}
|
}
|
||||||
|
|
||||||
//================================================================================
|
//================================================================================
|
||||||
@ -1605,6 +1602,21 @@ int _FaceSide::NbVertices() const
|
|||||||
return myNbChildren + 1;
|
return myNbChildren + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : NbCommonVertices
|
||||||
|
//purpose : Returns number of my vertices common with the given ones
|
||||||
|
//=======================================================================
|
||||||
|
|
||||||
|
int _FaceSide::NbCommonVertices( const TopTools_MapOfShape& VV ) const
|
||||||
|
{
|
||||||
|
int nbCommon = 0;
|
||||||
|
TopTools_MapIteratorOfMapOfShape vIt ( myVertices );
|
||||||
|
for ( ; vIt.More(); vIt.Next() )
|
||||||
|
nbCommon += ( VV.Contains( vIt.Key() ));
|
||||||
|
|
||||||
|
return nbCommon;
|
||||||
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : FirstVertex
|
//function : FirstVertex
|
||||||
//purpose :
|
//purpose :
|
||||||
|
Loading…
Reference in New Issue
Block a user