示例#1
0
文件: elno_field.py 项目: luzpaz/med
# 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 : [email protected]
#

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(), "portico_elno.med")
source_id = medcalc.LoadDataSource(datafile)

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)
示例#2
0
# 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 : [email protected]
#

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(), "deplacements.med")
#datafile = os.path.join(GetMEDFileDirTUI(), "/home/ab205030/beton_arme_30_officiel.med")
source_id = medcalc.LoadDataSource(datafile)

# For "beton_arme_30_officiel.med", field 7 = __DEPL__ (NODES)
# For "deplacements", field 0 = DEP1 (NODES)
presentation_id = medcalc.MakeDeflectionShape(
    accessField(0),
    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)
示例#3
0
#
# See http://www.salome-platform.org/ or email : [email protected]
#

import os
from time import sleep

import medcalc
medcalc.medconsole.setConsoleGlobals(globals())
import MEDCALC
from medcalc.medconsole import accessField

from medcalc_testutils import GetMEDFileDirTUI

if 1:
    datafile = os.path.join(GetMEDFileDirTUI(), "smooth_surface_and_field.med")
    source_id = medcalc.LoadDataSource(datafile)
    presentation_id = medcalc.MakePointSprite(
        accessField(0),
        MEDCALC.VIEW_MODE_REPLACE,
        colorMap=MEDCALC.COLOR_MAP_BLUE_TO_RED_RAINBOW)
else:
    datafile = os.path.join(GetMEDFileDirTUI(), "agitateur.med")
    source_id = medcalc.LoadDataSource(datafile)
    presentation_id = medcalc.MakePointSprite(
        accessField(55),
        MEDCALC.VIEW_MODE_REPLACE,
        colorMap=MEDCALC.COLOR_MAP_BLUE_TO_RED_RAINBOW)

sleep(1)
medcalc.RemovePresentation(presentation_id)
示例#4
0
# 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 : [email protected]
#

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.MakeVectorField(
    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)