Salome HOME
Issue 0020544: EDF 1140 SMESH: Dumpstudy with FindEqualElments function not loadable
authorvsr <vsr@opencascade.com>
Wed, 21 Oct 2009 10:24:34 +0000 (10:24 +0000)
committervsr <vsr@opencascade.com>
Wed, 21 Oct 2009 10:24:34 +0000 (10:24 +0000)
src/SMESH_I/SMESH_DumpPython.cxx
src/SMESH_SWIG/smeshDC.py

index e940862ad90e053d0e26752ad542ee277d840e05..711408f240c158e4ebab1f0d205958dc94fe95b6 100644 (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")
index 0bc7468e1a2cc078095dcff24e29e9dd742b32fd..a8e445a8900ec101556de50d13403bb93e132f60 100644 (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.