+
+ // Clear python lines, created by CreateGroup() and Add()
+ SALOMEDS::Study_ptr aStudy = _gen_i->GetCurrentStudy();
+ _gen_i->RemoveLastFromPythonScript(aStudy->StudyId());
+ _gen_i->RemoveLastFromPythonScript(aStudy->StudyId());
+
+ // Update Python script
+ TCollection_AsciiString aStr;
+ SMESH_Gen_i::AddObject(aStr, aResGrp) += " = ";
+ SMESH_Gen_i::AddObject(aStr, _this()) += ".IntersectGroups(";
+ SMESH_Gen_i::AddObject(aStr, theGroup1) += ", ";
+ SMESH_Gen_i::AddObject(aStr, theGroup2) += ", \"";
+ aStr += TCollection_AsciiString((char*)theName) + "\")";
+
+ SMESH_Gen_i::AddToCurrentPyScript(aStr);
+