oss << _objVar << " = " << _objStreamCalc << ";";
oss << _objVar << ".UpdatePipeline();";
pushAndExecPyLine(oss.str()); oss.str("");
- oss << _objVar << " = pvs.StreamTracer(Input=" << _objVar << ", SeedType='Point Cloud' if pvs.GetParaViewVersion().GetVersion() > 5.8 else 'Point Source');";
+ oss << _objVar << " = pvs.StreamTracer(Input=" << _objVar <<
+ ", SeedType='Point Cloud' if not medcalc.IsPlanarObj(" << _objVar <<
+ ") else 'Line');";
pushAndExecPyLine(oss.str()); oss.str("");
oss << _objVar << ".IntegrationDirection = '" << dirType << "';";
pushAndExecPyLine(oss.str()); oss.str("");
pushAndExecPyLine(oss.str());
}
MEDPresentation::scalarBarTitle();
-}
\ No newline at end of file
+}
def GetMEDFileDirTUI():
relativeDir = "@SALOME_FIELDS_INSTALL_RES_DATA@/tests/tui/medfiles"
return os.path.join(__getRootDir(), relativeDir)
+
+def GetMEDFileDirResources():
+ relativeDir = "@SALOME_FIELDS_INSTALL_RES_DATA@"
+ return os.path.join(__getRootDir(), relativeDir)
--- /dev/null
+# Copyright (C) 2016-2022 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
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# 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 accessField
+
+from medcalc_testutils import GetMEDFileDirTUI
+
+datafile = os.path.join(GetMEDFileDirTUI(), "agitateur.med")
+source_id = medcalc.LoadDataSource(datafile)
+
+# Field 55 = VITESSE_ELEM_DOM (ON_CELLS) at timestamp 0
+# Field 65 = VITESSE_ELEM_DOM (ON_CELLS) at timestamp 10
+presentation_id = medcalc.MakeStreamLines(accessField(65), viewMode=MEDCALC.VIEW_MODE_REPLACE,
+ colorMap=MEDCALC.COLOR_MAP_BLUE_TO_RED_RAINBOW,
+ scalarBarRange=MEDCALC.SCALAR_BAR_CURRENT_TIMESTEP
+ )
+sleep(1)
+medcalc.RemovePresentation(presentation_id)
+sleep(1)
--- /dev/null
+# Copyright (C) 2016-2022 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
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# 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 accessField
+
+from medcalc_testutils import GetMEDFileDirResources
+
+datafile = os.path.join(GetMEDFileDirResources(), "TimeStamps.med")
+source_id = medcalc.LoadDataSource(datafile)
+
+# Field 55 = VITESSE_ELEM_DOM (ON_CELLS) at timestamp 0
+# Field 65 = VITESSE_ELEM_DOM (ON_CELLS) at timestamp 10
+presentation_id = medcalc.MakeStreamLines(accessField(264), viewMode=MEDCALC.VIEW_MODE_REPLACE,
+ colorMap=MEDCALC.COLOR_MAP_BLUE_TO_RED_RAINBOW,
+ scalarBarRange=MEDCALC.SCALAR_BAR_CURRENT_TIMESTEP
+ )
+sleep(1)
+medcalc.RemovePresentation(presentation_id)
+sleep(1)
+
deflection_shape
elno_field
interpolate_field_float
+ streamlines
+ streamlines_2d
)