Salome HOME
projects
/
modules
/
smesh.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1eea548
)
[Bug PAL7444] display mesh takes a lot of more memory in 2.1.0 than in 2.0.0.
author
apo
<apo@opencascade.com>
Tue, 22 Mar 2005 12:50:34 +0000
(12:50 +0000)
committer
apo
<apo@opencascade.com>
Tue, 22 Mar 2005 12:50:34 +0000
(12:50 +0000)
src/SMESH_I/Makefile.in
patch
|
blob
|
history
src/SMESH_I/SMESH_Gen_i.cxx
patch
|
blob
|
history
src/SMESH_I/SMESH_Gen_i.hxx
patch
|
blob
|
history
src/SMESH_I/SMESH_Mesh_i.hxx
patch
|
blob
|
history
diff --git
a/src/SMESH_I/Makefile.in
b/src/SMESH_I/Makefile.in
index 700a10d33a8f6b95d195e9435f3234166c76ae0e..3c7b1fcd9f1bb14281e57709b9f07d5b1642214b 100644
(file)
--- a/
src/SMESH_I/Makefile.in
+++ b/
src/SMESH_I/Makefile.in
@@
-45,7
+45,7
@@
EXPORT_HEADERS= \
SMESH_subMesh_i.hxx \
SMESH_Mesh_i.hxx \
SMESH_Hypothesis_i.hxx \
SMESH_subMesh_i.hxx \
SMESH_Mesh_i.hxx \
SMESH_Hypothesis_i.hxx \
- SMESH.hxx
+ SMESH.hxx
SMESH_Base.hxx SMESH_Factory.hxx
EXPORT_PYSCRIPTS = smeshpy.py
EXPORT_PYSCRIPTS = smeshpy.py
@@
-69,7
+69,8
@@
LIB_SRC = \
SMESH_3D_Algo_i.cxx \
SMESH_Filter_i.cxx \
SMESH_Group_i.cxx \
SMESH_3D_Algo_i.cxx \
SMESH_Filter_i.cxx \
SMESH_Group_i.cxx \
- SMESH_Pattern_i.cxx
+ SMESH_Pattern_i.cxx \
+ SMESH_DumpPython.cxx
LIB_SERVER_IDL = SMESH_Gen.idl SMESH_Hypothesis.idl SMESH_Mesh.idl \
SALOME_Component.idl SALOME_Exception.idl \
LIB_SERVER_IDL = SMESH_Gen.idl SMESH_Hypothesis.idl SMESH_Mesh.idl \
SALOME_Component.idl SALOME_Exception.idl \
diff --git
a/src/SMESH_I/SMESH_Gen_i.cxx
b/src/SMESH_I/SMESH_Gen_i.cxx
index db273b20366fbf0c7af485c3ff6e336df52fedbf..8cb0c86c1caf8e712a3218406f7467114a1b5373 100644
(file)
--- a/
src/SMESH_I/SMESH_Gen_i.cxx
+++ b/
src/SMESH_I/SMESH_Gen_i.cxx
@@
-418,6
+418,7
@@
void SMESH_Gen_i::SetCurrentStudy( SALOMEDS::Study_ptr theStudy )
if ( myStudyContextMap.find( studyId ) == myStudyContextMap.end() ) {
myStudyContextMap[ studyId ] = new StudyContext;
}
if ( myStudyContextMap.find( studyId ) == myStudyContextMap.end() ) {
myStudyContextMap[ studyId ] = new StudyContext;
}
+ SetStudyID(studyId);
// set current study for geom engine
/*
if ( !CORBA::is_nil( GetGeomEngine() ) )
// set current study for geom engine
/*
if ( !CORBA::is_nil( GetGeomEngine() ) )
@@
-490,6
+491,9
@@
SMESH::SMESH_Mesh_ptr SMESH_Gen_i::CreateMesh( GEOM::GEOM_Object_ptr theShapeObj
throw ( SALOME::SALOME_Exception )
{
Unexpect aCatch(SALOME_SalomeException);
throw ( SALOME::SALOME_Exception )
{
Unexpect aCatch(SALOME_SalomeException);
+ using namespace SMESH;
+ FactoryHandler aFactory;
+
if(MYDEBUG) MESSAGE( "SMESH_Gen_i::CreateMesh" );
// create mesh
SMESH::SMESH_Mesh_var mesh = this->createMesh();
if(MYDEBUG) MESSAGE( "SMESH_Gen_i::CreateMesh" );
// create mesh
SMESH::SMESH_Mesh_var mesh = this->createMesh();
@@
-500,6
+504,15
@@
SMESH::SMESH_Mesh_ptr SMESH_Gen_i::CreateMesh( GEOM::GEOM_Object_ptr theShapeObj
// publish mesh in the study
if ( CanPublishInStudy( mesh ) )
PublishMesh( myCurrentStudy, mesh.in() );
// publish mesh in the study
if ( CanPublishInStudy( mesh ) )
PublishMesh( myCurrentStudy, mesh.in() );
+
+ CORBA::String_var anEntry = theShapeObject->GetEntry();
+ aFactory->Register(TInvocationID(TResultCont(1,meshServant->GetID()),
+ GetID(),
+ "SMESH_Mesh",
+ "CreateMesh",
+ TArgumentCont(),
+ anEntry.in()));
+
return mesh._retn();
}
return mesh._retn();
}
@@
-542,6
+555,9
@@
SMESH::mesh_array* SMESH_Gen_i::CreateMeshesFromMED( const char* theFileName,
throw ( SALOME::SALOME_Exception )
{
Unexpect aCatch(SALOME_SalomeException);
throw ( SALOME::SALOME_Exception )
{
Unexpect aCatch(SALOME_SalomeException);
+ using namespace SMESH;
+ FactoryHandler aFactory;
+
if(MYDEBUG) MESSAGE( "SMESH_Gen_i::CreateMeshFromMED" );
// Retrieve mesh names from the file
if(MYDEBUG) MESSAGE( "SMESH_Gen_i::CreateMeshFromMED" );
// Retrieve mesh names from the file
@@
-554,6
+570,7
@@
SMESH::mesh_array* SMESH_Gen_i::CreateMeshesFromMED( const char* theFileName,
theStatus = (SMESH::DriverMED_ReadStatus)aStatus;
if(theStatus == SMESH::DRS_OK){
aResult->length( aNames.size() );
theStatus = (SMESH::DriverMED_ReadStatus)aStatus;
if(theStatus == SMESH::DRS_OK){
aResult->length( aNames.size() );
+ TResultCont aResultCont;
int i = 0;
// Iterate through all meshes and create mesh objects
int i = 0;
// Iterate through all meshes and create mesh objects
@@
-574,7
+591,15
@@
SMESH::mesh_array* SMESH_Gen_i::CreateMeshesFromMED( const char* theFileName,
theStatus = status1;
aResult[i++] = SMESH::SMESH_Mesh::_duplicate( mesh );
theStatus = status1;
aResult[i++] = SMESH::SMESH_Mesh::_duplicate( mesh );
+
+ aResultCont.push_back(meshServant->GetID());
}
}
+ aFactory->Register(TInvocationID(aResultCont,
+ GetID(),
+ "SMESH_Mesh",
+ "CreateMeshesFromMED",
+ TArgumentCont(1,std::string(theFileName)),
+ ""));
}
return aResult._retn();
}
}
return aResult._retn();
}
@@
-778,6
+803,10
@@
SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent,
{
INFOS( "SMESH_Gen_i::Save" );
{
INFOS( "SMESH_Gen_i::Save" );
+ CORBA::Boolean anIsValidScript;
+ SALOMEDS::Study_var aStudy = theComponent->GetStudy();
+ SALOMEDS::TMPFile_var aDump = DumpPython(aStudy,false,anIsValidScript);
+
// ASSERT( theComponent->GetStudy()->StudyId() == myCurrentStudy->StudyId() )
// san -- in case <myCurrentStudy> differs from theComponent's study,
// use that of the component
// ASSERT( theComponent->GetStudy()->StudyId() == myCurrentStudy->StudyId() )
// san -- in case <myCurrentStudy> differs from theComponent's study,
// use that of the component
diff --git
a/src/SMESH_I/SMESH_Gen_i.hxx
b/src/SMESH_I/SMESH_Gen_i.hxx
index a9330165364c232e7c74da62819508ca51d88957..adda866b86f2e5566fb54bad690fa5a8cecedf82 100644
(file)
--- a/
src/SMESH_I/SMESH_Gen_i.hxx
+++ b/
src/SMESH_I/SMESH_Gen_i.hxx
@@
-44,6
+44,7
@@
#include "SMESH_Gen.hxx"
#include "GEOM_Client.hxx"
#include "SMESH_Gen.hxx"
#include "GEOM_Client.hxx"
+#include "SMESH_Factory.hxx"
#include <map>
#include <map>
@@
-119,7
+120,8
@@
private:
// ==========================================================
class SMESH_Gen_i:
public virtual POA_SMESH::SMESH_Gen,
// ==========================================================
class SMESH_Gen_i:
public virtual POA_SMESH::SMESH_Gen,
- public virtual Engines_Component_i
+ public virtual Engines_Component_i,
+ public virtual SMESH::Factory
{
public:
// Get last created instance of the class
{
public:
// Get last created instance of the class
@@
-207,6
+209,11
@@
public:
// ****************************************************
// Interface inherited methods (from SALOMEDS::Driver)
// ****************************************************
// ****************************************************
// Interface inherited methods (from SALOMEDS::Driver)
// ****************************************************
+ virtual
+ SALOMEDS::TMPFile*
+ DumpPython(CORBA::Object_ptr theStudy,
+ CORBA::Boolean theIsPublished,
+ CORBA::Boolean& theIsValidScript);
// Save SMESH data
SALOMEDS::TMPFile* Save( SALOMEDS::SComponent_ptr theComponent,
// Save SMESH data
SALOMEDS::TMPFile* Save( SALOMEDS::SComponent_ptr theComponent,
@@
-371,4
+378,5
@@
private:
SALOMEDS::Study_var myCurrentStudy; // Current study
};
SALOMEDS::Study_var myCurrentStudy; // Current study
};
+
#endif
#endif
diff --git
a/src/SMESH_I/SMESH_Mesh_i.hxx
b/src/SMESH_I/SMESH_Mesh_i.hxx
index 3035c1ad3df6539d1ed84c1af6e3e03a886f6e11..87b8791b67242fc900b162543756439ab4586dc7 100644
(file)
--- a/
src/SMESH_I/SMESH_Mesh_i.hxx
+++ b/
src/SMESH_I/SMESH_Mesh_i.hxx
@@
-42,6
+42,7
@@
#include "SMESH_subMesh.hxx"
#include "SALOME_GenericObj_i.hh"
#include "SMESH_subMesh.hxx"
#include "SALOME_GenericObj_i.hh"
+#include "SMESH_Factory.hxx"
class SMESH_Gen_i;
class SMESH_GroupBase_i;
class SMESH_Gen_i;
class SMESH_GroupBase_i;
@@
-50,7
+51,8
@@
class SMESH_GroupBase_i;
class SMESH_Mesh_i:
public virtual POA_SMESH::SMESH_Mesh,
class SMESH_Mesh_i:
public virtual POA_SMESH::SMESH_Mesh,
- public virtual SALOME::GenericObj_i
+ public virtual SALOME::GenericObj_i,
+ public virtual SMESH::Base
{
SMESH_Mesh_i();
SMESH_Mesh_i(const SMESH_Mesh_i&);
{
SMESH_Mesh_i();
SMESH_Mesh_i(const SMESH_Mesh_i&);