}
// Update Python script
- SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
- SALOMEDS::SObject_var aSO = SMESH_Gen_i::ObjectToSObject(aSMESHGen->GetCurrentStudy(), _this());
- TCollection_AsciiString aStr (aSO->GetID());
- aStr += ".SetLength(";
- aStr += TCollection_AsciiString((double)theLength);
- aStr += ", ";
- aStr += TCollection_AsciiString((int)theIsStart);
- aStr += ")";
-
- aSMESHGen->AddToPythonScript(aSMESHGen->GetCurrentStudy()->StudyId(), aStr);
+ TCollection_AsciiString aStr, aStrLen ((double)theLength), aStrFlag ((int)theIsStart);
+ SMESH_Gen_i::AddObject(aStr, _this()) += ".SetLength(";
+ aStr += aStrLen + ", " + aStrFlag + ")";
+
+ SMESH_Gen_i::AddToCurrentPyScript(aStr);
}
//=============================================================================
}
// Update Python script
- SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
- SALOMEDS::SObject_var aSO = SMESH_Gen_i::ObjectToSObject(aSMESHGen->GetCurrentStudy(), _this());
- TCollection_AsciiString aStr (aSO->GetID());
- aStr += ".SetDeflection(";
- aStr += TCollection_AsciiString((double)theValue);
- aStr += ")";
+ TCollection_AsciiString aStr, aStrVal ((double)theValue);
+ SMESH_Gen_i::AddObject(aStr, _this()) += ".SetDeflection(";
+ aStr += aStrVal + ")";
- aSMESHGen->AddToPythonScript(aSMESHGen->GetCurrentStudy()->StudyId(), aStr);
+ SMESH_Gen_i::AddToCurrentPyScript(aStr);
}
//=============================================================================
}
// Update Python script
- SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
- SALOMEDS::SObject_var aSO = SMESH_Gen_i::ObjectToSObject(aSMESHGen->GetCurrentStudy(), _this());
- TCollection_AsciiString aStr (aSO->GetID());
- aStr += ".SetLength(";
- aStr += TCollection_AsciiString((double)theLength);
- aStr += ")";
+ TCollection_AsciiString aStr, aStrLen ((double)theLength);
+ SMESH_Gen_i::AddObject(aStr, _this()) += ".SetLength(";
+ aStr += aStrLen + ")";
- aSMESHGen->AddToPythonScript(aSMESHGen->GetCurrentStudy()->StudyId(), aStr);
+ SMESH_Gen_i::AddToCurrentPyScript(aStr);
}
//=============================================================================
}
// Update Python script
- SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
- SALOMEDS::SObject_var aSO = SMESH_Gen_i::ObjectToSObject(aSMESHGen->GetCurrentStudy(), _this());
- TCollection_AsciiString aStr (aSO->GetID());
- aStr += ".SetMaxElementArea(";
- aStr += TCollection_AsciiString((double)theArea);
- aStr += ")";
+ TCollection_AsciiString aStr, aStrArea ((double)theArea);
+ SMESH_Gen_i::AddObject(aStr, _this()) += ".SetMaxElementArea(";
+ aStr += aStrArea + ")";
- aSMESHGen->AddToPythonScript(aSMESHGen->GetCurrentStudy()->StudyId(), aStr);
+ SMESH_Gen_i::AddToCurrentPyScript(aStr);
}
//=============================================================================
}
// Update Python script
- SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
- SALOMEDS::SObject_var aSO = SMESH_Gen_i::ObjectToSObject(aSMESHGen->GetCurrentStudy(), _this());
- TCollection_AsciiString aStr (aSO->GetID());
- aStr += ".SetMaxElementVolume(";
- aStr += TCollection_AsciiString((double)theVolume);
- aStr += ")";
-
- aSMESHGen->AddToPythonScript(aSMESHGen->GetCurrentStudy()->StudyId(), aStr);
+ TCollection_AsciiString aStr, aStrVol ((double)theVolume);
+ SMESH_Gen_i::AddObject(aStr, _this()) += ".SetMaxElementVolume(";
+ aStr += aStrVol + ")";
+
+ SMESH_Gen_i::AddToCurrentPyScript(aStr);
}
//=============================================================================
}
// Update Python script
- SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
- SALOMEDS::SObject_var aSO = SMESH_Gen_i::ObjectToSObject(aSMESHGen->GetCurrentStudy(), _this());
- TCollection_AsciiString aStr (aSO->GetID());
- aStr += ".SetNumberOfSegments(";
- aStr += TCollection_AsciiString((int)theSegmentsNumber);
- aStr += ")";
-
- aSMESHGen->AddToPythonScript(aSMESHGen->GetCurrentStudy()->StudyId(), aStr);
+ TCollection_AsciiString aStr, aStrNb ((int)theSegmentsNumber);
+ SMESH_Gen_i::AddObject(aStr, _this()) += ".SetNumberOfSegments(";
+ aStr += aStrNb + ")";
+
+ SMESH_Gen_i::AddToCurrentPyScript(aStr);
}
//=============================================================================
}
// Update Python script
- SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
- SALOMEDS::SObject_var aSO = SMESH_Gen_i::ObjectToSObject(aSMESHGen->GetCurrentStudy(), _this());
- TCollection_AsciiString aStr (aSO->GetID());
- aStr += ".SetLength(";
- aStr += TCollection_AsciiString((double)theLength);
- aStr += ", ";
- aStr += TCollection_AsciiString((int)theIsStart);
- aStr += ")";
+ TCollection_AsciiString aStr, aStrLen ((double)theLength), aStrFlag ((int)theIsStart);
+ SMESH_Gen_i::AddObject(aStr, _this()) += ".SetLength(";
+ aStr += aStrLen + ", " + aStrFlag + ")";
- aSMESHGen->AddToPythonScript(aSMESHGen->GetCurrentStudy()->StudyId(), aStr);
+ SMESH_Gen_i::AddToCurrentPyScript(aStr);
}
//=============================================================================