fix regressions

This commit is contained in:
eap 2021-03-16 19:20:31 +03:00
parent 2be6ff75b2
commit 3c30ea2bb6
4 changed files with 5 additions and 9 deletions

View File

@ -3442,7 +3442,7 @@ bool RangeOfIds::IsSatisfy( long theId )
if ( myIds.Contains( theId ) ) if ( myIds.Contains( theId ) )
return true; 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] ) if ( theId >= myMin[i] && theId <= myMax[i] )
return true; return true;

View File

@ -653,7 +653,7 @@ namespace SMESH{
protected: protected:
const SMDS_Mesh* myMesh; const SMDS_Mesh* myMesh;
std::vector< smIdType> myMin; std::vector< smIdType > myMin;
std::vector< smIdType > myMax; std::vector< smIdType > myMax;
TIDsMap myIds; TIDsMap myIds;

View File

@ -1000,7 +1000,7 @@ const SMDS_MeshNode * SMDS_Mesh::FindNode(smIdType ID) const
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
const SMDS_MeshNode * SMDS_Mesh::FindNodeVtk(vtkIdType vtkId) 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 const SMDS_MeshElement * SMDS_Mesh::FindElementVtk(vtkIdType IDelem) const
@ -2964,7 +2964,6 @@ void SMDS_Mesh::dumpGrid(std::string ficdump)
void SMDS_Mesh::CompactMesh() void SMDS_Mesh::CompactMesh()
{ {
return;
this->myCompactTime = this->myModifTime; this->myCompactTime = this->myModifTime;
bool idsChange = HasNumerationHoles(); bool idsChange = HasNumerationHoles();

View File

@ -1125,11 +1125,7 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh & theMesh,
par1 = uVec[ i ]; par1 = uVec[ i ];
par2 = uVec[ i+1 ]; par2 = uVec[ i+1 ];
smIdType nbseg = ( i < (int) nbsegs.size() ) ? nbsegs[i] : nbsegs[0]; smIdType nbseg = ( i < (int) nbsegs.size() ) ? nbsegs[i] : nbsegs[0];
if ( nbseg == 1 ) if ( nbseg > 1 )
{
theParams.push_back( par2 );
}
else
{ {
segmentSize = ( Params( i+2 ) - Params( i+1 )) * theLength; segmentSize = ( Params( i+2 ) - Params( i+1 )) * theLength;
eltSize = segmentSize / double( nbseg ); eltSize = segmentSize / double( nbseg );
@ -1138,6 +1134,7 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh & theMesh,
segmentSize, par1, par2, theParams )) segmentSize, par1, par2, theParams ))
return false; return false;
} }
theParams.push_back( par2 );
} }
theParams.pop_back(); theParams.pop_back();