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