1 ***************************
2 About SALOME PYLIGHT sample
3 ***************************
5 SALOME PYLIGHT module presents example of a simple SALOME module, implemented
6 with Python, without CORBA-engine; such type of module is called "light" in
9 This sample demonstrates a way to create a modules which have only GUI written
10 in Python but nevertheless can be integrated into SALOME platform.
12 This sample module is a simple text file reader. Each empty line read from the
13 file is presented in the data tree as the beginning of new paragraph; paragraph
14 can be empty. Non-empty line presents a "leaf" in the data tree.
16 Thus, the data tree hierarchy has tree levels:
29 For more information about SALOME platform please visit the SALOME web site:
31 <http://www.salome-platform.org/>
37 SALOME platform is distributed under the GNU Lesser General Public License.
38 See COPYING file for more details.
40 Also, additional information can be found at SALOME platform web site:
42 <http://www.salome-platform.org/downloads/license/>
52 SALOME platform relies on a set of third-party softwares; some of them are needed
53 at build time only, while other ones are needed in runtime also.
55 For more information about the pre-requisites please visit SALOME platform web
58 * Check Release Notes and Software Requirements of the latest SALOME release at
60 <http://www.salome-platform.org/downloads/current-version/>
62 * Pre-requisites page at SALOME web site:
64 <http://www.salome-platform.org/downloads/license/>
66 Note: SALOME PYLIGHT needs SALOME KERNEL and SALOME GUI as pre-requisites.
72 The build procedure of the SALOME platform is implemented with CMake.
73 In order to build the module you have to do the following actions:
75 1. Set up environment for pre-requisites (see "Pre-requisites" section above).
77 2. Create a build directory:
81 3. Configure the build procedure:
84 % cmake -DCMAKE_BUILD_TYPE=<mode> -DCMAKE_INSTALL_PREFIX=<installation_directory> <path_to_src_dir>
87 - <mode> is either Release or Debug (default: Release);
88 - <installation_directory> is a destination folder to install SALOME PYLIGHT
89 module (default: /usr);
90 - <path_to_src_dir> is a path to the SALOME PYLIGHT sources directory.
92 Note: by default (if CMAKE_INSTALL_PREFIX option is not given), SALOME PYLIGHT
93 module will be configured for installation to the /usr directory that requires
94 root permissions to complete the installation.
101 This will install SALOME PYLIGHT module to the <installation_directory>
102 specified to cmake command on the previous step.
108 SALOME PYLIGHT module supports a set of advanced configuration options;
109 for more details learn CMakeLists.txt file in the root source directory.
111 You can also use other options of cmake command to customize your installation.
112 Learn more about available options by typing
120 The functionality of the module is very similar to that one provided by
123 The module functionality includes the following user actions:
127 - "Load text file" : reads and loads the contents of text file to the
128 study; the previous contents of the data tree
131 - "Save text file" : dumps the contents of the data tree to the text
136 - "Insert Line" : inserts new text line entered by the user to the
137 end of selected paragraph.
139 - "Edit Line" : allows user to edit selected text line.
141 - "Remove Lines" : : removes selected line(s).
143 - "Clear All" : clears contents of the data tree.
145 - "Display Line" : displays selected line in the VTK 3D viewer.
147 - "Erase Line" : erases selected line from the VTK 3D viewer.
149 Most of these actions change the contents of the internal data model, so the data
150 tree is rebuilt correspondingly.
151 Some of these commands are also avaiable via the context popup menu in the Object
154 Saving/restoring of the data is performed by using of default SALOMEDS-based
155 persistence mechanism provided by SALOME GUI via embedded SalomeApp engine.
157 Note: after opening of the sudy file the PYLIGHT module data is not
158 immediately displayed in the Object Browser. To see it, you should activate the
159 module. Such behaviour takes place because the PYLIGHT module does not publish any
160 data directly in the SALOMEDS study - this is typical behavior of any "lighy"
161 SALOME module, imposed by limitation of SALOME platform.
167 Run SALOME with PYLIGHT module:
169 - In full, CORBA-based session:
171 runSalome --modules=PYLIGHT
173 - In "light" session:
175 runLightSalome.sh --modules=PYLIGHT
181 Please, send a mail to webmaster.salome@opencascade.com.