Improve crossplatform library name of plugin

This commit is contained in:
abd 2006-04-25 12:56:28 +00:00
parent 92ca4d37a1
commit 38412444f9
26 changed files with 213 additions and 187 deletions

View File

@ -90,12 +90,15 @@ bool SMESHGUI_XmlHandler::startElement (const QString&, const QString&,
myPluginName = atts.value("name");
myServerLib = atts.value("server-lib");
myClientLib = atts.value("gui-lib");
/* It's Need to tranlate lib name for WIN32 or X platform
* (only client lib, because server lib translates in SMESH_Gen_i::createHypothesis
* for normal work of *.py files )
*/
#ifdef WNT
myServerLib += ".dll";
//myServerLib += ".dll";
myClientLib += ".dll";
#else
myServerLib = "lib" + myServerLib + ".so";
//myServerLib = "lib" + myServerLib + ".so";
myClientLib = "lib" + myClientLib + ".so";
#endif

View File

@ -307,8 +307,28 @@ SMESH::SMESH_Hypothesis_ptr SMESH_Gen_i::createHypothesis(const char* theHypName
const char* theLibName)
throw (SALOME::SALOME_Exception)
{
/* It's Need to tranlate lib name for WIN32 or X platform */
char* aPlatformLibName = 0;
if ( theLibName && theLibName[0] != '\0' )
{
#ifdef WNT
aPlatformLibName = new char[ strlen(theLibName) + 5 ];
aPlatformLibName[0] = '\0';
aPlatformLibName = strcat( aPlatformLibName, theLibName );
aPlatformLibName = strcat( aPlatformLibName, ".dll" );
#else
aPlatformLibName = new char[ strlen(theLibName) + 7 ];
aPlatformLibName[0] = '\0';
aPlatformLibName = strcat( aPlatformLibName, "lib" );
aPlatformLibName = strcat( aPlatformLibName, theLibName );
aPlatformLibName = strcat( aPlatformLibName, ".dll" );
#endif
}
Unexpect aCatch(SALOME_SalomeException);
if(MYDEBUG) MESSAGE( "Create Hypothesis <" << theHypName << "> from " << theLibName);
if(MYDEBUG) MESSAGE( "Create Hypothesis <" << theHypName << "> from " << aPlatformLibName/*theLibName*/);
// create a new hypothesis object servant
SMESH_Hypothesis_i* myHypothesis_i = 0;
@ -321,7 +341,7 @@ SMESH::SMESH_Hypothesis_ptr SMESH_Gen_i::createHypothesis(const char* theHypName
{
// load plugin library
if(MYDEBUG) MESSAGE("Loading server meshers plugin library ...");
LibHandle libHandle = LoadLib( theLibName );
LibHandle libHandle = LoadLib( aPlatformLibName/*theLibName*/ );
if (!libHandle)
{
// report any error, if occured
@ -362,13 +382,16 @@ SMESH::SMESH_Hypothesis_ptr SMESH_Gen_i::createHypothesis(const char* theHypName
myHypCreatorMap[string(theHypName)]->Create (myPoa, GetCurrentStudyID(), &myGen);
// _CS_gbo Explicit activation (no longer made in the constructor).
myHypothesis_i->Activate();
myHypothesis_i->SetLibName(theLibName); // for persistency assurance
myHypothesis_i->SetLibName(aPlatformLibName/*theLibName*/); // for persistency assurance
}
catch (SALOME_Exception& S_ex)
{
THROW_SALOME_CORBA_EXCEPTION(S_ex.what(), SALOME::BAD_PARAM);
}
if ( aPlatformLibName )
delete[] aPlatformLibName;
if (!myHypothesis_i)
return hypothesis_i._retn();

View File

@ -53,7 +53,7 @@ print"---------------------Hypothesis"
#---------------- NumberOfSegments
numberOfSegment = 9
hypNbSeg = smesh.CreateHypothesis( "NumberOfSegments", "libStdMeshersEngine.so" )
hypNbSeg = smesh.CreateHypothesis( "NumberOfSegments", "StdMeshersEngine" )
hypNbSeg.SetNumberOfSegments( numberOfSegment )
print hypNbSeg.GetName()
@ -64,7 +64,7 @@ smeshgui.SetName(salome.ObjectToID(hypNbSeg), "Nb. Segments")
#--------------------------Max. Element Area
maxElementArea = 200
hypArea200 = smesh.CreateHypothesis("MaxElementArea","libStdMeshersEngine.so")
hypArea200 = smesh.CreateHypothesis("MaxElementArea","StdMeshersEngine")
hypArea200.SetMaxElementArea( maxElementArea )
print hypArea200.GetName()
print hypArea200.GetMaxElementArea()
@ -74,14 +74,14 @@ smeshgui.SetName(salome.ObjectToID(hypArea200), "Max. Element Area")
print"---------------------Algorithms"
#----------------------------Wire discretisation
algoWireDes = smesh.CreateHypothesis( "Regular_1D", "libStdMeshersEngine.so" )
algoWireDes = smesh.CreateHypothesis( "Regular_1D", "StdMeshersEngine" )
listHyp = algoWireDes.GetCompatibleHypothesis()
print algoWireDes.GetName()
smeshgui.SetName(salome.ObjectToID(algoWireDes), "Ware descritisation")
#----------------------------Triangle (Mefisto)
algoMef = smesh.CreateHypothesis( "MEFISTO_2D", "libStdMeshersEngine.so" )
algoMef = smesh.CreateHypothesis( "MEFISTO_2D", "StdMeshersEngine" )
listHyp = algoMef.GetCompatibleHypothesis()
print algoMef.GetName()

View File

@ -60,18 +60,18 @@ smeshgui = salome.ImportComponentGUI("SMESH")
smeshgui.Init(salome.myStudyId)
# create hypoteses
hypNbSeg1 = smesh.CreateHypothesis("NumberOfSegments", "libStdMeshersEngine.so")
hypNbSeg1 = smesh.CreateHypothesis("NumberOfSegments", "StdMeshersEngine")
hypNbSeg1.SetNumberOfSegments(18)
id_hypNbSeg1 = salome.ObjectToID(hypNbSeg1)
smeshgui.SetName(id_hypNbSeg1, "NumberOfSegments 1");
hypNbSeg2 = smesh.CreateHypothesis("NumberOfSegments", "libStdMeshersEngine.so")
hypNbSeg2 = smesh.CreateHypothesis("NumberOfSegments", "StdMeshersEngine")
hypNbSeg2.SetNumberOfSegments(34)
id_hypNbSeg2 = salome.ObjectToID(hypNbSeg2)
smeshgui.SetName(id_hypNbSeg2, "NumberOfSegments 2");
# create algorithmes
algoReg = smesh.CreateHypothesis("Regular_1D", "libStdMeshersEngine.so")
algoReg = smesh.CreateHypothesis("Regular_1D", "StdMeshersEngine")
id_algoReg = salome.ObjectToID(algoReg)
smeshgui.SetName(id_algoReg, "Regular_1D");

View File

@ -57,22 +57,22 @@ smeshgui = salome.ImportComponentGUI("SMESH")
smeshgui.Init(salome.myStudyId)
# create hypoteses
hypNbSeg = smesh.CreateHypothesis("NumberOfSegments", "libStdMeshersEngine.so")
hypNbSeg = smesh.CreateHypothesis("NumberOfSegments", "StdMeshersEngine")
hypNbSeg.SetNumberOfSegments(12)
idseg = salome.ObjectToID(hypNbSeg)
smeshgui.SetName(idseg, "NumberOfSegments_10");
hypArea = smesh.CreateHypothesis("MaxElementArea", "libStdMeshersEngine.so")
hypArea = smesh.CreateHypothesis("MaxElementArea", "StdMeshersEngine")
hypArea.SetMaxElementArea(30)
idarea = salome.ObjectToID(hypArea)
smeshgui.SetName(idarea, "MaxElementArea_20");
# create algorithmes
algoReg = smesh.CreateHypothesis("Regular_1D", "libStdMeshersEngine.so")
algoReg = smesh.CreateHypothesis("Regular_1D", "StdMeshersEngine")
idreg = salome.ObjectToID(algoReg)
smeshgui.SetName(idreg, "Regular_1D");
algoMef = smesh.CreateHypothesis("MEFISTO_2D", "libStdMeshersEngine.so")
algoMef = smesh.CreateHypothesis("MEFISTO_2D", "StdMeshersEngine")
idmef = salome.ObjectToID(algoMef)
smeshgui.SetName(idmef, "MEFISTO_2D");

View File

@ -89,7 +89,7 @@ smeshgui.SetName( idmesh, "Nut" )
#HYPOTHESIS CREATION
print "-------------------------- Average length"
theAverageLength = 5
hAvLength = smesh.CreateHypothesis( "LocalLength", "libStdMeshersEngine.so" )
hAvLength = smesh.CreateHypothesis( "LocalLength", "StdMeshersEngine" )
hAvLength.SetLength( theAverageLength )
print hAvLength.GetName()
print hAvLength.GetId()
@ -97,7 +97,7 @@ smeshgui.SetName(salome.ObjectToID(hAvLength), "AverageLength_5")
print "-------------------------- MaxElementArea"
theMaxElementArea = 20
hArea20 = smesh.CreateHypothesis( "MaxElementArea", "libStdMeshersEngine.so" )
hArea20 = smesh.CreateHypothesis( "MaxElementArea", "StdMeshersEngine" )
hArea20.SetMaxElementArea( theMaxElementArea )
print hArea20.GetName()
print hArea20.GetId()
@ -106,7 +106,7 @@ smeshgui.SetName(salome.ObjectToID(hArea20), "MaxElementArea_20")
print "-------------------------- MaxElementVolume"
theMaxElementVolume = 150
hVolume150 = smesh.CreateHypothesis( "MaxElementVolume", "libStdMeshersEngine.so" )
hVolume150 = smesh.CreateHypothesis( "MaxElementVolume", "StdMeshersEngine" )
hVolume150.SetMaxElementVolume( theMaxElementVolume )
print hVolume150.GetName()
print hVolume150.GetId()
@ -119,7 +119,7 @@ mesh.AddHypothesis(shape_mesh, hVolume150)
print "-------------------------- Regular_1D"
algoReg1D = smesh.CreateHypothesis( "Regular_1D", "libStdMeshersEngine.so" )
algoReg1D = smesh.CreateHypothesis( "Regular_1D", "StdMeshersEngine" )
listHyp = algoReg1D.GetCompatibleHypothesis()
for hyp in listHyp:
print hyp
@ -128,7 +128,7 @@ print algoReg1D.GetId()
smeshgui.SetName(salome.ObjectToID(algoReg1D), "Wire discretisation")
print "-------------------------- MEFISTO_2D"
algoMef = smesh.CreateHypothesis( "MEFISTO_2D", "libStdMeshersEngine.so" )
algoMef = smesh.CreateHypothesis( "MEFISTO_2D", "StdMeshersEngine" )
listHyp = algoMef.GetCompatibleHypothesis()
for hyp in listHyp:
print hyp

View File

@ -112,7 +112,7 @@ print "-------------------------- NumberOfSegments"
numberOfSegments = 10
hypNbSeg = smesh.CreateHypothesis("NumberOfSegments", "libStdMeshersEngine.so")
hypNbSeg = smesh.CreateHypothesis("NumberOfSegments", "StdMeshersEngine")
hypNbSeg.SetNumberOfSegments(numberOfSegments)
print hypNbSeg.GetName()
print hypNbSeg.GetId()
@ -124,7 +124,7 @@ print "-------------------------- MaxElementArea"
maxElementArea = 0.1
hypArea = smesh.CreateHypothesis("MaxElementArea", "libStdMeshersEngine.so")
hypArea = smesh.CreateHypothesis("MaxElementArea", "StdMeshersEngine")
hypArea.SetMaxElementArea(maxElementArea)
print hypArea.GetName()
print hypArea.GetId()
@ -136,7 +136,7 @@ print "-------------------------- MaxElementVolume"
maxElementVolume = 0.5
hypVolume = smesh.CreateHypothesis("MaxElementVolume", "libStdMeshersEngine.so")
hypVolume = smesh.CreateHypothesis("MaxElementVolume", "StdMeshersEngine")
hypVolume.SetMaxElementVolume(maxElementVolume)
print hypVolume.GetName()
print hypVolume.GetId()
@ -148,12 +148,12 @@ print "-------------------------- create Algorithms"
print "-------------------------- Regular_1D"
regular1D = smesh.CreateHypothesis("Regular_1D", "libStdMeshersEngine.so")
regular1D = smesh.CreateHypothesis("Regular_1D", "StdMeshersEngine")
smeshgui.SetName(salome.ObjectToID(regular1D), "Wire Discretisation")
print "-------------------------- MEFISTO_2D"
mefisto2D = smesh.CreateHypothesis("MEFISTO_2D", "libStdMeshersEngine.so")
mefisto2D = smesh.CreateHypothesis("MEFISTO_2D", "StdMeshersEngine")
smeshgui.SetName(salome.ObjectToID(mefisto2D), "MEFISTO_2D")
print "-------------------------- NETGEN_3D"

View File

@ -36,22 +36,22 @@ smeshgui.Init(salome.myStudyId)
# Hypothesis
hypL1=meshgenerator.CreateHypothesis("LocalLength","libStdMeshersEngine.so")
hypL1=meshgenerator.CreateHypothesis("LocalLength","StdMeshersEngine")
hypL1.SetLength(0.25)
hypL1Id = salome.ObjectToID(hypL1)
smeshgui.SetName(hypL1Id, "LocalLength")
# Algorithm
alg1D=meshgenerator.CreateHypothesis("Regular_1D", "libStdMeshersEngine.so")
alg1D=meshgenerator.CreateHypothesis("Regular_1D", "StdMeshersEngine")
alg1DId = salome.ObjectToID(alg1D)
smeshgui.SetName(alg1DId, "algo1D")
alg2D=meshgenerator.CreateHypothesis("Quadrangle_2D", "libStdMeshersEngine.so")
alg2D=meshgenerator.CreateHypothesis("Quadrangle_2D", "StdMeshersEngine")
alg2DId = salome.ObjectToID(alg2D)
smeshgui.SetName(alg2DId, "algo2D")
alg3D=meshgenerator.CreateHypothesis("Hexa_3D", "libStdMeshersEngine.so")
alg3D=meshgenerator.CreateHypothesis("Hexa_3D", "StdMeshersEngine")
alg3DId = salome.ObjectToID(alg3D)
smeshgui.SetName(alg3DId, "algo3D")

View File

@ -68,7 +68,7 @@ print "-------------------------- NumberOfSegments"
numberOfSegments = 10
hypNbSeg = smesh.CreateHypothesis("NumberOfSegments", "libStdMeshersEngine.so")
hypNbSeg = smesh.CreateHypothesis("NumberOfSegments", "StdMeshersEngine")
hypNbSeg.SetNumberOfSegments(numberOfSegments)
print hypNbSeg.GetName()
@ -81,7 +81,7 @@ print "-------------------------- MaxElementArea"
maxElementArea = 500
hypArea = smesh.CreateHypothesis("MaxElementArea", "libStdMeshersEngine.so")
hypArea = smesh.CreateHypothesis("MaxElementArea", "StdMeshersEngine")
hypArea.SetMaxElementArea(maxElementArea)
print hypArea.GetName()
@ -94,7 +94,7 @@ print "-------------------------- MaxElementVolume"
maxElementVolume = 500
hypVolume = smesh.CreateHypothesis("MaxElementVolume", "libStdMeshersEngine.so")
hypVolume = smesh.CreateHypothesis("MaxElementVolume", "StdMeshersEngine")
hypVolume.SetMaxElementVolume(maxElementVolume)
print hypVolume.GetName()
@ -109,12 +109,12 @@ print "-------------------------- create Algorithms"
print "-------------------------- Regular_1D"
regular1D = smesh.CreateHypothesis("Regular_1D", "libStdMeshersEngine.so")
regular1D = smesh.CreateHypothesis("Regular_1D", "StdMeshersEngine")
smeshgui.SetName(salome.ObjectToID(regular1D), "Wire Discretisation")
print "-------------------------- MEFISTO_2D"
mefisto2D = smesh.CreateHypothesis("MEFISTO_2D", "libStdMeshersEngine.so")
mefisto2D = smesh.CreateHypothesis("MEFISTO_2D", "StdMeshersEngine")
smeshgui.SetName(salome.ObjectToID(mefisto2D), "MEFISTO_2D")
print "-------------------------- NETGEN_3D"

View File

@ -79,7 +79,7 @@ print "-------------------------- NumberOfSegments"
numberOfSegments = 10
hypNbSeg = smesh.CreateHypothesis("NumberOfSegments", "libStdMeshersEngine.so")
hypNbSeg = smesh.CreateHypothesis("NumberOfSegments", "StdMeshersEngine")
hypNbSeg.SetNumberOfSegments(numberOfSegments)
print hypNbSeg.GetName()
@ -92,7 +92,7 @@ print "-------------------------- MaxElementArea"
maxElementArea = 500
hypArea = smesh.CreateHypothesis("MaxElementArea", "libStdMeshersEngine.so")
hypArea = smesh.CreateHypothesis("MaxElementArea", "StdMeshersEngine")
hypArea.SetMaxElementArea(maxElementArea)
print hypArea.GetName()
@ -105,7 +105,7 @@ print "-------------------------- MaxElementVolume"
maxElementVolume = 500
hypVolume = smesh.CreateHypothesis("MaxElementVolume", "libStdMeshersEngine.so")
hypVolume = smesh.CreateHypothesis("MaxElementVolume", "StdMeshersEngine")
hypVolume.SetMaxElementVolume(maxElementVolume)
print hypVolume.GetName()
@ -120,12 +120,12 @@ print "-------------------------- create Algorithms"
print "-------------------------- Regular_1D"
regular1D = smesh.CreateHypothesis("Regular_1D", "libStdMeshersEngine.so")
regular1D = smesh.CreateHypothesis("Regular_1D", "StdMeshersEngine")
smeshgui.SetName(salome.ObjectToID(regular1D), "Wire Discretisation")
print "-------------------------- MEFISTO_2D"
mefisto2D = smesh.CreateHypothesis("MEFISTO_2D", "libStdMeshersEngine.so")
mefisto2D = smesh.CreateHypothesis("MEFISTO_2D", "StdMeshersEngine")
smeshgui.SetName(salome.ObjectToID(mefisto2D), "MEFISTO_2D")
print "-------------------------- NETGEN_3D"

View File

@ -40,7 +40,7 @@ print "-------------------------- NumberOfSegments"
numberOfSegments = 10
hypNbSeg = smesh.CreateHypothesis("NumberOfSegments", "libStdMeshersEngine.so")
hypNbSeg = smesh.CreateHypothesis("NumberOfSegments", "StdMeshersEngine")
hypNbSeg.SetNumberOfSegments(numberOfSegments)
print hypNbSeg.GetName()
@ -53,7 +53,7 @@ print "-------------------------- MaxElementArea"
maxElementArea = 500
hypArea = smesh.CreateHypothesis("MaxElementArea", "libStdMeshersEngine.so")
hypArea = smesh.CreateHypothesis("MaxElementArea", "StdMeshersEngine")
hypArea.SetMaxElementArea(maxElementArea)
print hypArea.GetName()
@ -66,7 +66,7 @@ print "-------------------------- MaxElementVolume"
maxElementVolume = 500
hypVolume = smesh.CreateHypothesis("MaxElementVolume", "libStdMeshersEngine.so")
hypVolume = smesh.CreateHypothesis("MaxElementVolume", "StdMeshersEngine")
hypVolume.SetMaxElementVolume(maxElementVolume)
print hypVolume.GetName()
@ -81,12 +81,12 @@ print "-------------------------- create Algorithms"
print "-------------------------- Regular_1D"
regular1D = smesh.CreateHypothesis("Regular_1D", "libStdMeshersEngine.so")
regular1D = smesh.CreateHypothesis("Regular_1D", "StdMeshersEngine")
smeshgui.SetName(salome.ObjectToID(regular1D), "Wire Discretisation")
print "-------------------------- MEFISTO_2D"
mefisto2D = smesh.CreateHypothesis("MEFISTO_2D", "libStdMeshersEngine.so")
mefisto2D = smesh.CreateHypothesis("MEFISTO_2D", "StdMeshersEngine")
smeshgui.SetName(salome.ObjectToID(mefisto2D), "MEFISTO_2D")
print "-------------------------- NETGEN_3D"

View File

@ -119,7 +119,7 @@ print "-------------------------- NumberOfSegments the global one"
numberOfSegments = 10
hypNbSeg=smesh.CreateHypothesis("NumberOfSegments","libStdMeshersEngine.so")
hypNbSeg=smesh.CreateHypothesis("NumberOfSegments","StdMeshersEngine")
hypNbSeg.SetNumberOfSegments(numberOfSegments)
hypNbSegID = hypNbSeg.GetId()
print hypNbSeg.GetName()
@ -132,7 +132,7 @@ print "-------------------------- NumberOfSegments in the Z direction"
numberOfSegmentsZ = 40
hypNbSegZ=smesh.CreateHypothesis("NumberOfSegments","libStdMeshersEngine.so")
hypNbSegZ=smesh.CreateHypothesis("NumberOfSegments","StdMeshersEngine")
hypNbSegZ.SetNumberOfSegments(numberOfSegmentsZ)
hypNbSegZID = hypNbSegZ.GetId()
print hypNbSegZ.GetName()
@ -147,17 +147,17 @@ print "-------------------------- create Algorithms"
print "-------------------------- Regular_1D"
regular1D=smesh.CreateHypothesis("Regular_1D", "libStdMeshersEngine.so")
regular1D=smesh.CreateHypothesis("Regular_1D", "StdMeshersEngine")
smeshgui.SetName(salome.ObjectToID(regular1D), "Wire Discretisation")
print "-------------------------- Quadrangle_2D"
quad2D=smesh.CreateHypothesis("Quadrangle_2D", "libStdMeshersEngine.so")
quad2D=smesh.CreateHypothesis("Quadrangle_2D", "StdMeshersEngine")
smeshgui.SetName(salome.ObjectToID(quad2D), "Quadrangle_2D")
print "-------------------------- Hexa_3D"
hexa3D=smesh.CreateHypothesis("Hexa_3D", "libStdMeshersEngine.so")
hexa3D=smesh.CreateHypothesis("Hexa_3D", "StdMeshersEngine")
smeshgui.SetName(salome.ObjectToID(hexa3D), "Hexa_3D")
# ---- init a Mesh with the volume

View File

@ -37,7 +37,7 @@ print "-------------------------- NumberOfSegments"
numberOfSegments = 5
hypNbSeg = smesh.CreateHypothesis("NumberOfSegments", "libStdMeshersEngine.so")
hypNbSeg = smesh.CreateHypothesis("NumberOfSegments", "StdMeshersEngine")
hypNbSeg.SetNumberOfSegments(numberOfSegments)
print hypNbSeg.GetName()
@ -50,19 +50,19 @@ print "-------------------------- create Algorithms"
print "-------------------------- Regular_1D"
regular1D = smesh.CreateHypothesis("Regular_1D", "libStdMeshersEngine.so")
regular1D = smesh.CreateHypothesis("Regular_1D", "StdMeshersEngine")
smeshgui.SetName(salome.ObjectToID(regular1D), "Wire Discretisation")
print "-------------------------- Quadrangle_2D"
quad2D = smesh.CreateHypothesis("Quadrangle_2D", "libStdMeshersEngine.so")
quad2D = smesh.CreateHypothesis("Quadrangle_2D", "StdMeshersEngine")
smeshgui.SetName(salome.ObjectToID(quad2D), "Quadrangle_2D")
print "-------------------------- Hexa_3D"
hexa3D = smesh.CreateHypothesis("Hexa_3D", "libStdMeshersEngine.so")
hexa3D = smesh.CreateHypothesis("Hexa_3D", "StdMeshersEngine")
smeshgui.SetName(salome.ObjectToID(hexa3D), "Hexa_3D")

View File

@ -37,7 +37,7 @@ print "-------------------------- NumberOfSegments"
numberOfSegments = 5
hypNbSeg = smesh.CreateHypothesis("NumberOfSegments", "libStdMeshersEngine.so")
hypNbSeg = smesh.CreateHypothesis("NumberOfSegments", "StdMeshersEngine")
hypNbSeg.SetNumberOfSegments(numberOfSegments)
print hypNbSeg.GetName()
@ -57,7 +57,7 @@ print "-------------------------- MaxElementArea"
## print hypArea.GetMaxElementArea()
## smeshgui.SetName(salome.ObjectToID(hypArea), "MaxElementArea_160")
hypLengthFromEdges = smesh.CreateHypothesis("LengthFromEdges", "libStdMeshersEngine.so")
hypLengthFromEdges = smesh.CreateHypothesis("LengthFromEdges", "StdMeshersEngine")
smeshgui.SetName(salome.ObjectToID(hypLengthFromEdges), "LengthFromEdges")
@ -65,7 +65,7 @@ print "-------------------------- MaxElementVolume"
maxElementVolume = 1000
hypVolume = smesh.CreateHypothesis("MaxElementVolume", "libStdMeshersEngine.so")
hypVolume = smesh.CreateHypothesis("MaxElementVolume", "StdMeshersEngine")
hypVolume.SetMaxElementVolume(maxElementVolume)
print hypVolume.GetName()
@ -78,13 +78,13 @@ print "-------------------------- create Algorithms"
print "-------------------------- Regular_1D"
regular1D = smesh.CreateHypothesis("Regular_1D", "libStdMeshersEngine.so")
regular1D = smesh.CreateHypothesis("Regular_1D", "StdMeshersEngine")
smeshgui.SetName(salome.ObjectToID(regular1D), "Wire Discretisation")
print "-------------------------- MEFISTO_2D"
mefisto2D = smesh.CreateHypothesis("MEFISTO_2D", "libStdMeshersEngine.so")
mefisto2D = smesh.CreateHypothesis("MEFISTO_2D", "StdMeshersEngine")
smeshgui.SetName(salome.ObjectToID(mefisto2D), "MEFISTO_2D")

View File

@ -48,7 +48,7 @@ print "-------------------------- LocalLength"
lengthOfSegments = 0.3
hypLength = smesh.CreateHypothesis("LocalLength", "libStdMeshersEngine.so")
hypLength = smesh.CreateHypothesis("LocalLength", "StdMeshersEngine")
hypLength.SetLength(lengthOfSegments)
print hypLength.GetName()
@ -59,7 +59,7 @@ smeshgui.SetName(salome.ObjectToID(hypLength), "LocalLength_0.3")
print "-------------------------- LengthFromEdges"
hypLengthFromEdge = smesh.CreateHypothesis("LengthFromEdges", "libStdMeshersEngine.so")
hypLengthFromEdge = smesh.CreateHypothesis("LengthFromEdges", "StdMeshersEngine")
print hypLengthFromEdge.GetName()
print hypLengthFromEdge.GetId()
@ -70,13 +70,13 @@ print "-------------------------- create Algorithms"
print "-------------------------- Regular_1D"
regular1D = smesh.CreateHypothesis("Regular_1D", "libStdMeshersEngine.so")
regular1D = smesh.CreateHypothesis("Regular_1D", "StdMeshersEngine")
smeshgui.SetName(salome.ObjectToID(regular1D), "Wire Discretisation")
print "-------------------------- MEFISTO_2D"
mefisto2D = smesh.CreateHypothesis("MEFISTO_2D", "libStdMeshersEngine.so")
mefisto2D = smesh.CreateHypothesis("MEFISTO_2D", "StdMeshersEngine")
smeshgui.SetName(salome.ObjectToID(mefisto2D), "MEFISTO_2D")

View File

@ -23,15 +23,15 @@ aBox = salome.IDToObject( idbox )
# Create mesh
hyp1 = smesh.CreateHypothesis("NumberOfSegments", "libStdMeshersEngine.so")
hyp1 = smesh.CreateHypothesis("NumberOfSegments", "StdMeshersEngine")
hyp1.SetNumberOfSegments(5)
hyp2 = smesh.CreateHypothesis("MaxElementArea", "libStdMeshersEngine.so")
hyp2 = smesh.CreateHypothesis("MaxElementArea", "StdMeshersEngine")
hyp2.SetMaxElementArea(20)
hyp3 = smesh.CreateHypothesis("MaxElementArea", "libStdMeshersEngine.so")
hyp3 = smesh.CreateHypothesis("MaxElementArea", "StdMeshersEngine")
hyp3.SetMaxElementArea(50)
algo1 = smesh.CreateHypothesis("Regular_1D", "libStdMeshersEngine.so")
algo2 = smesh.CreateHypothesis("MEFISTO_2D", "libStdMeshersEngine.so")
algo1 = smesh.CreateHypothesis("Regular_1D", "StdMeshersEngine")
algo2 = smesh.CreateHypothesis("MEFISTO_2D", "StdMeshersEngine")
mesh = smesh.CreateMesh(aBox)
mesh.AddHypothesis(aBox,hyp1)

View File

@ -84,20 +84,20 @@ smesh.SetCurrentStudy(salome.myStudy)
# ---- create Hypothesis
print "-------------------------- create Hypothesis"
numberOfSegments = 4
hypNbSegA=smesh.CreateHypothesis("NumberOfSegments", "libStdMeshersEngine.so")
hypNbSegA=smesh.CreateHypothesis("NumberOfSegments", "StdMeshersEngine")
hypNbSegA.SetNumberOfSegments(numberOfSegments)
numberOfSegments = 10
hypNbSegB=smesh.CreateHypothesis("NumberOfSegments", "libStdMeshersEngine.so")
hypNbSegB=smesh.CreateHypothesis("NumberOfSegments", "StdMeshersEngine")
hypNbSegB.SetNumberOfSegments(numberOfSegments)
numberOfSegments = 15
hypNbSegC=smesh.CreateHypothesis("NumberOfSegments", "libStdMeshersEngine.so")
hypNbSegC=smesh.CreateHypothesis("NumberOfSegments", "StdMeshersEngine")
hypNbSegC.SetNumberOfSegments(numberOfSegments)
# ---- create Algorithms
print "-------------------------- create Algorithms"
regular1D=smesh.CreateHypothesis("Regular_1D", "libStdMeshersEngine.so")
quad2D=smesh.CreateHypothesis("Quadrangle_2D", "libStdMeshersEngine.so")
hexa3D=smesh.CreateHypothesis("Hexa_3D", "libStdMeshersEngine.so")
regular1D=smesh.CreateHypothesis("Regular_1D", "StdMeshersEngine")
quad2D=smesh.CreateHypothesis("Quadrangle_2D", "StdMeshersEngine")
hexa3D=smesh.CreateHypothesis("Hexa_3D", "StdMeshersEngine")
# ---- init a Mesh with the geom shape
shape_mesh = blob

View File

@ -140,7 +140,7 @@ print "-------------------------- NumberOfSegments"
numberOfSegment = 10
hypNbSeg = smesh.CreateHypothesis( "NumberOfSegments", "libStdMeshersEngine.so" )
hypNbSeg = smesh.CreateHypothesis( "NumberOfSegments", "StdMeshersEngine" )
hypNbSeg.SetNumberOfSegments( numberOfSegment )
print hypNbSeg.GetName()
print hypNbSeg.GetId()
@ -152,7 +152,7 @@ print "-------------------------- MaxElementArea"
maxElementArea = 25
hypArea25 = smesh.CreateHypothesis( "MaxElementArea", "libStdMeshersEngine.so" )
hypArea25 = smesh.CreateHypothesis( "MaxElementArea", "StdMeshersEngine" )
hypArea25.SetMaxElementArea( maxElementArea )
print hypArea25.GetName()
print hypArea25.GetId()
@ -164,7 +164,7 @@ print "-------------------------- MaxElementArea"
maxElementArea = 35
hypArea35 = smesh.CreateHypothesis( "MaxElementArea", "libStdMeshersEngine.so" )
hypArea35 = smesh.CreateHypothesis( "MaxElementArea", "StdMeshersEngine" )
hypArea35.SetMaxElementArea( maxElementArea )
print hypArea35.GetName()
print hypArea35.GetId()
@ -174,7 +174,7 @@ smeshgui.SetName(salome.ObjectToID(hypArea35), "MaxElementArea_35")
print "-------------------------- Regular_1D"
algoReg1D = smesh.CreateHypothesis( "Regular_1D", "libStdMeshersEngine.so" )
algoReg1D = smesh.CreateHypothesis( "Regular_1D", "StdMeshersEngine" )
listHyp = algoReg1D.GetCompatibleHypothesis()
for hyp in listHyp:
print hyp
@ -185,7 +185,7 @@ smeshgui.SetName(salome.ObjectToID(algoReg1D), "Regular_1D")
print "-------------------------- MEFISTO_2D"
algoMef = smesh.CreateHypothesis( "MEFISTO_2D", "libStdMeshersEngine.so" )
algoMef = smesh.CreateHypothesis( "MEFISTO_2D", "StdMeshersEngine" )
listHyp = algoMef.GetCompatibleHypothesis()
for hyp in listHyp:
print hyp
@ -196,7 +196,7 @@ smeshgui.SetName(salome.ObjectToID(algoMef), "MEFISTO_2D")
print "-------------------------- SMESH_Quadrangle_2D"
algoQuad = smesh.CreateHypothesis( "Quadrangle_2D", "libStdMeshersEngine.so" )
algoQuad = smesh.CreateHypothesis( "Quadrangle_2D", "StdMeshersEngine" )
listHyp = algoQuad.GetCompatibleHypothesis()
for hyp in listHyp:
print hyp

View File

@ -142,7 +142,7 @@ print "-------------------------- NumberOfSegments"
numberOfSegment = 10
hypNbSeg = smesh.CreateHypothesis( "NumberOfSegments", "libStdMeshersEngine.so" )
hypNbSeg = smesh.CreateHypothesis( "NumberOfSegments", "StdMeshersEngine" )
hypNbSeg.SetNumberOfSegments( numberOfSegment )
print hypNbSeg.GetName()
print hypNbSeg.GetId()
@ -154,7 +154,7 @@ print "-------------------------- MaxElementArea"
maxElementArea = 25
hypArea25 = smesh.CreateHypothesis( "MaxElementArea", "libStdMeshersEngine.so" )
hypArea25 = smesh.CreateHypothesis( "MaxElementArea", "StdMeshersEngine" )
hypArea25.SetMaxElementArea( maxElementArea )
print hypArea25.GetName()
print hypArea25.GetId()
@ -166,7 +166,7 @@ print "-------------------------- MaxElementArea"
maxElementArea = 35
hypArea35 = smesh.CreateHypothesis( "MaxElementArea", "libStdMeshersEngine.so" )
hypArea35 = smesh.CreateHypothesis( "MaxElementArea", "StdMeshersEngine" )
hypArea35.SetMaxElementArea( maxElementArea )
print hypArea35.GetName()
print hypArea35.GetId()
@ -176,7 +176,7 @@ smeshgui.SetName(salome.ObjectToID(hypArea35), "MaxElementArea_35")
print "-------------------------- Regular_1D"
algoReg1D = smesh.CreateHypothesis( "Regular_1D", "libStdMeshersEngine.so" )
algoReg1D = smesh.CreateHypothesis( "Regular_1D", "StdMeshersEngine" )
listHyp = algoReg1D.GetCompatibleHypothesis()
for hyp in listHyp:
print hyp
@ -187,7 +187,7 @@ smeshgui.SetName(salome.ObjectToID(algoReg1D), "Regular_1D")
print "-------------------------- MEFISTO_2D"
algoMef = smesh.CreateHypothesis( "MEFISTO_2D", "libStdMeshersEngine.so" )
algoMef = smesh.CreateHypothesis( "MEFISTO_2D", "StdMeshersEngine" )
listHyp = algoMef.GetCompatibleHypothesis()
for hyp in listHyp:
print hyp
@ -198,7 +198,7 @@ smeshgui.SetName(salome.ObjectToID(algoMef), "MEFISTO_2D")
print "-------------------------- SMESH_Quadrangle_2D"
algoQuad = smesh.CreateHypothesis( "Quadrangle_2D", "libStdMeshersEngine.so" )
algoQuad = smesh.CreateHypothesis( "Quadrangle_2D", "StdMeshersEngine" )
listHyp = algoQuad.GetCompatibleHypothesis()
for hyp in listHyp:
print hyp

View File

@ -115,7 +115,7 @@ print "-------------------------- NumberOfSegments"
numberOfSegment = 10
hypNbSeg = smesh.CreateHypothesis( "NumberOfSegments", "libStdMeshersEngine.so" )
hypNbSeg = smesh.CreateHypothesis( "NumberOfSegments", "StdMeshersEngine" )
hypNbSeg.SetNumberOfSegments( numberOfSegment )
print hypNbSeg.GetName()
print hypNbSeg.GetId()
@ -127,7 +127,7 @@ print "-------------------------- MaxElementArea"
maxElementArea = 20
hypArea = smesh.CreateHypothesis( "MaxElementArea", "libStdMeshersEngine.so" )
hypArea = smesh.CreateHypothesis( "MaxElementArea", "StdMeshersEngine" )
hypArea.SetMaxElementArea( maxElementArea )
print hypArea.GetName()
print hypArea.GetId()
@ -139,7 +139,7 @@ print "-------------------------- MaxElementVolume"
maxElementVolume = 20
hypVolume = smesh.CreateHypothesis( "MaxElementVolume", "libStdMeshersEngine.so" )
hypVolume = smesh.CreateHypothesis( "MaxElementVolume", "StdMeshersEngine" )
hypVolume.SetMaxElementVolume( maxElementVolume )
print hypVolume.GetName()
print hypVolume.GetId()
@ -149,7 +149,7 @@ smeshgui.SetName(salome.ObjectToID(hypVolume), "MaxElementVolume_20")
print "-------------------------- Regular_1D"
algoReg1D = smesh.CreateHypothesis( "Regular_1D", "libStdMeshersEngine.so" )
algoReg1D = smesh.CreateHypothesis( "Regular_1D", "StdMeshersEngine" )
listHyp =algoReg1D.GetCompatibleHypothesis()
for hyp in listHyp:
print hyp
@ -160,7 +160,7 @@ smeshgui.SetName(salome.ObjectToID(algoReg1D), "Regular_1D")
print "-------------------------- MEFISTO_2D"
algoMef = smesh.CreateHypothesis( "MEFISTO_2D", "libStdMeshersEngine.so" )
algoMef = smesh.CreateHypothesis( "MEFISTO_2D", "StdMeshersEngine" )
listHyp = algoMef.GetCompatibleHypothesis()
for hyp in listHyp:
print hyp

View File

@ -63,7 +63,7 @@ smeshgui.Init(salome.myStudyId)
print "-------------------------- create Hypothesis"
print "-------------------------- LocalLength"
hypLen1 = smesh.CreateHypothesis("LocalLength", "libStdMeshersEngine.so")
hypLen1 = smesh.CreateHypothesis("LocalLength", "StdMeshersEngine")
hypLen1.SetLength(100)
print hypLen1.GetName()
print hypLen1.GetId()
@ -74,7 +74,7 @@ smeshgui.SetName(idlength, "Local_Length_100");
hypNbSeg = []
print "-------------------------- NumberOfSegments"
hypNbSeg1 = smesh.CreateHypothesis("NumberOfSegments", "libStdMeshersEngine.so")
hypNbSeg1 = smesh.CreateHypothesis("NumberOfSegments", "StdMeshersEngine")
hypNbSeg1.SetDistrType(0)
hypNbSeg1.SetNumberOfSegments(7)
print hypNbSeg1.GetName()
@ -84,7 +84,7 @@ idseg1 = salome.ObjectToID(hypNbSeg1)
smeshgui.SetName(idseg1, "NumberOfSegmentsReg");
hypNbSeg.append(hypNbSeg1)
hypNbSeg2 = smesh.CreateHypothesis("NumberOfSegments", "libStdMeshersEngine.so")
hypNbSeg2 = smesh.CreateHypothesis("NumberOfSegments", "StdMeshersEngine")
hypNbSeg2.SetDistrType(1)
hypNbSeg2.SetNumberOfSegments(7)
hypNbSeg2.SetScaleFactor(2)
@ -95,7 +95,7 @@ idseg2 = salome.ObjectToID(hypNbSeg2)
smeshgui.SetName(idseg2, "NumberOfSegmentsScale");
hypNbSeg.append(hypNbSeg2)
hypNbSeg3 = smesh.CreateHypothesis("NumberOfSegments", "libStdMeshersEngine.so")
hypNbSeg3 = smesh.CreateHypothesis("NumberOfSegments", "StdMeshersEngine")
hypNbSeg3.SetDistrType(2)
hypNbSeg3.SetNumberOfSegments(7)
hypNbSeg3.SetTableFunction( [0, 0.1, 0.5, 1.0, 1.0, 0.1] )
@ -107,7 +107,7 @@ idseg3 = salome.ObjectToID(hypNbSeg3)
smeshgui.SetName(idseg3, "NumberOfSegmentsTable");
hypNbSeg.append(hypNbSeg3)
hypNbSeg4 = smesh.CreateHypothesis("NumberOfSegments", "libStdMeshersEngine.so")
hypNbSeg4 = smesh.CreateHypothesis("NumberOfSegments", "StdMeshersEngine")
hypNbSeg4.SetDistrType(3)
hypNbSeg4.SetNumberOfSegments(10)
hypNbSeg4.SetExpressionFunction("sin(3*t)")
@ -120,7 +120,7 @@ smeshgui.SetName(idseg4, "NumberOfSegmentsExpr");
hypNbSeg.append(hypNbSeg4)
print "-------------------------- MaxElementArea"
hypArea1 = smesh.CreateHypothesis("MaxElementArea", "libStdMeshersEngine.so")
hypArea1 = smesh.CreateHypothesis("MaxElementArea", "StdMeshersEngine")
hypArea1.SetMaxElementArea(2500)
print hypArea1.GetName()
print hypArea1.GetId()
@ -130,7 +130,7 @@ idarea1 = salome.ObjectToID(hypArea1)
smeshgui.SetName(idarea1, "MaxElementArea_2500");
print "-------------------------- MaxElementArea"
hypArea2 = smesh.CreateHypothesis("MaxElementArea", "libStdMeshersEngine.so")
hypArea2 = smesh.CreateHypothesis("MaxElementArea", "StdMeshersEngine")
hypArea2.SetMaxElementArea(500)
print hypArea2.GetName()
print hypArea2.GetId()
@ -140,7 +140,7 @@ idarea2 = salome.ObjectToID(hypArea2)
smeshgui.SetName(idarea2, "MaxElementArea_500");
print "-------------------------- Regular_1D"
algoReg = smesh.CreateHypothesis("Regular_1D", "libStdMeshersEngine.so")
algoReg = smesh.CreateHypothesis("Regular_1D", "StdMeshersEngine")
listHyp = algoReg.GetCompatibleHypothesis()
for hyp in listHyp:
print hyp
@ -151,7 +151,7 @@ idreg = salome.ObjectToID(algoReg)
smeshgui.SetName(idreg, "Regular_1D");
print "-------------------------- MEFISTO_2D"
algoMef = smesh.CreateHypothesis("MEFISTO_2D", "libStdMeshersEngine.so")
algoMef = smesh.CreateHypothesis("MEFISTO_2D", "StdMeshersEngine")
listHyp = algoMef.GetCompatibleHypothesis()
for hyp in listHyp:
print hyp

View File

@ -66,7 +66,7 @@ print "-------------------------- create Hypothesis"
print "-------------------------- LocalLength"
hypo1 = gen.CreateHypothesis("LocalLength", "libStdMeshersEngine.so")
hypo1 = gen.CreateHypothesis("LocalLength", "StdMeshersEngine")
print hypo1.GetName()
print hypo1.GetId()
print hypo1.GetLength()
@ -79,7 +79,7 @@ hyp3 = gen.CreateHypothesis("bidon", "")
print "-------------------------- NumberOfSegments"
hypo3 = gen.CreateHypothesis("NumberOfSegments", "libStdMeshersEngine.so")
hypo3 = gen.CreateHypothesis("NumberOfSegments", "StdMeshersEngine")
hypo3.SetNumberOfSegments(7)
print hypo3.GetName()
print hypo3.GetNumberOfSegments()
@ -87,7 +87,7 @@ print hypo3.GetId()
print "-------------------------- MaxElementArea"
hypo4 = gen.CreateHypothesis("MaxElementArea", "libStdMeshersEngine.so")
hypo4 = gen.CreateHypothesis("MaxElementArea", "StdMeshersEngine")
hypo4.SetMaxElementArea(5000)
print hypo4.GetName()
print hypo4.GetMaxElementArea()
@ -95,7 +95,7 @@ print hypo4.GetId()
print "-------------------------- Regular_1D"
algo_1 = gen.CreateHypothesis("Regular_1D", "libStdMeshersEngine.so")
algo_1 = gen.CreateHypothesis("Regular_1D", "StdMeshersEngine")
print algo_1.GetName()
print algo_1.GetId()
listHyp = algo_1.GetCompatibleHypothesis()
@ -105,7 +105,7 @@ print algo_1.GetId()
print "-------------------------- MEFISTO_2D"
algo_2 = gen.CreateHypothesis("MEFISTO_2D", "libStdMeshersEngine.so")
algo_2 = gen.CreateHypothesis("MEFISTO_2D", "StdMeshersEngine")
print algo_2.GetName()
print algo_2.GetId()
listHyp = algo_2.GetCompatibleHypothesis()

View File

@ -67,7 +67,7 @@ smeshgui.Init(salome.myStudyId)
print "-------------------------- create Hypothesis"
print "-------------------------- LocalLength"
hypLen1 = smesh.CreateHypothesis("LocalLength", "libStdMeshersEngine.so")
hypLen1 = smesh.CreateHypothesis("LocalLength", "StdMeshersEngine")
hypLen1.SetLength(100)
print hypLen1.GetName()
print hypLen1.GetId()
@ -77,7 +77,7 @@ idlength = salome.ObjectToID(hypLen1)
smeshgui.SetName(idlength, "Local_Length_100");
print "-------------------------- NumberOfSegments"
hypNbSeg1 = smesh.CreateHypothesis("NumberOfSegments", "libStdMeshersEngine.so")
hypNbSeg1 = smesh.CreateHypothesis("NumberOfSegments", "StdMeshersEngine")
hypNbSeg1.SetNumberOfSegments(7)
print hypNbSeg1.GetName()
print hypNbSeg1.GetId()
@ -87,7 +87,7 @@ idseg = salome.ObjectToID(hypNbSeg1)
smeshgui.SetName(idseg, "NumberOfSegments_7");
print "-------------------------- MaxElementArea"
hypArea1 = smesh.CreateHypothesis("MaxElementArea", "libStdMeshersEngine.so")
hypArea1 = smesh.CreateHypothesis("MaxElementArea", "StdMeshersEngine")
hypArea1.SetMaxElementArea(2500)
print hypArea1.GetName()
print hypArea1.GetId()
@ -97,7 +97,7 @@ idarea1 = salome.ObjectToID(hypArea1)
smeshgui.SetName(idarea1, "MaxElementArea_2500");
print "-------------------------- MaxElementArea"
hypArea2 = smesh.CreateHypothesis("MaxElementArea", "libStdMeshersEngine.so")
hypArea2 = smesh.CreateHypothesis("MaxElementArea", "StdMeshersEngine")
hypArea2.SetMaxElementArea(500)
print hypArea2.GetName()
print hypArea2.GetId()
@ -107,7 +107,7 @@ idarea2 = salome.ObjectToID(hypArea2)
smeshgui.SetName(idarea2, "MaxElementArea_500");
print "-------------------------- Regular_1D"
algoReg = smesh.CreateHypothesis("Regular_1D", "libStdMeshersEngine.so")
algoReg = smesh.CreateHypothesis("Regular_1D", "StdMeshersEngine")
listHyp = algoReg.GetCompatibleHypothesis()
for hyp in listHyp:
print hyp
@ -118,7 +118,7 @@ idreg = salome.ObjectToID(algoReg)
smeshgui.SetName(idreg, "Regular_1D");
print "-------------------------- MEFISTO_2D"
algoMef = smesh.CreateHypothesis("MEFISTO_2D", "libStdMeshersEngine.so")
algoMef = smesh.CreateHypothesis("MEFISTO_2D", "StdMeshersEngine")
listHyp = algoMef.GetCompatibleHypothesis()
for hyp in listHyp:
print hyp

View File

@ -17,15 +17,15 @@ idface = geompy.addToStudyInFather(box, face, name)
box = salome.IDToObject(idbox)
face = salome.IDToObject(idface)
hyp1 = smesh.CreateHypothesis("NumberOfSegments", "libStdMeshersEngine.so")
hyp1 = smesh.CreateHypothesis("NumberOfSegments", "StdMeshersEngine")
hyp1.SetNumberOfSegments(10)
hyp2 = smesh.CreateHypothesis("MaxElementArea", "libStdMeshersEngine.so")
hyp2 = smesh.CreateHypothesis("MaxElementArea", "StdMeshersEngine")
hyp2.SetMaxElementArea(10)
hyp3 = smesh.CreateHypothesis("MaxElementArea", "libStdMeshersEngine.so")
hyp3 = smesh.CreateHypothesis("MaxElementArea", "StdMeshersEngine")
hyp3.SetMaxElementArea(100)
algo1 = smesh.CreateHypothesis("Regular_1D", "libStdMeshersEngine.so")
algo2 = smesh.CreateHypothesis("MEFISTO_2D", "libStdMeshersEngine.so")
algo1 = smesh.CreateHypothesis("Regular_1D", "StdMeshersEngine")
algo2 = smesh.CreateHypothesis("MEFISTO_2D", "StdMeshersEngine")
mesh = smesh.CreateMesh(box)
mesh.AddHypothesis(box,hyp1)

View File

@ -34,7 +34,7 @@ def CreateMesh (theFileName, area, len = None, nbseg = None):
print "-------------------------- create Hypothesis"
if (len is not None):
print "-------------------------- LocalLength"
hypLength1 = smesh.CreateHypothesis("LocalLength", "libStdMeshersEngine.so")
hypLength1 = smesh.CreateHypothesis("LocalLength", "StdMeshersEngine")
hypLength1.SetLength(len)
print "Hypothesis type : ", hypLength1.GetName()
print "Hypothesis ID : ", hypLength1.GetId()
@ -42,7 +42,7 @@ def CreateMesh (theFileName, area, len = None, nbseg = None):
if (nbseg is not None):
print "-------------------------- NumberOfSegments"
hypNbSeg1 = smesh.CreateHypothesis("NumberOfSegments", "libStdMeshersEngine.so")
hypNbSeg1 = smesh.CreateHypothesis("NumberOfSegments", "StdMeshersEngine")
hypNbSeg1.SetNumberOfSegments(nbseg)
print "Hypothesis type : ", hypNbSeg1.GetName()
print "Hypothesis ID : ", hypNbSeg1.GetId()
@ -50,7 +50,7 @@ def CreateMesh (theFileName, area, len = None, nbseg = None):
if (area == "LengthFromEdges"):
print "-------------------------- LengthFromEdges"
hypLengthFromEdges = smesh.CreateHypothesis("LengthFromEdges", "libStdMeshersEngine.so")
hypLengthFromEdges = smesh.CreateHypothesis("LengthFromEdges", "StdMeshersEngine")
hypLengthFromEdges.SetMode(1)
print "Hypothesis type : ", hypLengthFromEdges.GetName()
print "Hypothesis ID : ", hypLengthFromEdges.GetId()
@ -58,7 +58,7 @@ def CreateMesh (theFileName, area, len = None, nbseg = None):
else:
print "-------------------------- MaxElementArea"
hypArea1 = smesh.CreateHypothesis("MaxElementArea", "libStdMeshersEngine.so")
hypArea1 = smesh.CreateHypothesis("MaxElementArea", "StdMeshersEngine")
hypArea1.SetMaxElementArea(area)
print "Hypothesis type : ", hypArea1.GetName()
print "Hypothesis ID : ", hypArea1.GetId()
@ -66,7 +66,7 @@ def CreateMesh (theFileName, area, len = None, nbseg = None):
print "-------------------------- Regular_1D"
algoReg = smesh.CreateHypothesis("Regular_1D", "libStdMeshersEngine.so")
algoReg = smesh.CreateHypothesis("Regular_1D", "StdMeshersEngine")
listHyp = algoReg.GetCompatibleHypothesis()
for hyp in listHyp:
@ -76,7 +76,7 @@ def CreateMesh (theFileName, area, len = None, nbseg = None):
print "Algo ID : ", algoReg.GetId()
print "-------------------------- MEFISTO_2D"
algoMef = smesh.CreateHypothesis("MEFISTO_2D", "libStdMeshersEngine.so")
algoMef = smesh.CreateHypothesis("MEFISTO_2D", "StdMeshersEngine")
listHyp = algoMef.GetCompatibleHypothesis()
for hyp in listHyp:

View File

@ -92,7 +92,7 @@ class Mesh_Algorithm:
"""
return self.algo
def Create(self, mesh, geom, hypo, so="libStdMeshersEngine.so"):
def Create(self, mesh, geom, hypo, so="StdMeshersEngine"):
"""
Private method
"""
@ -113,7 +113,7 @@ class Mesh_Algorithm:
SetName(self.algo, name + "/" + hypo)
mesh.mesh.AddHypothesis(self.geom, self.algo)
def Hypothesis(self, hyp, args=[], so="libStdMeshersEngine.so"):
def Hypothesis(self, hyp, args=[], so="StdMeshersEngine"):
"""
Private method
"""