// Export calculation case
aResList << QString( "" );
aResList << "# Export of the calculation case";
- QString aStudyName = "theStudy";
QString anEntryVar = aCalculName + "_entry";
- aResList << QString( "%1 = %2.Export( %3._get_StudyId() )" ).arg( anEntryVar ).arg( aCalculName ).arg( aStudyName );
+ aResList << QString( "%1 = %2.Export()" ).arg( anEntryVar ).arg( aCalculName );
// Get geometry object and print debug information
aResList << "";
aResList << "# Get geometry shape and print debug information";
aResList << "import GEOM";
- aResList << QString( "print \"Entry:\", %1" ).arg( anEntryVar );
+ aResList << QString( "print (\"Entry:\", %1)" ).arg( anEntryVar );
QString aGeomShapeName = aCalculName + "_geom";
aResList << QString( "HYDRO_%1 = salome.IDToObject( str( %2 ) )" ).arg( GetName() ).arg( anEntryVar );
- aResList << QString( "print \"Geom shape:\", HYDRO_%1" ).arg( GetName() );
- aResList << QString( "print \"Geom shape name:\", HYDRO_%1.GetName()" ).arg( GetName() );
+ aResList << QString( "print (\"Geom shape:\", HYDRO_%1)" ).arg( GetName() );
+ aResList << QString( "print (\"Geom shape name:\", HYDRO_%1.GetName())" ).arg( GetName() );
- //DumpSampleMeshing( aResList, aStudyName, aGeomShapeName, aCalculName+"_mesh" );
+ //DumpSampleMeshing( aResList, aGeomShapeName, aCalculName+"_mesh" );
aResList << QString( "" );
return aResList;
}
void HYDROData_CalculationCase::DumpSampleMeshing( QStringList& theResList,
- const QString& theStudyName,
const QString& theGeomShapeName,
const QString& theMeshName ) const
{
theResList << "from salome.smesh import smeshBuilder";
theResList << "from salome.geom import geomBuilder";
- theResList << QString( "smesh = smeshBuilder.New( %1 )" ).arg( theStudyName );
+ theResList << QString( "smesh = smeshBuilder.New()" );
theResList << QString( "%1 = smesh.Mesh( %2 )" ).arg( theMeshName ).arg( theGeomShapeName );
theResList << QString( "MEFISTO_2D = %1.Triangle( algo=smeshBuilder.MEFISTO )" ).arg( theMeshName );
theResList << "Max_Element_Area_1 = MEFISTO_2D.MaxElementArea( 10 )";
theResList << "";
theResList << "# Greate SMESH groups";
- theResList << QString( "geompy = geomBuilder.New( %1 )" ).arg( theStudyName );
+ theResList << QString( "geompy = geomBuilder.New()" );
theResList << QString( "geom_groups = geompy.GetGroups( %1 )" ).arg( theGeomShapeName );
theResList << QString( "for group in geom_groups:" );
theResList << QString( " smesh_group = %1.GroupOnGeom(group, group.GetName(), SMESH.EDGE)" )
.arg( theMeshName );
theResList << QString( " smesh.SetName(smesh_group, group.GetName())" );
- theResList << QString( " print \"SMESH group '%s': %s\" % (smesh_group.GetName(), smesh_group)" );
+ theResList << QString( " print (\"SMESH group '%s': %s)\" % (smesh_group.GetName(), smesh_group)" );
}
HYDROData_SequenceOfObjects HYDROData_CalculationCase::GetAllReferenceObjects() const