-// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
SMESH_Hypothesis_i* myHypothesis_i = 0;
SMESH::SMESH_Hypothesis_var hypothesis_i;
std::string aPlatformLibName;
- typedef GenericHypothesisCreator_i* (*GetHypothesisCreator)(const char* );
- GenericHypothesisCreator_i* aCreator = getHypothesisCreator(theHypName, theLibName, aPlatformLibName);
- // create a new hypothesis object, store its ref. in studyContext
- if(MYDEBUG) MESSAGE("Create Hypothesis " << theHypName);
- myHypothesis_i =
- myHypCreatorMap[string(theHypName)]->Create(myPoa, GetCurrentStudyID(), &myGen);
- myHypothesis_i->SetLibName(aPlatformLibName.c_str()); // for persistency assurance
-
- if (!myHypothesis_i)
- return hypothesis_i._retn();
-
- // activate the CORBA servant of hypothesis
- hypothesis_i = myHypothesis_i->_this();
- int nextId = RegisterObject( hypothesis_i );
- if(MYDEBUG) { MESSAGE( "Add hypo to map with id = "<< nextId ); }
- else { nextId = 0; } // avoid "unused variable" warning in release mode
+ GenericHypothesisCreator_i* aCreator =
+ getHypothesisCreator(theHypName, theLibName, aPlatformLibName);
+ // create a new hypothesis object, store its ref. in studyContext
+ myHypothesis_i = aCreator->Create(myPoa, GetCurrentStudyID(), &myGen);
+ if (myHypothesis_i)
+ {
+ myHypothesis_i->SetLibName( aPlatformLibName.c_str() ); // for persistency assurance
+ CORBA::String_var hypName = myHypothesis_i->GetName();
+ myHypCreatorMap[ hypName.in() ] = aCreator;
+
+ // activate the CORBA servant of hypothesis
+ hypothesis_i = myHypothesis_i->_this();
+ int nextId = RegisterObject( hypothesis_i );
+ if(MYDEBUG) { MESSAGE( "Add hypo to map with id = "<< nextId ); }
+ else { nextId = 0; } // avoid "unused variable" warning in release mode
+ }
return hypothesis_i._retn();
}
typedef map<int, int> TIDsMap;
typedef list<SMESH::SMESH_Group_var> TListOfNewGroups;
typedef map< pair<string, SMESH::ElementType>, TListOfNewGroups > TGroupsMap;
- typedef std::set<SMESHDS_GroupBase*> TGroups;
TPythonDump* pPythonDump = new TPythonDump;
TPythonDump& aPythonDump = *pPythonDump; // prevent dump of called methods
TGroupsMap aGroupsMap;
TListOfNewGroups aListOfNewGroups;
- SMESH_MeshEditor aNewEditor = ::SMESH_MeshEditor(&aLocMesh);
+ ::SMESH_MeshEditor aNewEditor(&aLocMesh);
SMESH::ListOfGroups_var aListOfGroups = new SMESH::ListOfGroups();
// loop on meshes
}
} //elems loop
+ aNewEditor.CrearLastCreated(); // forget the history
+
// copy orphan nodes
SMDS_NodeIteratorPtr itNodes = anInitMeshDS->nodesIterator();
while ( itNodes->more() )