TCollection_AsciiString aCollection(Standard_CString(aString.c_str()));
SALOMEDS::Study_ptr aStudy = aSMESHGen->GetCurrentStudy();
if(!aStudy->_is_nil() && !aCollection.IsEmpty()){
- aSMESHGen->AddToPythonScript(aStudy->StudyId(),aCollection);
- if(MYDEBUG) MESSAGE(aString);
+ aSMESHGen->AddToPythonScript(aStudy->StudyId(),aCollection);
+ if(MYDEBUG) MESSAGE(aString);
}
}
}
operator<<(CORBA::Object_ptr theArg)
{
SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
- SALOMEDS::Study_ptr aStudy = aSMESHGen->GetCurrentStudy();
+ SALOMEDS::Study_var aStudy = aSMESHGen->GetCurrentStudy();
SALOMEDS::SObject_var aSObject = SMESH_Gen_i::ObjectToSObject(aStudy,theArg);
if(!aSObject->_is_nil()) {
- myStream << aSObject->GetID();
+ CORBA::String_var id = aSObject->GetID();
+ myStream << id;
} else if ( !CORBA::is_nil(theArg)) {
if ( aSMESHGen->CanPublishInStudy( theArg )) // not published SMESH object
myStream << "smeshObj_" << size_t(theArg);
// Add trace of API methods calls and replace study entries by names
TCollection_AsciiString aScript =
+ "# -*- coding: iso-8859-1 -*-\n"
"### This file is generated by SALOME automatically by dump python functionality of SMESH component\n\n";
aScript += DumpPython_impl(aStudy, aMap, aMapNames,
isPublished, isValidScript, aSavedTrace);
isFound = Standard_False;
while((j < aLen) && ( isdigit(c) || c == ':' )) { //Check if it is an entry
- c = (int)arr[j++];
- if(c == ':') isFound = Standard_True;
+ c = (int)arr[j++];
+ if(c == ':') isFound = Standard_True;
}
if (isFound) {
}
// set initial part of aSript
- TCollection_AsciiString initPart = "import salome, SMESH\n";
+ TCollection_AsciiString initPart = "import salome, SMESH, SALOMEDS\n";
initPart += helper + "import " + aSmeshpy + "\n\n";
if ( importGeom )
{
if( !CORBA::is_nil(aGroup) )
{
SALOMEDS::Color aColor = aGroup->GetColor();
- if ( aColor.R > 0 || aColor.G > 0 || aColor.B > 0 )
+ if ( aColor.R >= 0 || aColor.G >= 0 || aColor.B >= 0 )
{
CORBA::String_var anEntry = aSObj->GetID();
anUpdatedScript += SMESH_Comment("\n\t")