EDF 30254 - quadratic to biquadratic : several problems

Fixed problem with free nodes after convert quadratic <-> bi-quadratic
This commit is contained in:
asozinov 2024-06-21 14:04:58 +01:00
parent 498ebef364
commit 82a30347d8
2 changed files with 12 additions and 3 deletions

View File

@ -265,7 +265,7 @@ static int QuadPyram_RE [5][9] = { // REVERSED -> FORWARD (EXTERNAL)
{ 3, 8, 0, 9, 4, 12,3, 4, 4 }};
static int QuadPyram_nbN [] = { 8, 6, 6, 6, 6 };
/* 2 1 5 4 3 6 7 8 9 10 11 12 13 14 15 16 18 17
/*
// + N4 +
// /|\ /|\
// 9/ | \10 + | +

View File

@ -9325,6 +9325,12 @@ smIdType SMESH_MeshEditor::convertElemToQuadratic(SMESHDS_SubMesh * theSm,
void SMESH_MeshEditor::ConvertToQuadratic(const bool theForce3d, const bool theToBiQuad)
{
/*
// remove medium nodes
for ( size_t i = nbCornerNodes; i < nodes.size(); ++i )
if ( nodes[i]->NbInverseElements() == 0 )
meshDS->RemoveFreeNode( nodes[i], theSm );
*/
//MESSAGE("ConvertToQuadratic "<< theForce3d << " " << theToBiQuad);
SMESHDS_Mesh* meshDS = GetMeshDS();
@ -9483,7 +9489,8 @@ void SMESH_MeshEditor::ConvertToQuadratic(const bool theForce3d, const bool theT
case SMDSEntity_TriQuad_Hexa:
NewVolume = aHelper.AddVolume(nodes[0], nodes[1], nodes[2], nodes[3],
nodes[4], nodes[5], nodes[6], nodes[7], id, theForce3d);
for ( size_t i = 20; i < nodes.size(); ++i ) // rm central nodes
for (size_t i = 8; i < nodes.size(); ++i) // rm central nodes from each edge
//for (size_t i = 20; i < nodes.size(); ++i) // rm central nodes from each edge
if ( nodes[i]->NbInverseElements() == 0 )
GetMeshDS()->RemoveFreeNode( nodes[i], /*sm=*/0, /*fromGroups=*/true );
break;
@ -9496,7 +9503,9 @@ void SMESH_MeshEditor::ConvertToQuadratic(const bool theForce3d, const bool theT
case SMDSEntity_BiQuad_Penta:
NewVolume = aHelper.AddVolume(nodes[0], nodes[1], nodes[2],
nodes[3], nodes[4], nodes[5], id, theForce3d);
for ( size_t i = 15; i < nodes.size(); ++i ) // rm central nodes
for (size_t i = 6; i < nodes.size(); ++i) // rm central nodes
//for ( size_t i = 15; i < nodes.size(); ++i ) // rm central nodes
if ( nodes[i]->NbInverseElements() == 0 )
GetMeshDS()->RemoveFreeNode( nodes[i], /*sm=*/0, /*fromGroups=*/true );
break;