]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
Improve crossplatform library name of plugin
authorabd <abd@opencascade.com>
Tue, 25 Apr 2006 12:56:28 +0000 (12:56 +0000)
committerabd <abd@opencascade.com>
Tue, 25 Apr 2006 12:56:28 +0000 (12:56 +0000)
26 files changed:
src/SMESHGUI/SMESHGUI_XmlHandler.cxx
src/SMESH_I/SMESH_Gen_i.cxx
src/SMESH_SWIG/PAL_MESH_041_mesh.py
src/SMESH_SWIG/PAL_MESH_043_2D.py
src/SMESH_SWIG/PAL_MESH_043_3D.py
src/SMESH_SWIG/SMESH_Nut.py
src/SMESH_SWIG/SMESH_Partition1_tetra.py
src/SMESH_SWIG/SMESH_box.py
src/SMESH_SWIG/SMESH_box2_tetra.py
src/SMESH_SWIG/SMESH_box3_tetra.py
src/SMESH_SWIG/SMESH_box_tetra.py
src/SMESH_SWIG/SMESH_demo_hexa2_upd.py
src/SMESH_SWIG/SMESH_fixation_hexa.py
src/SMESH_SWIG/SMESH_fixation_tetra.py
src/SMESH_SWIG/SMESH_flight_skin.py
src/SMESH_SWIG/SMESH_freebord.py
src/SMESH_SWIG/SMESH_hexaedre.py
src/SMESH_SWIG/SMESH_mechanic.py
src/SMESH_SWIG/SMESH_mechanic_editor.py
src/SMESH_SWIG/SMESH_mechanic_tetra.py
src/SMESH_SWIG/SMESH_reg.py
src/SMESH_SWIG/SMESH_test.py
src/SMESH_SWIG/SMESH_test1.py
src/SMESH_SWIG/SMESH_test4.py
src/SMESH_SWIG/batchmode_mefisto.py
src/SMESH_SWIG/smesh.py

