2013-04-11 21:16:14 +06:00
|
|
|
/*!
|
|
|
|
|
2013-04-16 20:03:21 +06:00
|
|
|
\page geompy_migration_page Modifying Geometry Python scripts from SALOME 6 and before
|
2013-04-11 21:16:14 +06:00
|
|
|
|
2013-04-17 21:23:36 +06:00
|
|
|
\n In SALOME 7.2, the Python interface for Geometry has been slightly modified to offer new functionality:
|
2013-04-11 21:16:14 +06:00
|
|
|
|
|
|
|
<ul>
|
|
|
|
<li>\subpage tui_execution_distribution_page</li>
|
|
|
|
<li>\subpage tui_auto_completion_documentation_page</li>
|
|
|
|
</ul>
|
|
|
|
|
2013-04-17 21:23:36 +06:00
|
|
|
\n Scripts generated for SALOME 6 and older versions must be adapted to work in SALOME 7.2 with full functionality.
|
|
|
|
\n The compatibility mode allows old scripts to work in almost all cases, but with a warning.
|
2013-04-11 21:16:14 +06:00
|
|
|
|
|
|
|
<b>Salome initialisation must always be done as shown below</b>
|
|
|
|
\n (<em>salome_init()</em> can be invoked safely several times):
|
|
|
|
\code
|
|
|
|
import salome
|
|
|
|
salome.salome_init()
|
|
|
|
\endcode
|
|
|
|
|
|
|
|
<b>Geometry initialisation is modified.</b>
|
2013-04-17 21:23:36 +06:00
|
|
|
\n the old mode:
|
2013-04-11 21:16:14 +06:00
|
|
|
\code
|
|
|
|
import geompy
|
2017-06-13 14:57:14 +05:00
|
|
|
geompy.init_geom()
|
2013-04-11 21:16:14 +06:00
|
|
|
\endcode
|
2013-04-17 21:23:36 +06:00
|
|
|
\n the new mode:
|
2013-04-11 21:16:14 +06:00
|
|
|
\code
|
|
|
|
import GEOM
|
|
|
|
from salome.geom import geomBuilder
|
2017-06-13 14:57:14 +05:00
|
|
|
geompy = geomBuilder.New()
|
2013-04-11 21:16:14 +06:00
|
|
|
\endcode
|
|
|
|
|
|
|
|
|
|
|
|
<b> Of course, <em>from geompy import *</em> is no more possible.</b>
|
2017-12-04 16:40:22 +05:00
|
|
|
\n You have to explicitly write <em>geompy.some_method()</em>.
|
2013-04-11 21:16:14 +06:00
|
|
|
|
2013-04-17 21:23:36 +06:00
|
|
|
\n <b>Some variables have been transferred from the namespace <em>geompy.GEOM</em> to the namespace <em>GEOM</em>.</b>
|
|
|
|
\n All occurrences of <em>geompy.GEOM.</em> can be replaced by <em>GEOM.</em>.
|
2013-04-11 21:16:14 +06:00
|
|
|
\n For instance:
|
|
|
|
\code
|
|
|
|
param_polyline = geompy.MakeCurveParametric("t", "sin(t)", "cos(t)", 0., 100., 100, geompy.GEOM.Polyline, theNewMethod=True)
|
|
|
|
\endcode
|
|
|
|
is replaced by:
|
|
|
|
\code
|
|
|
|
param_polyline = geompy.MakeCurveParametric("t", "sin(t)", "cos(t)", 0., 100., 100, GEOM.Polyline, theNewMethod=True)
|
|
|
|
\endcode
|
|
|
|
|
|
|
|
|
|
|
|
*/
|