mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-29 22:50:33 +05:00
0021238: EDF 1817 SMESH: GHS3D on quadratic meshes
enhance IsQuadraticSubMesh() for the mesh w/o shape
This commit is contained in:
parent
8aec90a5df
commit
3fb9c77ac1
@ -123,8 +123,22 @@ bool SMESH_MesherHelper::IsQuadraticSubMesh(const TopoDS_Shape& aSh)
|
|||||||
|
|
||||||
int nbOldLinks = myTLinkNodeMap.size();
|
int nbOldLinks = myTLinkNodeMap.size();
|
||||||
|
|
||||||
|
if ( !myMesh->HasShapeToMesh() )
|
||||||
|
{
|
||||||
|
if (( myCreateQuadratic = myMesh->NbFaces( ORDER_QUADRATIC )))
|
||||||
|
{
|
||||||
|
SMDS_FaceIteratorPtr fIt = meshDS->facesIterator();
|
||||||
|
while ( fIt->more() )
|
||||||
|
AddTLinks( static_cast< const SMDS_MeshFace* >( fIt->next() ));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
TopExp_Explorer exp( aSh, subType );
|
TopExp_Explorer exp( aSh, subType );
|
||||||
|
TopTools_MapOfShape checkedSubShapes;
|
||||||
for (; exp.More() && myCreateQuadratic; exp.Next()) {
|
for (; exp.More() && myCreateQuadratic; exp.Next()) {
|
||||||
|
if ( !checkedSubShapes.Add( exp.Current() ))
|
||||||
|
continue; // needed if aSh is compound of solids
|
||||||
if ( SMESHDS_SubMesh * subMesh = meshDS->MeshElements( exp.Current() )) {
|
if ( SMESHDS_SubMesh * subMesh = meshDS->MeshElements( exp.Current() )) {
|
||||||
if ( SMDS_ElemIteratorPtr it = subMesh->GetElements() ) {
|
if ( SMDS_ElemIteratorPtr it = subMesh->GetElements() ) {
|
||||||
while(it->more()) {
|
while(it->more()) {
|
||||||
@ -157,6 +171,7 @@ bool SMESH_MesherHelper::IsQuadraticSubMesh(const TopoDS_Shape& aSh)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ( nbOldLinks == myTLinkNodeMap.size() )
|
if ( nbOldLinks == myTLinkNodeMap.size() )
|
||||||
myCreateQuadratic = false;
|
myCreateQuadratic = false;
|
||||||
@ -334,18 +349,20 @@ void SMESH_MesherHelper::AddTLinks(const SMDS_MeshEdge* edge)
|
|||||||
*/
|
*/
|
||||||
//================================================================================
|
//================================================================================
|
||||||
|
|
||||||
void SMESH_MesherHelper::AddTLinks(const SMDS_MeshFace* face)
|
void SMESH_MesherHelper::AddTLinks(const SMDS_MeshFace* f)
|
||||||
{
|
{
|
||||||
if ( face->IsQuadratic() )
|
if ( !f->IsPoly() )
|
||||||
{
|
switch ( f->NbNodes() ) {
|
||||||
const int nbLinks = face->NbCornerNodes();
|
case 6:
|
||||||
for ( int i = 0; i < nbLinks; ++i )
|
AddTLinkNode(f->GetNode(0),f->GetNode(1),f->GetNode(3));
|
||||||
{
|
AddTLinkNode(f->GetNode(1),f->GetNode(2),f->GetNode(4));
|
||||||
const SMDS_MeshNode* n1 = face->GetNode( i );
|
AddTLinkNode(f->GetNode(2),f->GetNode(0),f->GetNode(5)); break;
|
||||||
const SMDS_MeshNode* n2 = face->GetNode(( i + 1 ) % nbLinks );
|
case 8:
|
||||||
const SMDS_MeshNode* n12 = face->GetNode( i + nbLinks );
|
AddTLinkNode(f->GetNode(0),f->GetNode(1),f->GetNode(4));
|
||||||
AddTLinkNode( n1, n2, n12 );
|
AddTLinkNode(f->GetNode(1),f->GetNode(2),f->GetNode(5));
|
||||||
}
|
AddTLinkNode(f->GetNode(2),f->GetNode(3),f->GetNode(6));
|
||||||
|
AddTLinkNode(f->GetNode(3),f->GetNode(0),f->GetNode(7));
|
||||||
|
default:;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user