if ( myStudyContextMap.find( studyId ) == myStudyContextMap.end() ) {
myStudyContextMap[ studyId ] = new StudyContext;
}
+ SetStudyID(studyId);
// set current study for geom engine
/*
if ( !CORBA::is_nil( GetGeomEngine() ) )
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();
// 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();
}
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
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
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();
}
{
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
#include "SMESH_Gen.hxx"
#include "GEOM_Client.hxx"
+#include "SMESH_Factory.hxx"
#include <map>
// ==========================================================
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
// ****************************************************
// 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,
SALOMEDS::Study_var myCurrentStudy; // Current study
};
+
#endif
#include "SMESH_subMesh.hxx"
#include "SALOME_GenericObj_i.hh"
+#include "SMESH_Factory.hxx"
class SMESH_Gen_i;
class SMESH_GroupBase_i;
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&);