From 3c30ea2bb6801679283076a7fb0ee380c8cd7de3 Mon Sep 17 00:00:00 2001 From: eap Date: Tue, 16 Mar 2021 19:20:31 +0300 Subject: [PATCH] fix regressions --- src/Controls/SMESH_Controls.cxx | 2 +- src/Controls/SMESH_ControlsDef.hxx | 2 +- src/SMDS/SMDS_Mesh.cxx | 3 +-- src/StdMeshers/StdMeshers_Regular_1D.cxx | 7 ++----- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/Controls/SMESH_Controls.cxx b/src/Controls/SMESH_Controls.cxx index 86f7f50e2..4864fb040 100644 --- a/src/Controls/SMESH_Controls.cxx +++ b/src/Controls/SMESH_Controls.cxx @@ -3442,7 +3442,7 @@ bool RangeOfIds::IsSatisfy( long theId ) if ( myIds.Contains( theId ) ) return true; - for ( int i = 1, n = myMin.size(); i <= n; i++ ) + for ( size_t i = 0; i < myMin.size(); i++ ) if ( theId >= myMin[i] && theId <= myMax[i] ) return true; diff --git a/src/Controls/SMESH_ControlsDef.hxx b/src/Controls/SMESH_ControlsDef.hxx index e72b64b32..06fbe1dba 100644 --- a/src/Controls/SMESH_ControlsDef.hxx +++ b/src/Controls/SMESH_ControlsDef.hxx @@ -653,7 +653,7 @@ namespace SMESH{ protected: const SMDS_Mesh* myMesh; - std::vector< smIdType> myMin; + std::vector< smIdType > myMin; std::vector< smIdType > myMax; TIDsMap myIds; diff --git a/src/SMDS/SMDS_Mesh.cxx b/src/SMDS/SMDS_Mesh.cxx index 46423d9fc..10f3e1f57 100644 --- a/src/SMDS/SMDS_Mesh.cxx +++ b/src/SMDS/SMDS_Mesh.cxx @@ -1000,7 +1000,7 @@ const SMDS_MeshNode * SMDS_Mesh::FindNode(smIdType ID) const /////////////////////////////////////////////////////////////////////////////// const SMDS_MeshNode * SMDS_Mesh::FindNodeVtk(vtkIdType vtkId) const { - return myNodeFactory->FindNode( FromVtkToSmds( vtkId )); + return myNodeFactory->FindNode( vtkId + 1 ); } const SMDS_MeshElement * SMDS_Mesh::FindElementVtk(vtkIdType IDelem) const @@ -2964,7 +2964,6 @@ void SMDS_Mesh::dumpGrid(std::string ficdump) void SMDS_Mesh::CompactMesh() { - return; this->myCompactTime = this->myModifTime; bool idsChange = HasNumerationHoles(); diff --git a/src/StdMeshers/StdMeshers_Regular_1D.cxx b/src/StdMeshers/StdMeshers_Regular_1D.cxx index 157560446..ed0d0d294 100644 --- a/src/StdMeshers/StdMeshers_Regular_1D.cxx +++ b/src/StdMeshers/StdMeshers_Regular_1D.cxx @@ -1125,11 +1125,7 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh & theMesh, par1 = uVec[ i ]; par2 = uVec[ i+1 ]; smIdType nbseg = ( i < (int) nbsegs.size() ) ? nbsegs[i] : nbsegs[0]; - if ( nbseg == 1 ) - { - theParams.push_back( par2 ); - } - else + if ( nbseg > 1 ) { segmentSize = ( Params( i+2 ) - Params( i+1 )) * theLength; eltSize = segmentSize / double( nbseg ); @@ -1138,6 +1134,7 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh & theMesh, segmentSize, par1, par2, theParams )) return false; } + theParams.push_back( par2 ); } theParams.pop_back(); -- 2.39.2