]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
fix regressions
authoreap <eap@opencascade.com>
Tue, 16 Mar 2021 16:20:31 +0000 (19:20 +0300)
committereap <eap@opencascade.com>
Tue, 16 Mar 2021 16:20:31 +0000 (19:20 +0300)
src/Controls/SMESH_Controls.cxx
src/Controls/SMESH_ControlsDef.hxx
src/SMDS/SMDS_Mesh.cxx
src/StdMeshers/StdMeshers_Regular_1D.cxx

index 86f7f50e22179cafb86c2c8852bab54a60d80da8..4864fb040b2ae461a2eade50f12bfd3af240c0d8 100644 (file)
@@ -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;
 
index e72b64b324fecb23cf35d42900a834320f2b0aee..06fbe1dbae46883f0994f6168b8100414d6d2913 100644 (file)
@@ -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;
 
index 46423d9fc6c87dedf204eb4d39af7188eb405981..10f3e1f5780b8bb97ecb8c255b7395f6aa310680 100644 (file)
@@ -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();
index 1575604467ab24140b963a71c2c6e022b375417d..ed0d0d29447c70bcb480f780e6d9ae9988aa7498 100644 (file)
@@ -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();