mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-11-15 10:08:34 +05:00
0021208: Performance issue when loading SMESH with an hdf file containing a big mesh
rename private methods to start from lower-case letters + void Load();
This commit is contained in:
parent
d5a3c3b28a
commit
656d6656d4
@ -108,7 +108,7 @@ SMESH_Mesh::SMESH_Mesh(int theLocalId,
|
||||
_isAutoColor = false;
|
||||
_isModified = false;
|
||||
_shapeDiagonal = 0.0;
|
||||
_rmGroupCallUp = 0;
|
||||
_callUp = 0;
|
||||
_myMeshDS->ShapeToMesh( PseudoShape() );
|
||||
}
|
||||
|
||||
@ -131,7 +131,7 @@ SMESH_Mesh::SMESH_Mesh():
|
||||
_isAutoColor( false ),
|
||||
_isModified( false ),
|
||||
_shapeDiagonal( 0.0 ),
|
||||
_rmGroupCallUp( 0 )
|
||||
_callUp( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
@ -176,8 +176,8 @@ SMESH_Mesh::~SMESH_Mesh()
|
||||
}
|
||||
_mapSubMesh.clear();
|
||||
|
||||
if ( _rmGroupCallUp) delete _rmGroupCallUp;
|
||||
_rmGroupCallUp = 0;
|
||||
if ( _callUp) delete _callUp;
|
||||
_callUp = 0;
|
||||
|
||||
// remove self from studyContext
|
||||
if ( _gen )
|
||||
@ -326,6 +326,18 @@ double SMESH_Mesh::GetShapeDiagonalSize() const
|
||||
return _shapeDiagonal;
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Load mesh from study file
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
void SMESH_Mesh::Load()
|
||||
{
|
||||
if (_callUp)
|
||||
_callUp->Load();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
/*!
|
||||
* \brief Remove all nodes and elements
|
||||
@ -1043,6 +1055,9 @@ void SMESH_Mesh::NotifySubMeshesHypothesisModification(const SMESH_Hypothesis* h
|
||||
if ( !GetMeshDS()->IsUsedHypothesis( hyp ))
|
||||
return;
|
||||
|
||||
if (_callUp)
|
||||
_callUp->HypothesisModified();
|
||||
|
||||
const SMESH_Algo *foundAlgo = 0;
|
||||
SMESH_HypoFilter algoKind, compatibleHypoKind;
|
||||
list <const SMESHDS_Hypothesis * > usedHyps;
|
||||
@ -1684,15 +1699,15 @@ list<int> SMESH_Mesh::GetGroupIds() const
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Set a caller of RemoveGroup() at level of CORBA API implementation.
|
||||
* \brief Set a caller of methods at level of CORBA API implementation.
|
||||
* The set upCaller will be deleted by SMESH_Mesh
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
void SMESH_Mesh::SetRemoveGroupCallUp( TRmGroupCallUp* upCaller )
|
||||
void SMESH_Mesh::SetCallUp( TCallUp* upCaller )
|
||||
{
|
||||
if ( _rmGroupCallUp ) delete _rmGroupCallUp;
|
||||
_rmGroupCallUp = upCaller;
|
||||
if ( _callUp ) delete _callUp;
|
||||
_callUp = upCaller;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
@ -1708,8 +1723,8 @@ bool SMESH_Mesh::RemoveGroup (const int theGroupID)
|
||||
GetMeshDS()->RemoveGroup( _mapGroup[theGroupID]->GetGroupDS() );
|
||||
delete _mapGroup[theGroupID];
|
||||
_mapGroup.erase (theGroupID);
|
||||
if (_rmGroupCallUp)
|
||||
_rmGroupCallUp->RemoveGroup( theGroupID );
|
||||
if (_callUp)
|
||||
_callUp->RemoveGroup( theGroupID );
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -98,11 +98,14 @@ public:
|
||||
*/
|
||||
static const TopoDS_Solid& PseudoShape();
|
||||
|
||||
/*!
|
||||
* \brief Load mesh from study file
|
||||
*/
|
||||
void Load();
|
||||
/*!
|
||||
* \brief Remove all nodes and elements
|
||||
*/
|
||||
void Clear();
|
||||
|
||||
/*!
|
||||
* \brief Remove all nodes and elements of indicated shape
|
||||
*/
|
||||
@ -295,12 +298,14 @@ public:
|
||||
|
||||
SMESH_Group* ConvertToStandalone ( int theGroupID );
|
||||
|
||||
struct TRmGroupCallUp
|
||||
struct TCallUp // callback from SMESH to SMESH_I level
|
||||
{
|
||||
virtual void RemoveGroup (const int theGroupID)=0;
|
||||
virtual ~TRmGroupCallUp() {}
|
||||
virtual void HypothesisModified ()=0;
|
||||
virtual void Load ()=0;
|
||||
virtual ~TCallUp() {}
|
||||
};
|
||||
void SetRemoveGroupCallUp( TRmGroupCallUp * upCaller );
|
||||
void SetCallUp( TCallUp * upCaller );
|
||||
|
||||
bool SynchronizeGroups();
|
||||
|
||||
@ -351,10 +356,11 @@ protected:
|
||||
|
||||
TListOfListOfInt _mySubMeshOrder;
|
||||
|
||||
// Struct calling RemoveGroup at CORBA API implementation level, used
|
||||
// to make an upper level be consistent with a lower one when group removal
|
||||
// is invoked by hyp modification
|
||||
TRmGroupCallUp* _rmGroupCallUp;
|
||||
// Struct calling methods at CORBA API implementation level, used to
|
||||
// 1) make an upper level be consistent with a lower one when group removal
|
||||
// is invoked by hyp modification (issue 0020918)
|
||||
// 2) to forget not loaded mesh data at hyp modification
|
||||
TCallUp* _callUp;
|
||||
|
||||
protected:
|
||||
SMESH_Mesh();
|
||||
|
Loading…
Reference in New Issue
Block a user