mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-02-09 17:53:06 +05:00
23594: EDF 17213 : crash of salome when loading SMESH or dumping the study
Attempt 1: in SMESH_Mesh::SortByMeshOrder() assure same size of sortedPos and onlyOrderedList
This commit is contained in:
parent
f2614ea1d5
commit
a4be05bc3b
@ -2431,8 +2431,9 @@ bool SMESH_Mesh::SortByMeshOrder(std::vector<SMESH_subMesh*>& theListToSort) con
|
||||
{
|
||||
TPosInList smPos = find( smBeg, smEnd, smVec[i] );
|
||||
if ( smPos != smEnd ) {
|
||||
onlyOrderedList.push_back( smVec[i] );
|
||||
sortedPos[ distance( smBeg, smPos )] = smPos;
|
||||
if ( sortedPos.size() > onlyOrderedList.size() )
|
||||
onlyOrderedList.push_back( smVec[i] );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2656,6 +2656,11 @@ SMDS_Mesh* SMESH_MeshAlgos::MakeOffset( SMDS_ElemIteratorPtr theFaceIt,
|
||||
TEPairVec& theNew2OldFaces,
|
||||
TNPairVec& theNew2OldNodes)
|
||||
{
|
||||
if ( theSrcMesh.GetMeshInfo().NbFaces( ORDER_QUADRATIC ) > 0 )
|
||||
throw SALOME_Exception( "Offset of quadratic mesh not supported" );
|
||||
if ( theSrcMesh.GetMeshInfo().NbFaces() > theSrcMesh.GetMeshInfo().NbTriangles() )
|
||||
throw SALOME_Exception( "Offset of non-triangular mesh not supported" );
|
||||
|
||||
SMDS_Mesh* newMesh = new SMDS_Mesh;
|
||||
theNew2OldFaces.clear();
|
||||
theNew2OldNodes.clear();
|
||||
@ -2663,11 +2668,6 @@ SMDS_Mesh* SMESH_MeshAlgos::MakeOffset( SMDS_ElemIteratorPtr theFaceIt,
|
||||
( std::make_pair(( const SMDS_MeshElement*) 0,
|
||||
( const SMDS_MeshElement*) 0)); // to have index == face->GetID()
|
||||
|
||||
if ( theSrcMesh.GetMeshInfo().NbFaces( ORDER_QUADRATIC ) > 0 )
|
||||
throw SALOME_Exception( "Offset of quadratic mesh not supported" );
|
||||
if ( theSrcMesh.GetMeshInfo().NbFaces() > theSrcMesh.GetMeshInfo().NbTriangles() )
|
||||
throw SALOME_Exception( "Offset of non-triangular mesh not supported" );
|
||||
|
||||
// copy input faces to the newMesh keeping IDs of nodes
|
||||
|
||||
double minNodeDist = 1e100;
|
||||
|
Loading…
Reference in New Issue
Block a user