Salome HOME
updated copyright message
[modules/med.git] / src / MEDCalc / test / tui / scalar_map.py
index 54541ad23f3d8faea5432135c74b2e884992e4ce..bc373026721022b6fe707e397463deb2760e4d27 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2016  CEA/DEN, EDF R&D
+# Copyright (C) 2016-2023  CEA, EDF
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
+import os
+from time import sleep
+
 import medcalc
 medcalc.medconsole.setConsoleGlobals(globals())
 import MEDCALC
-
-from medcalc.medconsole import saveWorkspace, cleanWorkspace
-from medcalc.medconsole import putInWorkspace, removeFromWorkspace
 from medcalc.medconsole import accessField
-from medcalc.medconsole import getEnvironment, ls, la
-
-import os
 
 from medcalc_testutils import GetMEDFileDirTUI
 
 datafile = os.path.join(GetMEDFileDirTUI(), "smooth_surface_and_field.med")
 source_id = medcalc.LoadDataSource(datafile)
 
-presentation_id = medcalc.MakeScalarMap(accessField(source_id), MEDCALC.VIEW_MODE_REPLACE, colorMap=MEDCALC.COLOR_MAP_BLUE_TO_RED_RAINBOW)
-
+presentation_id = medcalc.MakeScalarMap(accessField(0), MEDCALC.VIEW_MODE_REPLACE, colorMap=MEDCALC.COLOR_MAP_BLUE_TO_RED_RAINBOW)
+sleep(1)
 medcalc.RemovePresentation(presentation_id)
+sleep(1)