theResList << "# Meshing";
theResList << "import SMESH, SALOMEDS";
theResList << "from salome.smesh import smeshBuilder";
+ theResList << "from salome.geom import geomBuilder";
theResList << QString( "smesh = smeshBuilder.New( %1 )" ).arg( theStudyName );
theResList << QString( "%1 = smesh.Mesh( %2 )" ).arg( theMeshName ).arg( theGeomShapeName );
theResList << "smesh.SetName( Max_Size_1, 'Max Size_1' )";
theResList << "smesh.SetName( Max_Element_Area_1, 'Max. Element Area_1' )";
theResList << QString( "smesh.SetName( %1.GetMesh(), '%1' )" ).arg( theMeshName );
+
+ theResList << "";
+ theResList << "# Greate SMESH groups";
+ theResList << QString( "geompy = geomBuilder.New( %1 )" ).arg( theStudyName );
+ 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)" );
}
HYDROData_SequenceOfObjects HYDROData_CalculationCase::GetAllReferenceObjects() const