Dump python: use special static methods of SMESH_Gen_i.

This commit is contained in:
jfa 2005-03-29 09:16:40 +00:00
parent e769be649b
commit 17d6338a7e
7 changed files with 28 additions and 53 deletions

View File

@ -92,16 +92,11 @@ void StdMeshers_Arithmetic1D_i::SetLength(CORBA::Double theLength,
}
// 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);
}
//=============================================================================

View File

@ -92,14 +92,11 @@ void StdMeshers_Deflection1D_i::SetDeflection( CORBA::Double theValue )
}
// 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);
}
//=============================================================================

View File

@ -92,14 +92,11 @@ void StdMeshers_LocalLength_i::SetLength( CORBA::Double theLength )
}
// 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);
}
//=============================================================================

View File

@ -92,14 +92,11 @@ void StdMeshers_MaxElementArea_i::SetMaxElementArea( CORBA::Double theArea )
}
// 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);
}
//=============================================================================

View File

@ -92,14 +92,11 @@ void StdMeshers_MaxElementVolume_i::SetMaxElementVolume( CORBA::Double theVolume
}
// 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 += ")";
TCollection_AsciiString aStr, aStrVol ((double)theVolume);
SMESH_Gen_i::AddObject(aStr, _this()) += ".SetMaxElementVolume(";
aStr += aStrVol + ")";
aSMESHGen->AddToPythonScript(aSMESHGen->GetCurrentStudy()->StudyId(), aStr);
SMESH_Gen_i::AddToCurrentPyScript(aStr);
}
//=============================================================================

View File

@ -92,14 +92,11 @@ void StdMeshers_NumberOfSegments_i::SetNumberOfSegments( CORBA::Long theSegments
}
// 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 += ")";
TCollection_AsciiString aStr, aStrNb ((int)theSegmentsNumber);
SMESH_Gen_i::AddObject(aStr, _this()) += ".SetNumberOfSegments(";
aStr += aStrNb + ")";
aSMESHGen->AddToPythonScript(aSMESHGen->GetCurrentStudy()->StudyId(), aStr);
SMESH_Gen_i::AddToCurrentPyScript(aStr);
}
//=============================================================================

View File

@ -93,16 +93,11 @@ void StdMeshers_StartEndLength_i::SetLength(CORBA::Double theLength,
}
// 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);
}
//=============================================================================