}
-SMESH_ActorDef::SMESH_ActorDef(){
- if(MYDEBUG) MESSAGE("SMESH_ActorDef");
+SMESH_ActorDef::SMESH_ActorDef()
+{
+ if(MYDEBUG) MESSAGE("SMESH_ActorDef - "<<this);
myTimeStamp = vtkTimeStamp::New();
my2DActor = SMESH_DeviceActor::New();
my2DActor->SetUserMatrix(aMatrix);
- my2DActor->SetStoreMapping(true);
my2DActor->PickableOff();
my2DActor->SetProperty(mySurfaceProp);
my2DActor->SetBackfaceProperty(myBackSurfaceProp);
my3DActor = SMESH_DeviceActor::New();
my3DActor->SetUserMatrix(aMatrix);
- my3DActor->SetStoreMapping(true);
my3DActor->PickableOff();
my3DActor->SetProperty(mySurfaceProp);
my3DActor->SetBackfaceProperty(myBackSurfaceProp);
my1DActor = SMESH_DeviceActor::New();
my1DActor->SetUserMatrix(aMatrix);
- my1DActor->SetStoreMapping(true);
my1DActor->PickableOff();
my1DActor->SetHighlited(true);
my1DActor->SetProperty(myEdgeProp);
my1DExtActor = SMESH_DeviceActor::New();
my1DExtActor->SetUserMatrix(aMatrix);
- my1DExtActor->SetStoreMapping(true);
my1DExtActor->PickableOff();
my1DExtActor->SetHighlited(true);
my1DExtActor->SetVisibility(false);
myNodeActor = SMESH_DeviceActor::New();
myNodeActor->SetUserMatrix(aMatrix);
- myNodeActor->SetStoreMapping(true);
+ myNodeActor->SetStoreClippingMapping(true);
myNodeActor->PickableOff();
myNodeActor->SetVisibility(false);
myNodeActor->SetProperty(myNodeProp);
myBaseActor = SMESH_DeviceActor::New();
myBaseActor->SetUserMatrix(aMatrix);
- myBaseActor->SetStoreMapping(true);
+ myBaseActor->SetStoreGemetryMapping(true);
myBaseActor->GetProperty()->SetOpacity(0.0);
- myBaseActor->myGeomFilter->SetInside(true);
myPickableActor = myBaseActor;
myHighlitableActor = SMESH_DeviceActor::New();
myHighlitableActor->SetUserMatrix(aMatrix);
- myHighlitableActor->SetStoreMapping(false);
myHighlitableActor->PickableOff();
myHighlitableActor->SetRepresentation(SMESH_DeviceActor::eWireframe);
- myNodeHighlitableActor = SMESH_DeviceActor::New();
- myNodeHighlitableActor->SetUserMatrix(aMatrix);
- myNodeHighlitableActor->SetStoreMapping(false);
- myNodeHighlitableActor->PickableOff();
- myNodeHighlitableActor->SetRepresentation(SMESH_DeviceActor::ePoint);
- aFilter = myNodeHighlitableActor->GetExtractUnstructuredGrid();
- aFilter->SetModeOfExtraction(SALOME_ExtractUnstructuredGrid::ePoints);
-
-
SetShrinkFactor(SMESH::GetFloat("SMESH:SettingsShrinkCoeff", 75)/100.);
myName = "";
}
-SMESH_ActorDef::~SMESH_ActorDef(){
- if(MYDEBUG) MESSAGE("~SMESH_ActorDef");
+SMESH_ActorDef::~SMESH_ActorDef()
+{
+ if(MYDEBUG) MESSAGE("~SMESH_ActorDef - "<<this);
myScalarBarActor->Delete();
myLookupTable->Delete();
myBaseActor->Delete();
myHighlitableActor->Delete();
- myNodeHighlitableActor->Delete();
-
//Deleting of pints numbering pipeline
//---------------------------------------
}
-void SMESH_ActorDef::SetControlMode(eControl theMode){
+void
+SMESH_ActorDef::
+SetControlMode(eControl theMode)
+{
+ SetControlMode(theMode,true);
+}
+
+
+void
+SMESH_ActorDef::
+SetControlMode(eControl theMode,
+ bool theCheckEntityMode)
+{
myControlMode = eNone;
+ theCheckEntityMode &= QAD_CONFIG->getSetting("SMESH:DispayEntity") == "true";
my1DActor->GetMapper()->SetScalarVisibility(false);
my2DActor->GetMapper()->SetScalarVisibility(false);
switch(myControlMode){
case eFreeEdges:
case eFreeBorders:
- my1DExtActor->SetExtControlMode(aFunctor,myControlActor);
+ my1DExtActor->SetExtControlMode(aFunctor);
break;
case eLength2D:
case eMultiConnection2D:
- my1DExtActor->SetExtControlMode(aFunctor,myControlActor,myScalarBarActor,myLookupTable);
+ my1DExtActor->SetExtControlMode(aFunctor,myScalarBarActor,myLookupTable);
break;
default:
myControlActor->SetControlMode(aFunctor,myScalarBarActor,myLookupTable);
}
}
- if(QAD_CONFIG->getSetting("SMESH:DispayEntity") == "true"){
+ if(theCheckEntityMode){
if(myControlActor == my1DActor)
- myEntityMode = eEdges;
- else if(myControlActor == my2DActor)
- myEntityMode = eFaces;
- else if(myControlActor == my3DActor)
- myEntityMode = eVolumes;
+ SetEntityMode(eEdges);
+ else if(myControlActor == my2DActor){
+ switch(myControlMode){
+ case eLength2D:
+ case eFreeEdges:
+ case eMultiConnection2D:
+ //SetEntityMode(eEdges);
+ SetEntityMode(eFaces);
+ break;
+ default:
+ SetEntityMode(eFaces);
+ }
+ }else if(myControlActor == my3DActor)
+ SetEntityMode(eVolumes);
}
- }else if(QAD_CONFIG->getSetting("SMESH:DispayEntity") == "true"){
+ }else if(theCheckEntityMode){
myEntityMode = eAllEntity;
}
theRenderer->AddActor(my1DExtActor);
theRenderer->AddActor(myHighlitableActor);
- theRenderer->AddActor(myNodeHighlitableActor);
theRenderer->AddActor2D(myScalarBarActor);
theRenderer->RemoveActor(myBaseActor);
theRenderer->RemoveActor(myHighlitableActor);
- theRenderer->RemoveActor(myNodeHighlitableActor);
theRenderer->RemoveActor(my1DActor);
theRenderer->RemoveActor(my1DExtActor);
myBaseActor->Init(myVisualObj,myImplicitBoolean);
myHighlitableActor->Init(myVisualObj,myImplicitBoolean);
- myNodeHighlitableActor->Init(myVisualObj,myImplicitBoolean);
my1DActor->Init(myVisualObj,myImplicitBoolean);
my1DExtActor->Init(myVisualObj,myImplicitBoolean);
myBaseActor->SetTransform(theTransform);
myHighlitableActor->SetTransform(theTransform);
- myNodeHighlitableActor->SetTransform(theTransform);
my1DActor->SetTransform(theTransform);
my1DExtActor->SetTransform(theTransform);
void SMESH_ActorDef::SetEntityMode(unsigned int theMode){
- if(!myVisualObj->GetNbEntities(SMDSAbs_Edge))
+ myEntityState = eAllEntity;
+
+ if(!myVisualObj->GetNbEntities(SMDSAbs_Edge)){
+ myEntityState &= ~eEdges;
theMode &= ~eEdges;
+ }
- if(!myVisualObj->GetNbEntities(SMDSAbs_Face))
+ if(!myVisualObj->GetNbEntities(SMDSAbs_Face)){
+ myEntityState &= ~eFaces;
theMode &= ~eFaces;
+ }
- if(!myVisualObj->GetNbEntities(SMDSAbs_Volume))
+ if(!myVisualObj->GetNbEntities(SMDSAbs_Volume)){
+ myEntityState &= ~eVolumes;
theMode &= ~eVolumes;
+ }
if(!theMode){
if(myVisualObj->GetNbEntities(SMDSAbs_Edge))
theMode |= eVolumes;
}
+ myBaseActor->myGeomFilter->SetInside(myEntityMode != myEntityState);
+
myEntityMode = theMode;
SALOME_ExtractUnstructuredGrid* aFilter = NULL;
aFilter = myBaseActor->GetExtractUnstructuredGrid();
myHighlitableActor->SetVisibility(false);
myHighlitableActor->SetHighlited(false);
- myNodeHighlitableActor->SetVisibility(false);
- myNodeHighlitableActor->SetHighlited(false);
-
if(myIsHighlighted){
myHighlitableActor->SetProperty(myHighlightProp);
}else if(myIsPreselected){
myHighlitableActor->SetProperty(myPreselectProp);
}
- bool isVisible = GetVisibility();
+ bool anIsVisible = GetVisibility();
if(myIsHighlighted || myIsPreselected){
if(GetUnstructuredGrid()->GetNumberOfCells()){
+ myHighlitableActor->SetHighlited(anIsVisible);
+ myHighlitableActor->SetVisibility(anIsVisible);
+ myHighlitableActor->GetExtractUnstructuredGrid()->
+ SetModeOfExtraction(SALOME_ExtractUnstructuredGrid::eCells);
myHighlitableActor->SetRepresentation(SMESH_DeviceActor::eWireframe);
- myHighlitableActor->SetVisibility(isVisible);
- myHighlitableActor->SetHighlited(isVisible);
- }
- if(myRepresentation == ePoint || GetPointRepresentation()){
- myNodeHighlitableActor->SetProperty(myHighlitableActor->GetProperty());
- myNodeHighlitableActor->SetVisibility(isVisible);
- myNodeHighlitableActor->SetHighlited(isVisible);
+ }else if(myRepresentation == ePoint || GetPointRepresentation()){
+ myHighlitableActor->SetHighlited(anIsVisible);
+ myHighlitableActor->SetVisibility(anIsVisible);
+ myHighlitableActor->GetExtractUnstructuredGrid()->
+ SetModeOfExtraction(SALOME_ExtractUnstructuredGrid::ePoints);
+ myHighlitableActor->SetRepresentation(SMESH_DeviceActor::ePoint);
}
}
}
unsigned long aTime = myTimeStamp->GetMTime();
unsigned long anObjTime = myVisualObj->GetUnstructuredGrid()->GetMTime();
if (anObjTime > aTime)
- SetControlMode(GetControlMode());
+ SetControlMode(GetControlMode(),false);
}
if(myIsPointsLabeled){
SetPointsLabeled(myIsPointsLabeled);
myBaseActor->SetImplicitFunctionUsed(theIsImplicitFunctionUsed);
myHighlitableActor->SetImplicitFunctionUsed(theIsImplicitFunctionUsed);
- myNodeHighlitableActor->SetImplicitFunctionUsed(theIsImplicitFunctionUsed);
my1DActor->SetImplicitFunctionUsed(theIsImplicitFunctionUsed);
my1DExtActor->SetImplicitFunctionUsed(theIsImplicitFunctionUsed);
virtual long GetControlsPrecision() const { return myControlsPrecision; }
protected:
+ void SetControlMode(eControl theMode, bool theCheckEntityMode);
void SetImplicitFunctionUsed(bool theIsImplicitFunctionUsed);
bool IsImplicitFunctionUsed() const;
vtkProperty* myHighlightProp;
vtkProperty* myPreselectProp;
SMESH_DeviceActor* myHighlitableActor;
- SMESH_DeviceActor* myNodeHighlitableActor;
eControl myControlMode;
SMESH_DeviceActor* my2DActor;
SMESH_DeviceActor* my1DExtActor;
unsigned int myEntityMode;
+ unsigned int myEntityState;
bool myIsPointsVisible;
bool myIsShrinkable;
vtkStandardNewMacro(SMESH_DeviceActor);
-SMESH_DeviceActor::SMESH_DeviceActor(){
+SMESH_DeviceActor::SMESH_DeviceActor()
+{
+ if(MYDEBUG) MESSAGE("SMESH_DeviceActor - "<<this);
+
myIsShrunk = false;
myIsShrinkable = false;
myRepresentation = eSurface;
myShrinkFilter = vtkShrinkFilter::New();
+ myStoreClippingMapping = false;
+
myExtractGeometry = SMESH_ExtractGeometry::New();
myExtractGeometry->SetReleaseDataFlag(true);
- myExtractGeometry->SetStoreMapping(true);
myIsImplicitFunctionUsed = false;
myExtractUnstructuredGrid = SALOME_ExtractUnstructuredGrid::New();
- myExtractUnstructuredGrid->SetStoreMapping(true);
-
+
myMergeFilter = vtkMergeFilter::New();
- myStoreMapping = false;
myGeomFilter = SALOME_GeometryFilter::New();
myTransformFilter = SALOME_TransformFilter::New();
SMESH_DeviceActor::~SMESH_DeviceActor(){
- if(MYDEBUG) MESSAGE("~SMESH_DeviceActor");
+ if(MYDEBUG) MESSAGE("~SMESH_DeviceActor - "<<this);
+
myProperty->Delete();
- myMapper->RemoveAllInputs();
myMapper->Delete();
- myShrinkFilter->UnRegisterAllOutputs();
myShrinkFilter->Delete();
- myExtractUnstructuredGrid->UnRegisterAllOutputs();
myExtractUnstructuredGrid->Delete();
- myMergeFilter->UnRegisterAllOutputs();
myMergeFilter->Delete();
- myGeomFilter->UnRegisterAllOutputs();
myGeomFilter->Delete();
- myExtractGeometry->UnRegisterAllOutputs();
myExtractGeometry->Delete();
- myTransformFilter->UnRegisterAllOutputs();
myTransformFilter->Delete();
for(int i = 0, iEnd = myPassFilter.size(); i < iEnd; i++){
- myPassFilter[i]->UnRegisterAllOutputs();
myPassFilter[i]->Delete();
}
}
-void SMESH_DeviceActor::SetStoreMapping(int theStoreMapping){
- if (myStoreMapping == theStoreMapping)
- return;
- myStoreMapping = theStoreMapping;
- myGeomFilter->SetStoreMapping( myStoreMapping );
- Modified();
+void
+SMESH_DeviceActor::
+SetStoreGemetryMapping(bool theStoreMapping)
+{
+ myGeomFilter->SetStoreMapping(theStoreMapping);
+ SetStoreClippingMapping(theStoreMapping);
+}
+
+
+void
+SMESH_DeviceActor::
+SetStoreClippingMapping(bool theStoreMapping)
+{
+ myStoreClippingMapping = theStoreMapping;
+ myExtractGeometry->SetStoreMapping(theStoreMapping && myIsImplicitFunctionUsed);
+ SetStoreIDMapping(theStoreMapping);
+}
+
+
+void
+SMESH_DeviceActor::
+SetStoreIDMapping(bool theStoreMapping)
+{
+ myExtractUnstructuredGrid->SetStoreMapping(theStoreMapping);
}
SMESH_DeviceActor::
SetImplicitFunctionUsed(bool theIsImplicitFunctionUsed)
{
- if(myIsImplicitFunctionUsed == theIsImplicitFunctionUsed)
- return;
-
int anId = 0;
if(theIsImplicitFunctionUsed)
myPassFilter[ anId ]->SetInput( myExtractGeometry->GetOutput() );
myPassFilter[ anId ]->SetInput( myMergeFilter->GetOutput() );
myIsImplicitFunctionUsed = theIsImplicitFunctionUsed;
+ SetStoreClippingMapping(myStoreClippingMapping);
}
myExtractGeometry->SetInput(myMergeFilter->GetOutput());
int anId = 0;
- myPassFilter[ anId ]->SetInput( myMergeFilter->GetOutput() );
+ SetImplicitFunctionUsed(myIsImplicitFunctionUsed);
myPassFilter[ anId + 1]->SetInput( myPassFilter[ anId ]->GetOutput() );
anId++; // 1
- myGeomFilter->SetStoreMapping( myStoreMapping );
myGeomFilter->SetInput( myPassFilter[ anId ]->GetOutput() );
anId++; // 2
bool anIsInitialized = theFunctor;
if(anIsInitialized){
vtkUnstructuredGrid* aDataSet = vtkUnstructuredGrid::New();
+
+ SetStoreIDMapping(true);
+ myExtractUnstructuredGrid->Update();
vtkUnstructuredGrid* aGrid = myExtractUnstructuredGrid->GetOutput();
+
aDataSet->ShallowCopy(aGrid);
vtkDoubleArray *aScalars = vtkDoubleArray::New();
}
void SMESH_DeviceActor::SetExtControlMode(SMESH::Controls::FunctorPtr theFunctor,
- SMESH_DeviceActor* theDeviceActor,
vtkScalarBarActor* theScalarBarActor,
vtkLookupTable* theLookupTable)
{
theScalarBarActor->SetVisibility(anIsInitialized);
}
-void SMESH_DeviceActor::SetExtControlMode(SMESH::Controls::FunctorPtr theFunctor,
- SMESH_DeviceActor* theDeviceActor)
+void SMESH_DeviceActor::SetExtControlMode(SMESH::Controls::FunctorPtr theFunctor)
{
myExtractUnstructuredGrid->ClearRegisteredCells();
myExtractUnstructuredGrid->ClearRegisteredCellsWithType();
void SMESH_DeviceActor::SetVisibility(int theMode){
- if(!myExtractUnstructuredGrid->GetInput() || GetUnstructuredGrid()->GetNumberOfCells()){
+ if(!myExtractUnstructuredGrid->GetInput() ||
+ GetUnstructuredGrid()->GetNumberOfCells())
+ {
vtkLODActor::SetVisibility(theMode);
}else{
vtkLODActor::SetVisibility(false);
anID = myExtractGeometry->GetNodeObjId(theVtkID);
vtkIdType aRetID = myVisualObj->GetNodeObjId(anID);
- if(MYDEBUG) MESSAGE("GetNodeObjId - theVtkID = "<<theVtkID<<"; aRetID = "<<aRetID);
+ if(MYDEBUG) MESSAGE("GetNodeObjId - theVtkID = "<<theVtkID<<"; anID = "<<anID<<"; aRetID = "<<aRetID);
return aRetID;
}
//
//
//
-// File : SMESH_Actor.h
+// File : SMESH_DeviceActor.h
// Author : Nicolas REJNERI
// Module : SMESH
// $Header$
vtkTypeMacro(SMESH_DeviceActor,vtkLODActor);
static SMESH_DeviceActor* New();
- void SetStoreMapping(int theStoreMapping);
- int GetStoreMapping(){ return myStoreMapping;}
+ void SetStoreClippingMapping(bool theStoreMapping);
+ void SetStoreGemetryMapping(bool theStoreMapping);
+ void SetStoreIDMapping(bool theStoreMapping);
virtual int GetNodeObjId(int theVtkID);
virtual float* GetNodeCoord(int theObjID);
vtkScalarBarActor* theScalarBarActor,
vtkLookupTable* theLookupTable);
void SetExtControlMode(SMESH::Controls::FunctorPtr theFunctor,
- SMESH_DeviceActor* theDeviceActor,
vtkScalarBarActor* theScalarBarActor,
vtkLookupTable* theLookupTable);
- void SetExtControlMode(SMESH::Controls::FunctorPtr theFunctor,
- SMESH_DeviceActor* theDeviceActor);
+ void SetExtControlMode(SMESH::Controls::FunctorPtr theFunctor);
bool IsHighlited() { return myIsHighlited;}
void SetHighlited(bool theIsHighlited);
vtkMergeFilter* myMergeFilter;
SALOME_ExtractUnstructuredGrid* myExtractUnstructuredGrid;
- bool myStoreMapping;
+ bool myStoreClippingMapping;
SALOME_GeometryFilter *myGeomFilter;
SALOME_TransformFilter *myTransformFilter;
std::vector<SALOME_PassThroughFilter*> myPassFilter;
};
-#endif //SMESH_ACTOR_H
+#endif //SMESH_DEVICE_ACTOR_H
//=================================================================================
SMESH_VisualObjDef::SMESH_VisualObjDef()
{
+ if(MYDEBUG) MESSAGE("SMESH_MeshObj - "<<this);
myGrid = vtkUnstructuredGrid::New();
}
SMESH_VisualObjDef::~SMESH_VisualObjDef()
{
- if ( MYDEBUG )
- MESSAGE( "~SMESH_MeshObj - myGrid->GetReferenceCount() = " << myGrid->GetReferenceCount() );
+ if(MYDEBUG) {
+ MESSAGE("~SMESH_MeshObj - "<<this);
+ myGrid->DebugOn();
+ }
myGrid->Delete();
}
SALOME_Selection *Sel = SALOME_Selection::Selection(anActiveStudy->getSelection());
SALOME_ListIteratorOfListIO It(Sel->StoredIObjects());
+
+ aStudyBuilder->NewCommand(); // There is a transaction
for(; It.More(); It.Next()){
Handle(SALOME_InteractiveObject) IObject = It.Value();
if(IObject->hasEntry()){
/* Erase child graphical objects */
SALOMEDS::ChildIterator_var it = aStudy->NewChildIterator(SO);
- for(; it->More(); it->Next()){
+ for(it->InitEx(true); it->More(); it->Next()){
SALOMEDS::SObject_var CSO = it->Value();
if(CSO->FindAttribute(anAttr, "AttributeIOR")){
anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr);
} /* IObject->hasEntry() */
} /* more/next */
+ aStudyBuilder->CommitCommand();
/* Clear any previous selection */
Sel->ClearIObjects();
}
CORBA::Long anId = aStudy->StudyId();
TVisualObjPtr aVisualObj = SMESH::GetVisualObj(anId,IObject->getEntry());
+ cout<<"myAutomaticUpdate - "<<myAutomaticUpdate<<endl;
if(myAutomaticUpdate && aVisualObj){
aVisualObj->Update();
SMESH_Actor* anActor = SMESH::FindActorByEntry(IObject->getEntry());
void RemoveActor(QAD_StudyFrame *theStudyFrame, SMESH_Actor* theActor){
if(VTKViewer_ViewFrame* aViewFrame = GetVtkViewFrame(theStudyFrame)){
aViewFrame->RemoveActor(theActor);
+ if(theActor->hasIO()){
+ Handle(SALOME_InteractiveObject) anIO = theActor->getIO();
+ if(anIO->hasEntry()){
+ std::string anEntry = anIO->getEntry();
+ QAD_Study* aStudy = theStudyFrame->getStudy();
+ int aStudyId = aStudy->getStudyId();
+ TVisualObjCont::key_type aKey(aStudyId,anEntry);
+ VISUAL_OBJ_CONT.erase(aKey);
+ }
+ }
+ theActor->Delete();
aViewFrame->Repaint();
}
}
ASSERT( meshServant );
meshServant->SetShape( theShapeObject );
// publish mesh in the study
- if ( CanPublishInStudy( mesh ) )
+ if( CanPublishInStudy( mesh ) ){
+ SALOMEDS::StudyBuilder_var aStudyBuilder = myCurrentStudy->NewBuilder();
+ aStudyBuilder->NewCommand(); // There is a transaction
PublishMesh( myCurrentStudy, mesh.in() );
+ aStudyBuilder->CommitCommand();
+ }
return mesh._retn();
}
SMESH::SMESH_Mesh_var aMesh = createMesh();
string aFileName; // = boost::filesystem::path(theFileName).leaf();
// publish mesh in the study
- if ( CanPublishInStudy( aMesh ) )
+ if ( CanPublishInStudy( aMesh ) ){
+ SALOMEDS::StudyBuilder_var aStudyBuilder = myCurrentStudy->NewBuilder();
+ aStudyBuilder->NewCommand(); // There is a transaction
PublishMesh( myCurrentStudy, aMesh.in(), aFileName.c_str() );
+ aStudyBuilder->CommitCommand();
+ }
SMESH_Mesh_i* aServant = dynamic_cast<SMESH_Mesh_i*>( GetServant( aMesh ).in() );
ASSERT( aServant );
SMESH::mesh_array_var aResult = new SMESH::mesh_array();
theStatus = (SMESH::DriverMED_ReadStatus)aStatus;
if(theStatus == SMESH::DRS_OK){
+ SALOMEDS::StudyBuilder_var aStudyBuilder = myCurrentStudy->NewBuilder();
+ aStudyBuilder->NewCommand(); // There is a transaction
+
aResult->length( aNames.size() );
int i = 0;
-
+
// Iterate through all meshes and create mesh objects
for ( list<string>::iterator it = aNames.begin(); it != aNames.end(); it++ ) {
// create mesh
aResult[i++] = SMESH::SMESH_Mesh::_duplicate( mesh );
}
+ aStudyBuilder->CommitCommand();
}
return aResult._retn();
}
SMESH::SMESH_Mesh_var aMesh = createMesh();
string aFileName; // = boost::filesystem::path(theFileName).leaf();
// publish mesh in the study
- if ( CanPublishInStudy( aMesh ) )
+ if( CanPublishInStudy( aMesh ) ){
+ SALOMEDS::StudyBuilder_var aStudyBuilder = myCurrentStudy->NewBuilder();
+ aStudyBuilder->NewCommand(); // There is a transaction
PublishInStudy( myCurrentStudy, SALOMEDS::SObject::_nil(), aMesh.in(), aFileName.c_str() );
+ aStudyBuilder->CommitCommand();
+ }
SMESH_Mesh_i* aServant = dynamic_cast<SMESH_Mesh_i*>( GetServant( aMesh ).in() );
ASSERT( aServant );
CORBA::Long studyId )
: SALOME::GenericObj_i( thePOA )
{
- INFOS("SMESH_Mesh_i");
+ INFOS("SMESH_Mesh_i; this = "<<this);
+ _impl = NULL;
_gen_i = gen_i;
_id = myIdGenerator++;
_studyId = studyId;
SMESH_Mesh_i::~SMESH_Mesh_i()
{
- INFOS("~SMESH_Mesh_i");
+ INFOS("~SMESH_Mesh_i; this = "<<this);
map<int, SMESH::SMESH_GroupBase_ptr>::iterator it;
for ( it = _mapGroups.begin(); it != _mapGroups.end(); it++ ) {
SMESH_GroupBase_i* aGroup = dynamic_cast<SMESH_GroupBase_i*>( SMESH_Gen_i::GetServant( it->second ).in() );