Salome HOME
0023505: Sigsegv with fuse on cylinder and cone
[modules/geom.git] / doc / salome / gui / GEOM / input / geompy_migration.doc
1 /*!
2
3 \page geompy_migration_page Modifying Geometry Python scripts from SALOME 6 and before
4
5 \n In SALOME 7.2, the Python interface for Geometry has been slightly modified to offer new functionality:
6
7 <ul>
8   <li>\subpage tui_execution_distribution_page</li>
9   <li>\subpage tui_auto_completion_documentation_page</li>
10 </ul>
11
12 \n Scripts generated for SALOME 6 and older versions must be adapted to work in SALOME 7.2 with full functionality.
13 \n The compatibility mode allows old scripts to work in almost all cases, but with a warning.
14
15 <b>Salome initialisation must always be done as shown below</b>
16 \n (<em>salome_init()</em> can be invoked safely several times):
17 \code
18 import salome
19 salome.salome_init()
20 \endcode
21
22 <b>Geometry initialisation is modified.</b>
23 \n the old mode:
24 \code
25 import geompy
26 geompy.init_geom(theStudy)
27 \endcode
28 \n the new mode:
29 \code
30 import GEOM
31 from salome.geom import geomBuilder
32 geompy = geomBuilder.New(salome.myStudy)
33 \endcode
34
35
36 <b> Of course, <em>from geompy import *</em> is no more possible.</b>
37 \n You have to explicitely write <em>geompy.some_method()</em>.
38
39 \n <b>Some variables have been transferred from the namespace <em>geompy.GEOM</em> to the namespace <em>GEOM</em>.</b>
40 \n All occurrences of <em>geompy.GEOM.</em> can be replaced by  <em>GEOM.</em>.
41 \n For instance:
42 \code
43 param_polyline = geompy.MakeCurveParametric("t", "sin(t)", "cos(t)", 0., 100., 100, geompy.GEOM.Polyline, theNewMethod=True)
44 \endcode
45 is replaced by:
46 \code
47 param_polyline = geompy.MakeCurveParametric("t", "sin(t)", "cos(t)", 0., 100., 100, GEOM.Polyline, theNewMethod=True)
48 \endcode
49
50
51 */