mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-13 10:10:33 +05:00
PR: fix dump and compatibility with previous scripts
This commit is contained in:
parent
1d673b7232
commit
bd8239d683
@ -227,7 +227,7 @@
|
||||
output ="EDGE"
|
||||
dim ="1">
|
||||
<python-wrap>
|
||||
<algo>CompositeSegment_1D=Segment(algo=smeshDC.COMPOSITE)</algo>
|
||||
<algo>CompositeSegment_1D=Segment(algo=smeshBuilder.COMPOSITE)</algo>
|
||||
<hypo>LocalLength=LocalLength(SetLength(), ,SetPrecision())</hypo>
|
||||
<hypo>MaxLength=MaxSize(SetLength())</hypo>
|
||||
<hypo>Arithmetic1D=Arithmetic1D(SetStartLength(),SetEndLength(),SetReversedEdges())</hypo>
|
||||
@ -244,7 +244,7 @@
|
||||
output="EDGE"
|
||||
dim="1">
|
||||
<python-wrap>
|
||||
<algo>Python_1D=Segment(algo=smeshDC.PYTHON)</algo>
|
||||
<algo>Python_1D=Segment(algo=smeshBuilder.PYTHON)</algo>
|
||||
<hypo>PythonSplit1D=PythonSplit1D(SetNumberOfSegments(),SetPythonLog10RatioFunction())</hypo>
|
||||
</python-wrap>
|
||||
</algorithm>
|
||||
@ -258,7 +258,7 @@
|
||||
output ="TRIA"
|
||||
dim ="2">
|
||||
<python-wrap>
|
||||
<algo>MEFISTO_2D=Triangle(algo=smeshDC.MEFISTO)</algo>
|
||||
<algo>MEFISTO_2D=Triangle(algo=smeshBuilder.MEFISTO)</algo>
|
||||
<hypo>LengthFromEdges=LengthFromEdges()</hypo>
|
||||
<hypo>MaxElementArea=MaxElementArea(SetMaxElementArea())</hypo>
|
||||
<hypo>ViscousLayers2D=ViscousLayers2D(SetTotalThickness(),SetNumberLayers(),SetStretchFactor(),SetIgnoreEdges())</hypo>
|
||||
@ -274,7 +274,7 @@
|
||||
output ="QUAD"
|
||||
dim ="2">
|
||||
<python-wrap>
|
||||
<algo>Quadrangle_2D=Quadrangle(algo=smeshDC.QUADRANGLE)</algo>
|
||||
<algo>Quadrangle_2D=Quadrangle(algo=smeshBuilder.QUADRANGLE)</algo>
|
||||
<hypo>QuadrangleParams=QuadrangleParameters(SetQuadType(),SetTriaVertex())</hypo>
|
||||
<hypo>ViscousLayers2D=ViscousLayers2D(SetTotalThickness(),SetNumberLayers(),SetStretchFactor(),SetIgnoreEdges())</hypo>
|
||||
</python-wrap>
|
||||
@ -288,7 +288,7 @@
|
||||
opt-hypos="ViscousLayers"
|
||||
dim ="3">
|
||||
<python-wrap>
|
||||
<algo>Hexa_3D=Hexahedron(algo=smeshDC.Hexa)</algo>
|
||||
<algo>Hexa_3D=Hexahedron(algo=smeshBuilder.Hexa)</algo>
|
||||
<hypo>ViscousLayers=ViscousLayers(SetTotalThickness(),SetNumberLayers(),SetStretchFactor(),SetIgnoreFaces())</hypo>
|
||||
</python-wrap>
|
||||
</algorithm>
|
||||
@ -419,7 +419,7 @@
|
||||
output ="QUAD,TRIA"
|
||||
dim ="2">
|
||||
<python-wrap>
|
||||
<algo>RadialQuadrangle_1D2D=Quadrangle(algo=smeshDC.RADIAL_QUAD)</algo>
|
||||
<algo>RadialQuadrangle_1D2D=Quadrangle(algo=smeshBuilder.RADIAL_QUAD)</algo>
|
||||
<hypo>NumberOfLayers2D=NumberOfLayers(SetNumberOfLayers())</hypo>
|
||||
</python-wrap>
|
||||
</algorithm>
|
||||
|
@ -831,9 +831,9 @@ TCollection_AsciiString SMESH_Gen_i::DumpPython_impl
|
||||
aScript += helper + "aFilterManager = " + aSMESHGen + ".CreateFilterManager()\n\t";
|
||||
aScript += helper + "aMeasurements = " + aSMESHGen + ".CreateMeasurements()\n\t";
|
||||
if ( isPublished )
|
||||
aScript += aSMESHGen + " = smeshDC.smeshInstance(theStudy)";
|
||||
aScript += aSMESHGen + " = smeshBuilder.New(theStudy)";
|
||||
else
|
||||
aScript += aSMESHGen + " = smeshDC.smeshInstance(None)";
|
||||
aScript += aSMESHGen + " = smeshBuilder.New(None)";
|
||||
|
||||
// import python files corresponding to plugins
|
||||
set<string> moduleNameSet;
|
||||
@ -842,7 +842,7 @@ TCollection_AsciiString SMESH_Gen_i::DumpPython_impl
|
||||
string moduleName = hyp_creator->second->GetModuleName();
|
||||
bool newModule = moduleNameSet.insert( moduleName ).second;
|
||||
if ( newModule )
|
||||
aScript += helper + "\n\t" + "import " + (char*) moduleName.c_str();
|
||||
aScript += helper + "\n\t" + "from salome." + (char*) moduleName.c_str() + " import " + (char*) moduleName.c_str() +"Builder";
|
||||
}
|
||||
|
||||
// Dump trace of restored study
|
||||
@ -963,7 +963,8 @@ TCollection_AsciiString SMESH_Gen_i::DumpPython_impl
|
||||
TCollection_AsciiString initPart = "import ";
|
||||
if ( isMultiFile )
|
||||
initPart += helper + "salome, ";
|
||||
initPart += " smeshDC, SMESH, SALOMEDS\n";
|
||||
initPart += " SMESH, SALOMEDS\n";
|
||||
initPart += "from salome.smesh import smeshBuilder\n";
|
||||
if ( importGeom && isMultiFile )
|
||||
{
|
||||
initPart += ("\n## import GEOM dump file ## \n"
|
||||
|
@ -27,6 +27,7 @@ include $(top_srcdir)/adm_local/unix/make_common_starter.am
|
||||
|
||||
# Scripts to be installed.
|
||||
dist_salomescript_PYTHON = \
|
||||
smesh.py \
|
||||
batchmode_smesh.py \
|
||||
batchmode_mefisto.py \
|
||||
ex00_all.py \
|
||||
@ -97,7 +98,6 @@ dist_salomescript_PYTHON = \
|
||||
|
||||
mypkgpythondir = $(salomepythondir)/salome/smesh
|
||||
mypkgpython_PYTHON = \
|
||||
smesh.py \
|
||||
smeshBuilder.py \
|
||||
smesh_algorithm.py
|
||||
|
||||
|
@ -32,7 +32,7 @@
|
||||
import salome
|
||||
from salome import *
|
||||
|
||||
from salome.geom import geompy
|
||||
import geompy
|
||||
import SMESH, SALOMEDS
|
||||
from salome.smesh import smeshBuilder
|
||||
#from smeshBuilder import *
|
||||
@ -49,7 +49,7 @@ except:
|
||||
|
||||
# load plugins and add dynamically generated methods to Mesh class,
|
||||
# the same for for global variables declared by plug-ins
|
||||
from smeshBuilder import Mesh, algoCreator
|
||||
from salome.smesh.smeshBuilder import Mesh, algoCreator
|
||||
for pluginName in os.environ[ "SMESH_MeshersList" ].split( ":" ):
|
||||
#
|
||||
print "pluginName: ", pluginName
|
||||
|
Loading…
Reference in New Issue
Block a user