Issue 0020544: EDF 1140 SMESH: Dumpstudy with FindEqualElments function not loadable

This commit is contained in:
vsr 2009-10-21 10:24:34 +00:00
parent af743e1123
commit 5d877b8464
2 changed files with 4 additions and 2 deletions

View File

@ -786,7 +786,7 @@ TCollection_AsciiString SMESH_Gen_i::DumpPython_impl
}
// 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 )
{
@ -821,7 +821,7 @@ TCollection_AsciiString SMESH_Gen_i::DumpPython_impl
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")

View File

@ -3326,6 +3326,8 @@ class Mesh:
# @return a list of groups of equal elements
# @ingroup l2_modif_trsf
def FindEqualElements (self, MeshOrSubMeshOrGroup):
if ( isinstance( MeshOrSubMeshOrGroup, Mesh )):
MeshOrSubMeshOrGroup = MeshOrSubMeshOrGroup.GetMesh()
return self.editor.FindEqualElements(MeshOrSubMeshOrGroup)
## Merges elements in each given group.