Salome HOME
update MEDCalc APIs
[modules/med.git] / src / MEDCalc / cmp / MEDPresentation.cxx
index 46ec07145585a4620d58a1214a1dba77ed0e7164..5ce06a7071e86428e250262fc9e81bf9838cea55 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2011-2015  CEA/DEN, EDF R&D
+// Copyright (C) 2011-2016  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -89,48 +89,3 @@ std::string MEDPresentation::getFieldTypeString()
       return "";
   }
 }
-
-
-void MEDPresentationScalarMap::internalGeneratePipeline()
-{
-  MEDCALC::MEDDataManager_ptr dataManager(MEDFactoryClient::getDataManager());
-
-  MEDCALC::MeshHandler* meshHandler = dataManager->getMesh(_fieldHandler->meshid);
-  MEDCALC::DatasourceHandler* dataSHandler = dataManager->getDatasourceHandlerFromID(meshHandler->sourceid);
-
-  std::string fileName(dataSHandler->uri);
-  std::string fieldName(_fieldHandler->fieldname);
-  std::string fieldType = getFieldTypeString();
-
-  std::cout << "Generating pipeline for SCALAR MAP:" <<std::endl;
-  std::cout << "\tfileName: " <<  fileName << std::endl;
-  std::cout << "\tfiedName: " << fieldName << std::endl;
-  if (fileName.substr(0, 7) != std::string("file://"))
-    {
-      std::cerr << "\tData source is not a file! Can not proceed." << std::endl;
-      return;
-    }
-
-  fileName = fileName.substr(7, fileName.size());
-  std::cout << "\tfileName: " <<  fileName << std::endl;
-
-  PyGILState_STATE _gil_state = PyGILState_Ensure();
-
-  PyRun_SimpleString("print 'hello world'");
-  std::string cmd = std::string(
-        "import pvsimple as pvs;"
-        "__obj1 = pvs.MEDReader(FileName='") + fileName + std::string("');"
-        "__disp1 = pvs.Show(__obj1);"
-        "pvs.ColorBy(__disp1, ('") + fieldType + std::string("', '") + fieldName + std::string("'));"
-        "pvs.GetActiveViewOrCreate('RenderView').ResetCamera()");
-
-  std::cerr << "Python command:" << std::endl;
-  std::cerr << cmd << std::endl;
-  PyRun_SimpleString(cmd.c_str());
-  // Retrieve Python object for internal storage:
-  PyObject * obj = getPythonObjectFromMain("__obj1");
-  PyObject * disp = getPythonObjectFromMain("__disp1");
-  pushInternal(obj, disp);
-
-  PyGILState_Release(_gil_state);
-}
\ No newline at end of file