index d6d875e75a29cfaaaa449b57c1e07bb52a6fa58c..dfd448576d3116a9f724bea80afb76b95cd242f0 100644 (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
 
index 96f436a2b07c837987357685141869939b19fdf3..420ce7a7c5c4cd2816ae8f39f63ab029db82d68e 100644 (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,20 +382,23 @@ 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();
 
   // activate the CORBA servant of hypothesis
   hypothesis_i = SMESH::SMESH_Hypothesis::_narrow( myHypothesis_i->_this() );
   int nextId = RegisterObject( hypothesis_i );
-  if(MYDEBUG) MESSAGE( "Add hypo to map with id = "<< nextId );
+  if(MYDEBUG) MESSAGE( "Add hypo to map with id = "<< nextId );  
 
   return hypothesis_i._retn();
 }
index 8585c9f6f3ff96ef956720845df0156f0576de3c..d097bcd48d8f9865ec6cb049a2d270dcc5475120 100755 (executable)
@@ -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()
index 76ab25924e38af9b17a5a0e9b8a65b280a727f1b..4cfeac36b7d93eeb944603d57f88b7f28ebfa19d 100755 (executable)
@@ -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");
 
index cfd0f45c46f1526e6139ef7afa2e7af4352b6723..73b211e8b280d2c2aaadc6777c411207a5a6eff7 100755 (executable)
@@ -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");
 
index a4f5017cfb8ca08ce3eb728e7206a6c2cb0d113d..4b2fb7a354932e3137aafb099b9d71522a4123b4 100755 (executable)
@@ -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
index e9bb55fa71641844f8b3430995bf21033116f218..c4b1b25c59e319213e9a88755854118acabd46bf 100644 (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"
index 2902c739b383fba90d3d577cbffa2f3e0c1cd9b7..5fc7f296983613e2983ddba823595f2b1f23262c 100755 (executable)
@@ -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")
  
index e8a4afd9fc77ffdcaf59a9af77d412a2f81f8d87..054c9e64aeb4419a51aa1821da383553c564bd4a 100644 (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"
index af4082774b0fd4390abd49f7e59376866933c547..9891bb9e8848f43887d6cba468b0f00fd9cc1ae0 100644 (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"
index 72b45e12b06e690f5dbb6b09718bd1b33b94ebd2..1a06cfde36a5c3e34f7344dbaccf47016313e5a5 100644 (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"
index 755214a59323c165338bc4f38a77fbb5d9d422e3..68e29918760b70fbe984d9ff3c829f714ef50a76 100755 (executable)
@@ -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
index 1845b2218b4a2c0635baf2c704330bfd92ae5898..22db40f5d33aff74f534cec4bea94bf33f710533 100644 (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")
 
index 2d588bbd909e39c6401b87bff6b9e542ebe7be12..821a3d149289cd956b053b6dafc8fcee38f342a0 100644 (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")
 
index 25a4b2d140d932f3824a1fdf435394051d7b4d24..7969df995b1619d7fc484555590da36624467bf6 100644 (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")
 
index d240a354f8429c8a20e815217d3920eaa2e47578..c6881c8250a232dca6f8ebd402aa473cb2d9a892 100644 (file)
@@ -1,66 +1,66 @@
-import salome\r
-import geompy\r
-import SMESH\r
-import StdMeshers\r
-\r
-smesh = salome.lcc.FindOrLoadComponent("FactoryServer", "SMESH")\r
-smesh.SetCurrentStudy(salome.myStudy)\r
-\r
-# Create box without one plane\r
-\r
-box = geompy.MakeBox(0., 0., 0., 10., 20., 30.)\r
-subShapeList = geompy.SubShapeAll(box, geompy.ShapeType["FACE"])\r
-\r
-FaceList  = []\r
-for i in range( 5 ):\r
-  FaceList.append( subShapeList[ i ] )\r
-\r
-aComp = geompy.MakeCompound( FaceList )\r
-aBox = geompy.Sew( aComp, 1. )\r
-idbox = geompy.addToStudy( aBox, "box" )\r
-  \r
-aBox  = salome.IDToObject( idbox )\r
-\r
-# Create mesh\r
-\r
-hyp1 = smesh.CreateHypothesis("NumberOfSegments", "libStdMeshersEngine.so")\r
-hyp1.SetNumberOfSegments(5)\r
-hyp2 = smesh.CreateHypothesis("MaxElementArea", "libStdMeshersEngine.so")\r
-hyp2.SetMaxElementArea(20)\r
-hyp3 = smesh.CreateHypothesis("MaxElementArea", "libStdMeshersEngine.so")\r
-hyp3.SetMaxElementArea(50)\r
-\r
-algo1 = smesh.CreateHypothesis("Regular_1D", "libStdMeshersEngine.so")\r
-algo2 = smesh.CreateHypothesis("MEFISTO_2D", "libStdMeshersEngine.so")\r
-\r
-mesh = smesh.CreateMesh(aBox)\r
-mesh.AddHypothesis(aBox,hyp1)\r
-mesh.AddHypothesis(aBox,hyp2)\r
-mesh.AddHypothesis(aBox,algo1)\r
-mesh.AddHypothesis(aBox,algo2)\r
-\r
-smesh.Compute(mesh,aBox)\r
-\r
-smeshgui = salome.ImportComponentGUI("SMESH")\r
-smeshgui.Init(salome.myStudyId);\r
-smeshgui.SetName( salome.ObjectToID( mesh ), "Mesh_freebord" );\r
-\r
-# Criterion : Free edges\r
-aFilterMgr = smesh.CreateFilterManager()\r
-aPredicate = aFilterMgr.CreateFreeBorders()\r
-aFilter = aFilterMgr.CreateFilter()\r
-aFilter.SetPredicate( aPredicate )\r
-\r
-anIds = aFilter.GetElementsId( mesh )\r
-\r
-# print result\r
-print "Criterion: Free edges Nb = ", len( anIds )\r
-for i in range( len( anIds ) ):\r
-  print anIds[ i ]\r
-\r
-# create group\r
-aGroup = mesh.CreateGroup( SMESH.EDGE, "Free edges" )\r
-aGroup.Add( anIds )\r
-\r
-\r
-salome.sg.updateObjBrowser(1)\r
+import salome
+import geompy
+import SMESH
+import StdMeshers
+
+smesh = salome.lcc.FindOrLoadComponent("FactoryServer", "SMESH")
+smesh.SetCurrentStudy(salome.myStudy)
+
+# Create box without one plane
+
+box = geompy.MakeBox(0., 0., 0., 10., 20., 30.)
+subShapeList = geompy.SubShapeAll(box, geompy.ShapeType["FACE"])
+
+FaceList  = []
+for i in range( 5 ):
+  FaceList.append( subShapeList[ i ] )
+
+aComp = geompy.MakeCompound( FaceList )
+aBox = geompy.Sew( aComp, 1. )
+idbox = geompy.addToStudy( aBox, "box" )
+  
+aBox  = salome.IDToObject( idbox )
+
+# Create mesh
+
+hyp1 = smesh.CreateHypothesis("NumberOfSegments", "StdMeshersEngine")
+hyp1.SetNumberOfSegments(5)
+hyp2 = smesh.CreateHypothesis("MaxElementArea", "StdMeshersEngine")
+hyp2.SetMaxElementArea(20)
+hyp3 = smesh.CreateHypothesis("MaxElementArea", "StdMeshersEngine")
+hyp3.SetMaxElementArea(50)
+
+algo1 = smesh.CreateHypothesis("Regular_1D", "StdMeshersEngine")
+algo2 = smesh.CreateHypothesis("MEFISTO_2D", "StdMeshersEngine")
+
+mesh = smesh.CreateMesh(aBox)
+mesh.AddHypothesis(aBox,hyp1)
+mesh.AddHypothesis(aBox,hyp2)
+mesh.AddHypothesis(aBox,algo1)
+mesh.AddHypothesis(aBox,algo2)
+
+smesh.Compute(mesh,aBox)
+
+smeshgui = salome.ImportComponentGUI("SMESH")
+smeshgui.Init(salome.myStudyId);
+smeshgui.SetName( salome.ObjectToID( mesh ), "Mesh_freebord" );
+
+# Criterion : Free edges
+aFilterMgr = smesh.CreateFilterManager()
+aPredicate = aFilterMgr.CreateFreeBorders()
+aFilter = aFilterMgr.CreateFilter()
+aFilter.SetPredicate( aPredicate )
+
+anIds = aFilter.GetElementsId( mesh )
+
+# print result
+print "Criterion: Free edges Nb = ", len( anIds )
+for i in range( len( anIds ) ):
+  print anIds[ i ]
+
+# create group
+aGroup = mesh.CreateGroup( SMESH.EDGE, "Free edges" )
+aGroup.Add( anIds )
+
+
+salome.sg.updateObjBrowser(1)
index 1b93e1c08fb45bf9255bdf6eb58b3d0d0bf12781..0bee28c321ce30cb4a6a39f675250cbd511a4ecf 100755 (executable)
@@ -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
index 7c1fdbd2262e99690b6b3cabf05caa81cf93e442..7beb5eecebbd42aa7c5de79eb27c1d7ec8802d3a 100644 (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
index 596786ed9a2100f485110f699a908bbb0581be05..25599d75d102838387170ca616b5ebabc772be2c 100644 (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
index eee3f87d8ab128ec8e619804077b38ac2b86e628..247cf97bccc72edf9e0b3ac3fb22f1a89ffae4d2 100644 (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
index 3a2f74ae84b11586f603aafbcb74da45d74d8693..ed5455d4453c22db409d8ba007f1432055df2cdc 100644 (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
index d2385f3a98932c0ef64cc651c9ab7571b515a77f..cdaae7eb62ae98f3a637787e915e4d0d9d996063 100644 (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()
index c0b04299a17c12f16f8f0ee4a16305325a192f1d..96792bf552839d889b55920c767605fb7302d2bb 100644 (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
index 09271b6f1c4b1ae59f73d47a673e5da5297ff1f9..fe50f9fbe11d08a17c8eb81afd1b3c236741f964 100755 (executable)
@@ -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)
index 203b1602e3e525ccd86733f9c11f91e7e94bda39..2166077f5e3629aa44c7939cd217148981caab95 100644 (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:
index fe237e511c83a47bde0b8043dce92de8526f0f28..92ccb75676aa259a73556d1c3ac0010f586d86c2 100644 (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
         """