1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
4 <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=utf-8">
6 <META NAME="GENERATOR" CONTENT="OpenOffice.org 2.2 (Linux)">
7 <META NAME="CREATED" CONTENT="20100112;19261000">
8 <META NAME="CHANGED" CONTENT="20100129;12431800">
10 <BODY LANG="en-US" DIR="LTR">
11 <P ALIGN=CENTER><FONT SIZE=6><B>PARAVIS development</B></FONT></P>
12 <P ALIGN=CENTER><FONT SIZE=6><B>PARAVIS user documentation</B></FONT></P>
13 <P STYLE="page-break-before: always"><A HREF="#1.Introduction|outline"><FONT SIZE=4 STYLE="font-size: 15pt"><SPAN LANG="fr-FR"><B>1.Introduction</B></SPAN></FONT></A></P>
14 <P><A HREF="#2.Building environment|outline"><FONT SIZE=4 STYLE="font-size: 15pt"><SPAN LANG="fr-FR"><B>2.Building
15 environment</B></SPAN></FONT></A></P>
16 <P><A HREF="#3.VTK library|outline"><FONT SIZE=4 STYLE="font-size: 15pt"><SPAN LANG="fr-FR"><B>3.VTK
17 library</B></SPAN></FONT></A></P>
18 <P><A HREF="#4.Building of PARAVIS|outline"><FONT SIZE=4 STYLE="font-size: 15pt"><SPAN LANG="fr-FR"><B>4.Building
19 of PARAVIS</B></SPAN></FONT></A></P>
20 <P><A HREF="#5.Starting SALOME with PARAVIS|outline"><FONT SIZE=4 STYLE="font-size: 15pt"><SPAN LANG="fr-FR"><B>5.Starting
21 SALOME with PARAVIS</B></SPAN></FONT></A></P>
22 <P><A HREF="#6.Commands accessible in Python console|outline"><FONT SIZE=4 STYLE="font-size: 15pt"><SPAN LANG="fr-FR"><B>6.Commands
23 accessible in Python console</B></SPAN></FONT></A></P>
24 <P><A HREF="#7.Trace management|outline"><FONT SIZE=4 STYLE="font-size: 15pt"><SPAN LANG="fr-FR"><B>7.Trace
25 management</B></SPAN></FONT></A></P>
26 <P><A HREF="#8.PARAVIS GUI specific|outline"><FONT SIZE=4 STYLE="font-size: 15pt"><SPAN LANG="fr-FR"><B>8.PARAVIS
27 GUI specific</B></SPAN></FONT></A></P>
28 <H1><A NAME="1.Introduction|outline"></A>Introduction</H1>
29 <P STYLE="margin-bottom: 0in">This document describes features of
30 ParaView Python extractor using in PARAVIS module of SALOME platform.
31 In general building of PARAVIEW module is not too much differ from
32 usual process of any other SALOME module building, and result Python
33 API extracted for using in SALOME Python console is similar to the
34 server manager API of ParaView. But there are some features what is
35 desirable to understand for effective using of extractor.</P>
36 <H1><A NAME="2.Building environment|outline"></A>Building environment</H1>
37 <P STYLE="margin-bottom: 0in; page-break-inside: auto">In addition to
38 standard SALOME environment following environment variables has to be
39 defined for PARAVIS building and testing:</P>
41 <LI><P STYLE="margin-bottom: 0in; page-break-inside: auto">PVHOME –
42 points to installation directory of ParaView.</P>
43 <LI><P STYLE="margin-bottom: 0in; page-break-inside: auto">PVVERSION
44 – defines a number of installed ParaView version.</P>
45 <LI><P STYLE="margin-bottom: 0in; page-break-inside: auto">PATH="${PVHOME}/bin:${PATH}"</P>
46 <LI><P STYLE="margin-bottom: 0in; page-break-inside: auto">LD_LIBRARY_PATH=”${PVHOME}/bin:${PVHOME}/lib/paraview-${PVVERSION}:${LD_LIBRARY_PATH}"</P>
47 <LI><P STYLE="margin-bottom: 0in; page-break-inside: auto">PYTHONPATH="${PVHOME}/bin:${PVHOME}/lib/paraview-${PVVERSION}:${PYTHONPATH}"</P>
48 <LI><P STYLE="margin-bottom: 0in; page-break-inside: auto">TESTDIR –
49 points to a directory which contains test script files. Usually it
50 is PARAVIS_SRC/test.</P>
51 <LI><P STYLE="margin-bottom: 0in; page-break-inside: auto">PVDATA –
52 points to ParaViewData directory.</P>
54 <P STYLE="margin-bottom: 0in; page-break-inside: auto">Also it is
55 necessary to check that PARAVIS_SRC directory contains following
56 files and they are up-to-date:</P>
58 <LI><P STYLE="margin-bottom: 0in; page-break-inside: auto">src/Paraview/lex.yy.c</P>
59 <LI><P STYLE="margin-bottom: 0in; page-break-inside: auto">src/Paraview/vtkParse.tab.c</P>
60 <LI><P STYLE="margin-bottom: 0in; page-break-inside: auto">src/Paraview/vtkParse.h</P>
62 <H1><A NAME="3.VTK library|outline"></A>VTK library</H1>
63 <P STYLE="margin-bottom: 0in; page-break-inside: auto">SALOME already
64 uses VTK library for visualization and post-processing purposes.
65 PARAVIS also uses VTK library supplied with ParaView. In order to
66 avoid problem with using of different versions of VTK library in
67 different components of SALOME platform it is necessary to use the
68 same version supplied with ParaView for all components and modules of
71 <P STYLE="margin-bottom: 0in; page-break-inside: auto">For this
72 purposes a new option “--with-paraview” has been defined for
73 configure script. This option configures building procedure to use
74 VTK from ParaView. It means that GUI package and all modules has to
75 be configured with this option.</P>
76 <H1><A NAME="4.Building of PARAVIS|outline"></A>Building of PARAVIS</H1>
77 <P STYLE="margin-bottom: 0in; page-break-inside: auto"><BR>
80 <LI><P ALIGN=JUSTIFY STYLE="margin-bottom: 0.08in; page-break-inside: auto; widows: 2; orphans: 2">
81 Call <FONT COLOR="#000000"><FONT FACE="Arial, sans-serif"><FONT SIZE=2><SPAN LANG="en-US"><B>build_</B></SPAN></FONT></FONT></FONT><B>configure</B>
82 script in sources directory:
84 <P ALIGN=JUSTIFY STYLE="margin-bottom: 0.08in; page-break-inside: auto; widows: 2; orphans: 2">
85 <I><FONT COLOR="#000000"><FONT FACE="Arial, sans-serif"><FONT SIZE=2><SPAN LANG="en-US">>
86 </SPAN></FONT></FONT></FONT>build configure</I></P>
87 <LI><P>Launch <B>configure</B> script from a build directory.
89 <P><I>> ../PARAVIS_SRC/configure --prefix=$PARAVIS_ROOT_DIR</I></P>
90 <LI><P>Call <B>make</B> command in build directory.
92 <P><I>> make</I></P>
93 <LI><P ALIGN=JUSTIFY STYLE="margin-bottom: 0.08in; page-break-inside: auto; widows: 2; orphans: 2">
94 <FONT COLOR="#000000"><FONT FACE="Arial, sans-serif"><FONT SIZE=2><SPAN LANG="en-US"><B>Call
95 </B></SPAN></FONT></FONT></FONT><B>make install</B> <SPAN STYLE="font-weight: medium">command
96 in build directory. </SPAN>
98 <P ALIGN=JUSTIFY STYLE="margin-bottom: 0.08in; page-break-inside: auto; widows: 2; orphans: 2">
99 <I><SPAN STYLE="font-weight: medium">> </SPAN><FONT COLOR="#000000"><FONT FACE="Arial, sans-serif"><FONT SIZE=2><SPAN LANG="en-US"><SPAN STYLE="font-weight: medium">make
100 </SPAN></SPAN></FONT></FONT></FONT><SPAN STYLE="font-weight: medium">install</SPAN></I></P>
102 <H1 ALIGN=LEFT STYLE="margin-top: 0.42in; margin-bottom: 0.08in; page-break-inside: avoid; widows: 2; orphans: 2; page-break-after: avoid"><A NAME="5.Starting SALOME with PARAVIS|outline"></A>
103 <FONT COLOR="#000000"><FONT FACE="Arial, sans-serif"><FONT SIZE=4 STYLE="font-size: 16pt"><B>Starting
104 SALOME with PARAVIS</B></FONT></FONT></FONT></H1>
105 <P>> runSalome –modules="PARAVIS"</P>
106 <P>If it is necessary then other SALOME modules can be added to
107 “modules” list separated by comma.</P>
108 <H1><A NAME="6.Commands accessible in Python console|outline"></A>Commands
109 accessible in Python console</H1>
110 <P>Loading ParaView Python API for PARAVIS can be done with help of
112 <P><I>> from pvsimple import *</I></P>
113 <P>This command makes accessible the same Python API what provided by
114 simple.py module in ParaView (see ParaView documentation).
116 <H1><A NAME="7.Trace management|outline"></A>Trace management</H1>
117 <P>Last version of ParaView is supplied with trace functionality.
118 PARAVIS also supports this feature. But in contrary to ParaView,
119 which can start/stop trace in any moment, in PARAVIS trace is
120 activating or deactivating for whole session.</P>
121 <P>Trace functionality can be switched on/off in SALOME preferences
122 dialog box in PARAVIS tab (main menu | Preferences...). It contains
123 check box “Deactivate Trace”. By default the trace is activated.
124 Change of check box state makes effect only for next session.</P>
125 <P>User can get the trace with help of two commands (after pvsimple
128 <LI><P>PrintTrace() - prints the trace content directly into Python
130 <LI><P>SaveTrace(fileName) - saves the trace into a given disk file.</P>
132 <P>Also trace is using for “Dump Study” functionality. But if the
133 tracing is switched off then “Dump Study” doesn't saves PARAVIS
135 <H1>SALOME study save</H1>
136 <P>On SALOME study saving PARAVIS module data is also saved in the
137 study. This data is saved in form of ParaView state file. ParaView
138 state file could have references on external files imported during
139 PARAVIS working session. These referenced files can be saved with the
140 current study depending on preference “Paraview state saving type”
141 defined in PARAVIS preferences dialog box. This preference can have
142 three possible state:</P>
144 <LI><P>“Save referenced files only for built-in server”. In case
145 if this option is active then referenced files will be saved in
146 study together with ParaView state only if in PARAVIS was used
147 built-in ParaView server. In case of remote ParaView server the
148 state will be saved as it is without referenced files.</P>
149 <LI><P>“Always save referenced files if they are accessible”. In
150 this case referenced files will be saved with ParaView state for any
151 type of ParaView server but only in case if they are accessible
152 across local file system.</P>
153 <LI><P>“Never save referenced files”. In this case referenced
154 files will be never saved with ParaView state.</P>
156 <P>It is necessary to be aware that if referenced files are not saved
157 in study then there is no guarantee that the saved study will be
158 opened correctly on other station or if the referenced files will be
159 moved or deleted.</P>
160 <H1><A NAME="8.PARAVIS GUI specific|outline"></A>PARAVIS GUI specific</H1>
161 <P STYLE="margin-bottom: 0in; page-break-inside: auto">In fact
162 PARAVIS is a ParaView GUI integrated into SALOME environment. General
163 architecture of ParaView is very different from general architecture
164 of SALOME. If SALOME is an application which is able to open several
165 documents (studies) within one application session because it has
166 multi-document architecture, then ParaView has a single document
167 architecture what means that it can have only one document (data
168 structure) opened within one session.</P>
169 <P STYLE="margin-bottom: 0in; page-break-inside: auto">This leads to
170 the fact that PARAVIS module can be opened only once within SALOME
171 application session. It can be opened only in a first desktop
172 appeared after SALOME launch. Other desktops, even they opened with
173 study containing PARAVIS data, can not load PARAVIS module.</P>
174 <P ALIGN=LEFT><BR><BR>