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