In SALOME 7.2, the Python interface for Mesh has been slightly modified to offer new functionality:
Scripts generated for SALOME 6 and older versions must be adapted to work in SALOME 7.2 with full functionality.
The compatibility mode allows old scripts to work in almost all cases, but with a warning.
See also Modifying Geometry Python scripts from SALOME 6 and before
Salome initialisation must always be done as shown below
(salome_init() can be invoked safely several times):
smesh initialisation is modified.
the old mode (from dump):
the new mode:
Of course, from smesh import * is no more possible.
You have to explicitely write smesh.some_method().
All algorithms have been transferred from the namespace smesh to the namespace smeshBuilder.
For instance:
is replaced by:
StdMeshers algorithms concerned are REGULAR, PYTHON, COMPOSITE, MEFISTO, Hexa, QUADRANGLE, RADIAL_QUAD.
SMESH Plugins provide such algorithms as: NETGEN, NETGEN_FULL, FULL_NETGEN, NETGEN_1D2D3D, NETGEN_1D2D, NETGEN_2D, NETGEN_3D.
If you use DISTENE plugins, you also have BLSURF, GHS3D, GHS3DPRL, Hexotic.
Some variables were available in both namespaces smesh and SMESH. Now they are available only in namespace SMESH.
The dump function used only the namespace SMESH, so, if your script was built with the help of the dump function, it should be already OK in this respect.
The most used variables concerned are:
NODE, EDGE, FACE, VOLUME, ALL.
FT_xxx, geom_xxx, ADD_xxx...
For instance:
is replaced by:
The namespace smesh.smesh does not exist any more, use smesh instead.
For instance:
is replaced by:
If you need to import a SMESH Plugin explicitely, keep in mind that they are now located in separate namespaces.
For instance:
is replaced by: