From: vsr Date: Wed, 21 Oct 2009 10:24:34 +0000 (+0000) Subject: Issue 0020544: EDF 1140 SMESH: Dumpstudy with FindEqualElments function not loadable X-Git-Tag: RELIQUAT_5x_30102009~18 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5d877b84646ca57daf1a02194eb2ac17a67c722b;p=modules%2Fsmesh.git Issue 0020544: EDF 1140 SMESH: Dumpstudy with FindEqualElments function not loadable --- diff --git a/src/SMESH_I/SMESH_DumpPython.cxx b/src/SMESH_I/SMESH_DumpPython.cxx index e940862ad..711408f24 100644 --- a/src/SMESH_I/SMESH_DumpPython.cxx +++ b/src/SMESH_I/SMESH_DumpPython.cxx @@ -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") diff --git a/src/SMESH_SWIG/smeshDC.py b/src/SMESH_SWIG/smeshDC.py index 0bc7468e1..a8e445a89 100644 --- a/src/SMESH_SWIG/smeshDC.py +++ b/src/SMESH_SWIG/smeshDC.py @@ -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.