mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-26 09:20:34 +05:00
54462: Hexa(ijk) fails on a composite block with a degenerated edge (note 0509712)
This commit is contained in:
parent
830c88cc3a
commit
4be45a651b
@ -312,13 +312,15 @@ namespace
|
|||||||
if ( !TopExp::CommonVertex( E1, E2, V )) return false;
|
if ( !TopExp::CommonVertex( E1, E2, V )) return false;
|
||||||
|
|
||||||
const SMDS_MeshNode* n = SMESH_Algo::VertexNode( V, mesh.GetMeshDS() );
|
const SMDS_MeshNode* n = SMESH_Algo::VertexNode( V, mesh.GetMeshDS() );
|
||||||
if ( !n ) return false;
|
if ( !n ) return SMESH_Algo::IsContinuous( E1, E2 ); // meshed by "composite segment"
|
||||||
|
|
||||||
SMESHDS_SubMesh* sm = mesh.GetSubMeshContaining( F )->GetSubMeshDS();
|
SMESHDS_SubMesh* sm = mesh.GetSubMeshContaining( F )->GetSubMeshDS();
|
||||||
if ( !sm ) return false;
|
if ( !sm ) return false;
|
||||||
|
|
||||||
int nbQuads = 0;
|
int nbQuads = 0;
|
||||||
SMDS_ElemIteratorPtr fIt = n->GetInverseElementIterator(SMDSAbs_Face);
|
SMDS_ElemIteratorPtr fIt = n->GetInverseElementIterator(SMDSAbs_Face);
|
||||||
|
if ( !fIt->more() )
|
||||||
|
return SMESH_Algo::IsContinuous( E1, E2 ); // meshed by "composite segment"
|
||||||
while ( fIt->more() )
|
while ( fIt->more() )
|
||||||
{
|
{
|
||||||
const SMDS_MeshElement* f = fIt->next();
|
const SMDS_MeshElement* f = fIt->next();
|
||||||
@ -332,6 +334,28 @@ namespace
|
|||||||
return nbQuads == 2;
|
return nbQuads == 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//================================================================================
|
||||||
|
/*!
|
||||||
|
* \brief Return true if a vertex holds a node and this node is used by some quadrangle
|
||||||
|
*/
|
||||||
|
//================================================================================
|
||||||
|
|
||||||
|
// bool isMeshedVertex( TopoDS_Vertex& V,
|
||||||
|
// const SMESH_Mesh& mesh )
|
||||||
|
// {
|
||||||
|
// const SMDS_MeshNode* n = SMESH_Algo::VertexNode( V, mesh.GetMeshDS() );
|
||||||
|
// if ( !n ) return false;
|
||||||
|
|
||||||
|
// SMDS_ElemIteratorPtr fIt = n->GetInverseElementIterator(SMDSAbs_Face);
|
||||||
|
// while ( fIt->more() )
|
||||||
|
// {
|
||||||
|
// const SMDS_MeshElement* f = fIt->next();
|
||||||
|
// if ( f->NbCornerNodes() == 4 )
|
||||||
|
// return true;
|
||||||
|
// }
|
||||||
|
// return false;
|
||||||
|
// }
|
||||||
|
|
||||||
//================================================================================
|
//================================================================================
|
||||||
/*!
|
/*!
|
||||||
* \brief Finds VERTEXes located at block corners
|
* \brief Finds VERTEXes located at block corners
|
||||||
@ -896,13 +920,7 @@ bool _QuadFaceGrid::Init(const TopoDS_Face& f, SMESH_Mesh& mesh)
|
|||||||
if ( SMESH_Algo::isDegenerated( sideEdges.back() ))
|
if ( SMESH_Algo::isDegenerated( sideEdges.back() ))
|
||||||
continue;
|
continue;
|
||||||
while ( !edges.empty() ) {
|
while ( !edges.empty() ) {
|
||||||
if ( SMESH_Algo::IsContinuous( sideEdges.back(), edges.front() )) {
|
if ( isContinuousMesh( sideEdges.back(), edges.front(), f, mesh )) {
|
||||||
sideEdges.splice( sideEdges.end(), edges, edges.begin());
|
|
||||||
}
|
|
||||||
else if ( SMESH_Algo::IsContinuous( sideEdges.front(), edges.back() )) {
|
|
||||||
sideEdges.splice( sideEdges.begin(), edges, --edges.end());
|
|
||||||
}
|
|
||||||
else if ( isContinuousMesh( sideEdges.back(), edges.front(), f, mesh )) {
|
|
||||||
sideEdges.splice( sideEdges.end(), edges, edges.begin());
|
sideEdges.splice( sideEdges.end(), edges, edges.begin());
|
||||||
}
|
}
|
||||||
else if ( isContinuousMesh( sideEdges.front(), edges.back(), f, mesh )) {
|
else if ( isContinuousMesh( sideEdges.front(), edges.back(), f, mesh )) {
|
||||||
@ -1946,6 +1964,13 @@ bool _FaceSide::StoreNodes(SMESH_Mesh& mesh,
|
|||||||
nodes);
|
nodes);
|
||||||
if ( !ok ) return false;
|
if ( !ok ) return false;
|
||||||
|
|
||||||
|
// skip nodes on VERTEXes not included in faces
|
||||||
|
if ( !nodes.begin()->second->GetInverseElementIterator(SMDSAbs_Face)->more() )
|
||||||
|
nodes.erase( nodes.begin() );
|
||||||
|
if ( !nodes.empty() &&
|
||||||
|
!nodes.rbegin()->second->GetInverseElementIterator(SMDSAbs_Face)->more() )
|
||||||
|
nodes.erase( --nodes.end() );
|
||||||
|
|
||||||
bool forward = ( edge->Orientation() == TopAbs_FORWARD );
|
bool forward = ( edge->Orientation() == TopAbs_FORWARD );
|
||||||
if ( reverse ) forward = !forward;
|
if ( reverse ) forward = !forward;
|
||||||
if ( forward )
|
if ( forward )
|
||||||
|
Loading…
Reference in New Issue
Block a user