From 3afca7a3ff82fd4350bd662acf130a72a4e3fc9a Mon Sep 17 00:00:00 2001 From: eap Date: Thu, 15 Oct 2020 18:02:26 +0300 Subject: [PATCH] #19926 [CEA 19782] renumbering meshes \\ fix excess nodes --- src/SMESHGUI/SMESHGUI_Hypotheses.cxx | 2 +- src/StdMeshers/StdMeshers_Hexa_3D.cxx | 19 ++++++++++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/src/SMESHGUI/SMESHGUI_Hypotheses.cxx b/src/SMESHGUI/SMESHGUI_Hypotheses.cxx index a228b87e0..8256f8883 100644 --- a/src/SMESHGUI/SMESHGUI_Hypotheses.cxx +++ b/src/SMESHGUI/SMESHGUI_Hypotheses.cxx @@ -605,7 +605,7 @@ QString SMESHGUI_GenericHypothesisCreator::helpPage() const else if ( aHypType == "MaxElementArea") aHelpFileName = "2d_meshing_hypo.html#max-element-area-anchor"; else if ( aHypType == "MaxElementVolume") - aHelpFileName = "max_element_volume_hypo.html"; + aHelpFileName = "3d_meshing_hypo.html#max-element-volume-hypothesis"; else if ( aHypType == "StartEndLength") aHelpFileName = "1d_meshing_hypo.html#start-and-end-length-anchor"; else if ( aHypType == "Deflection1D") diff --git a/src/StdMeshers/StdMeshers_Hexa_3D.cxx b/src/StdMeshers/StdMeshers_Hexa_3D.cxx index 26b22cae1..cde18b142 100644 --- a/src/StdMeshers/StdMeshers_Hexa_3D.cxx +++ b/src/StdMeshers/StdMeshers_Hexa_3D.cxx @@ -824,7 +824,16 @@ bool StdMeshers_Hexa_3D::Compute(SMESH_Mesh & aMesh, pointsOnShapes[ SMESH_Block::ID_V111 ] = fTop->GetXYZ( X, Y ); gp_XYZ params; // normalized parameters of an internal node within the unit box - for ( x = 0; x < xSize; ++x ) + + if ( toRenumber ) + for ( y = 0; y < ySize; ++y ) + { + vector< const SMDS_MeshNode* >& column0y = columns[ colIndex( 0, y )]; + for ( z = 0; z < zSize; ++z ) + renumHelper.AddReplacingNode( column0y[ z ] ); + } + + for ( x = 1; x < xSize-1; ++x ) { if ( toRenumber ) { @@ -912,6 +921,14 @@ bool StdMeshers_Hexa_3D::Compute(SMESH_Mesh & aMesh, } } // x loop + if ( toRenumber ) + for ( y = 0; y < ySize; ++y ) + { + vector< const SMDS_MeshNode* >& columnXy = columns[ colIndex( X, y )]; + for ( z = 0; z < zSize; ++z ) + renumHelper.AddReplacingNode( columnXy[ z ] ); + } + // side data no more needed, free memory for ( int i = 0; i < 6; ++i ) SMESHUtils::FreeVector( aCubeSide[i]._columns ); -- 2.39.2