Salome HOME
0021248: EDF SMESH: Dump and ExportToMED
authoreap <eap@opencascade.com>
Mon, 25 Apr 2011 13:19:22 +0000 (13:19 +0000)
committereap <eap@opencascade.com>
Mon, 25 Apr 2011 13:19:22 +0000 (13:19 +0000)
  dump SetAutoColor() and SetColor() in SMESH_Mesh_i and in
  SMESH_GroupBase_i correspondingly

src/SMESH_I/SMESH_DumpPython.cxx

index df860175d993afdbd6371ce28e4d01f592260f20..3875dc79650e62fa48504d38c3ce7a62555bb90a 100644 (file)
@@ -870,37 +870,6 @@ TCollection_AsciiString SMESH_Gen_i::DumpPython_impl
   if (aSeq->Value(aLen) < aScriptLength)
     anUpdatedScript += aScript.SubString(aSeq->Value(aLen) + 1, aScriptLength);
 
-  // Set colors
-  SALOMEDS::SObject_var aComp = theStudy->FindComponent(ComponentDataType());
-  if( !CORBA::is_nil(aComp) )
-  {
-    SALOMEDS::ChildIterator_var Itr = theStudy->NewChildIterator(aComp);
-    for( Itr->InitEx(true); Itr->More(); Itr->Next() )
-    {
-      SALOMEDS::SObject_var aSObj = Itr->Value();
-      SMESH::SMESH_Mesh_var aMesh = SMESH::SMESH_Mesh::_narrow( SObjectToObject( aSObj ) );
-      // mesh auto color
-      if( !CORBA::is_nil(aMesh) && aMesh->GetAutoColor() )
-      {
-        CORBA::String_var anEntry = aSObj->GetID();
-        anUpdatedScript +=
-          SMESH_Comment("\n\t") << theObjectNames(anEntry.inout()) << ".SetAutoColor(1)";
-      }
-      SMESH::SMESH_GroupBase_var aGroup = SMESH::SMESH_GroupBase::_narrow( SObjectToObject(aSObj));
-      if( !CORBA::is_nil(aGroup) )
-      {
-        SALOMEDS::Color aColor = aGroup->GetColor();
-        if ( aColor.R >= 0 || aColor.G >= 0 || aColor.B >= 0 )
-        {
-          CORBA::String_var anEntry = aSObj->GetID();
-          anUpdatedScript += SMESH_Comment("\n\t")
-            << theObjectNames(anEntry.inout()) << ".SetColor(SALOMEDS.Color("
-            << aColor.R <<", "<< aColor.G <<", "<< aColor.B <<" ))";
-        }
-      }
-    }
-  }
-
   // Remove removed objects
   if ( seqRemoved.Length() > 0 ) {
     anUpdatedScript += "\n\t## some objects were removed";