From: asozinov Date: Fri, 21 Jun 2024 13:04:58 +0000 (+0100) Subject: EDF 30254 - quadratic to biquadratic : several problems X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=45f1eb2ab7d9fb5cdb43eebd3a22adcf1c1114da;p=modules%2Fsmesh.git EDF 30254 - quadratic to biquadratic : several problems Fixed problem with free nodes after convert quadratic <-> bi-quadratic --- diff --git a/src/SMDS/SMDS_VolumeTool.cxx b/src/SMDS/SMDS_VolumeTool.cxx index 6e76ae729..0742c2440 100644 --- a/src/SMDS/SMDS_VolumeTool.cxx +++ b/src/SMDS/SMDS_VolumeTool.cxx @@ -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 + | + diff --git a/src/SMESH/SMESH_MeshEditor.cxx b/src/SMESH/SMESH_MeshEditor.cxx index 125bbaa2e..aaed9c013 100644 --- a/src/SMESH/SMESH_MeshEditor.cxx +++ b/src/SMESH/SMESH_MeshEditor.cxx @@ -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;