mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-02-28 20:55:38 +05:00
Crossplatformed Load of plugins libraries
This commit is contained in:
parent
1db8a57bb1
commit
128cfc72ca
@ -94,6 +94,8 @@ bool SMESHGUI_XmlHandler::startElement (const QString&, const QString&,
|
|||||||
* (only client lib, because server lib translates in SMESH_Gen_i::createHypothesis
|
* (only client lib, because server lib translates in SMESH_Gen_i::createHypothesis
|
||||||
* for normal work of *.py files )
|
* for normal work of *.py files )
|
||||||
*/
|
*/
|
||||||
|
if( !myClientLib.isEmpty() )
|
||||||
|
{
|
||||||
#ifdef WNT
|
#ifdef WNT
|
||||||
//myServerLib += ".dll";
|
//myServerLib += ".dll";
|
||||||
myClientLib += ".dll";
|
myClientLib += ".dll";
|
||||||
@ -101,6 +103,7 @@ bool SMESHGUI_XmlHandler::startElement (const QString&, const QString&,
|
|||||||
//myServerLib = "lib" + myServerLib + ".so";
|
//myServerLib = "lib" + myServerLib + ".so";
|
||||||
myClientLib = "lib" + myClientLib + ".so";
|
myClientLib = "lib" + myClientLib + ".so";
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
QString aResName = atts.value("resources");
|
QString aResName = atts.value("resources");
|
||||||
|
@ -138,7 +138,7 @@ smeshgui.SetName(salome.ObjectToID(algoMef), "Triangle (Mefisto)")
|
|||||||
|
|
||||||
print "-------------------------- NETGEN_3D"
|
print "-------------------------- NETGEN_3D"
|
||||||
|
|
||||||
algoNg = smesh.CreateHypothesis( "NETGEN_3D", "libNETGENEngine.so" )
|
algoNg = smesh.CreateHypothesis( "NETGEN_3D", "NETGENEngine" )
|
||||||
print algoNg.GetName()
|
print algoNg.GetName()
|
||||||
print algoNg.GetId()
|
print algoNg.GetId()
|
||||||
smeshgui.SetName(salome.ObjectToID(algoNg), "Tetrahedron (NETGEN)")
|
smeshgui.SetName(salome.ObjectToID(algoNg), "Tetrahedron (NETGEN)")
|
||||||
|
@ -158,7 +158,7 @@ smeshgui.SetName(salome.ObjectToID(mefisto2D), "MEFISTO_2D")
|
|||||||
|
|
||||||
print "-------------------------- NETGEN_3D"
|
print "-------------------------- NETGEN_3D"
|
||||||
|
|
||||||
netgen3D = smesh.CreateHypothesis("NETGEN_3D", "libNETGENEngine.so")
|
netgen3D = smesh.CreateHypothesis("NETGEN_3D", "NETGENEngine")
|
||||||
smeshgui.SetName(salome.ObjectToID(netgen3D), "NETGEN_3D")
|
smeshgui.SetName(salome.ObjectToID(netgen3D), "NETGEN_3D")
|
||||||
|
|
||||||
# ---- init a Mesh with the alveole
|
# ---- init a Mesh with the alveole
|
||||||
|
@ -119,7 +119,7 @@ smeshgui.SetName(salome.ObjectToID(mefisto2D), "MEFISTO_2D")
|
|||||||
|
|
||||||
print "-------------------------- NETGEN_3D"
|
print "-------------------------- NETGEN_3D"
|
||||||
|
|
||||||
netgen3D = smesh.CreateHypothesis("NETGEN_3D", "libNETGENEngine.so")
|
netgen3D = smesh.CreateHypothesis("NETGEN_3D", "NETGENEngine")
|
||||||
smeshgui.SetName(salome.ObjectToID(netgen3D), "NETGEN_3D")
|
smeshgui.SetName(salome.ObjectToID(netgen3D), "NETGEN_3D")
|
||||||
|
|
||||||
# ---- init a Mesh with the shell
|
# ---- init a Mesh with the shell
|
||||||
|
@ -130,7 +130,7 @@ smeshgui.SetName(salome.ObjectToID(mefisto2D), "MEFISTO_2D")
|
|||||||
|
|
||||||
print "-------------------------- NETGEN_3D"
|
print "-------------------------- NETGEN_3D"
|
||||||
|
|
||||||
netgen3D = smesh.CreateHypothesis("NETGEN_3D", "libNETGENEngine.so")
|
netgen3D = smesh.CreateHypothesis("NETGEN_3D", "NETGENEngine")
|
||||||
smeshgui.SetName(salome.ObjectToID(netgen3D), "NETGEN_3D")
|
smeshgui.SetName(salome.ObjectToID(netgen3D), "NETGEN_3D")
|
||||||
|
|
||||||
# ---- init a Mesh with the shell
|
# ---- init a Mesh with the shell
|
||||||
|
@ -91,7 +91,7 @@ smeshgui.SetName(salome.ObjectToID(mefisto2D), "MEFISTO_2D")
|
|||||||
|
|
||||||
print "-------------------------- NETGEN_3D"
|
print "-------------------------- NETGEN_3D"
|
||||||
|
|
||||||
netgen3D = smesh.CreateHypothesis("NETGEN_3D", "libNETGENEngine.so")
|
netgen3D = smesh.CreateHypothesis("NETGEN_3D", "NETGENEngine")
|
||||||
smeshgui.SetName(salome.ObjectToID(netgen3D), "NETGEN_3D")
|
smeshgui.SetName(salome.ObjectToID(netgen3D), "NETGEN_3D")
|
||||||
|
|
||||||
# ---- init a Mesh with the boxe
|
# ---- init a Mesh with the boxe
|
||||||
|
@ -90,7 +90,7 @@ smeshgui.SetName(salome.ObjectToID(mefisto2D), "MEFISTO_2D")
|
|||||||
|
|
||||||
print "-------------------------- NETGEN_3D"
|
print "-------------------------- NETGEN_3D"
|
||||||
|
|
||||||
netgen3D = smesh.CreateHypothesis("NETGEN_3D", "libNETGENEngine.so")
|
netgen3D = smesh.CreateHypothesis("NETGEN_3D", "NETGENEngine")
|
||||||
|
|
||||||
smeshgui.SetName(salome.ObjectToID(netgen3D), "NETGEN_3D")
|
smeshgui.SetName(salome.ObjectToID(netgen3D), "NETGEN_3D")
|
||||||
|
|
||||||
|
@ -171,7 +171,7 @@ smeshgui.SetName(salome.ObjectToID(algoMef), "MEFISTO_2D")
|
|||||||
|
|
||||||
print "-------------------------- NETGEN_3D"
|
print "-------------------------- NETGEN_3D"
|
||||||
|
|
||||||
algoNg = smesh.CreateHypothesis( "NETGEN_3D", "libNETGENEngine.so" )
|
algoNg = smesh.CreateHypothesis( "NETGEN_3D", "NETGENEngine" )
|
||||||
listHyp = algoNg.GetCompatibleHypothesis()
|
listHyp = algoNg.GetCompatibleHypothesis()
|
||||||
for hyp in listHyp:
|
for hyp in listHyp:
|
||||||
print hyp
|
print hyp
|
||||||
|
@ -228,7 +228,7 @@ class Mesh_Segment_Python(Mesh_Segment):
|
|||||||
Private constructor
|
Private constructor
|
||||||
"""
|
"""
|
||||||
import Python1dPlugin
|
import Python1dPlugin
|
||||||
self.Create(mesh, geom, "Python_1D", "libPython1dEngine.so")
|
self.Create(mesh, geom, "Python_1D", "Python1dEngine")
|
||||||
|
|
||||||
def PythonSplit1D(self, n, func):
|
def PythonSplit1D(self, n, func):
|
||||||
"""
|
"""
|
||||||
@ -236,7 +236,7 @@ class Mesh_Segment_Python(Mesh_Segment):
|
|||||||
\param n for the number of segments that cut an edge
|
\param n for the number of segments that cut an edge
|
||||||
\param func for the python function that calculate the length of all segments
|
\param func for the python function that calculate the length of all segments
|
||||||
"""
|
"""
|
||||||
hyp = self.Hypothesis("PythonSplit1D", [n], "libPython1dEngine.so")
|
hyp = self.Hypothesis("PythonSplit1D", [n], "Python1dEngine")
|
||||||
hyp.SetNumberOfSegments(n)
|
hyp.SetNumberOfSegments(n)
|
||||||
hyp.SetPythonLog10RatioFunction(func)
|
hyp.SetPythonLog10RatioFunction(func)
|
||||||
return hyp
|
return hyp
|
||||||
@ -306,10 +306,10 @@ class Mesh_Tetrahedron(Mesh_Algorithm):
|
|||||||
Private constructor
|
Private constructor
|
||||||
"""
|
"""
|
||||||
if algo == NETGEN:
|
if algo == NETGEN:
|
||||||
self.Create(mesh, geom, "NETGEN_3D", "libNETGENEngine.so")
|
self.Create(mesh, geom, "NETGEN_3D", "NETGENEngine")
|
||||||
elif algo == GHS3D:
|
elif algo == GHS3D:
|
||||||
import GHS3DPlugin
|
import GHS3DPlugin
|
||||||
self.Create(mesh, geom, "GHS3D_3D" , "libGHS3DEngine.so")
|
self.Create(mesh, geom, "GHS3D_3D" , "GHS3DEngine")
|
||||||
|
|
||||||
def MaxElementVolume(self, vol):
|
def MaxElementVolume(self, vol):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user