]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
0020623: EDF 1209 SMESH: Load script/execfile add the objects in the wrong study
authordmv <dmv@opencascade.com>
Mon, 21 Dec 2009 14:26:43 +0000 (14:26 +0000)
committerdmv <dmv@opencascade.com>
Mon, 21 Dec 2009 14:26:43 +0000 (14:26 +0000)
27 files changed:
src/SMESH_SWIG/SMESH_GroupLyingOnGeom.py
src/SMESH_SWIG/SMESH_blocks.py
src/SMESH_SWIG/batchmode_smesh.py
src/SMESH_SWIG/ex01_cube2build.py
src/SMESH_SWIG/ex02_cube2primitive.py
src/SMESH_SWIG/ex03_cube2partition.py
src/SMESH_SWIG/ex04_cube5tetraHexa.py
src/SMESH_SWIG/ex05_hole1build.py
src/SMESH_SWIG/ex06_hole1boolean.py
src/SMESH_SWIG/ex07_hole1partition.py
src/SMESH_SWIG/ex08_hole2build.py
src/SMESH_SWIG/ex09_grid4build.py
src/SMESH_SWIG/ex10_grid4geometry.py
src/SMESH_SWIG/ex11_grid3partition.py
src/SMESH_SWIG/ex12_grid17partition.py
src/SMESH_SWIG/ex13_hole1partial.py
src/SMESH_SWIG/ex14_cyl1holed.py
src/SMESH_SWIG/ex15_cyl2geometry.py
src/SMESH_SWIG/ex16_cyl2complementary.py
src/SMESH_SWIG/ex17_dome1.py
src/SMESH_SWIG/ex18_dome2.py
src/SMESH_SWIG/ex19_sphereINcube.py
src/SMESH_SWIG/ex21_lamp.py
src/SMESH_SWIG/ex24_cylinder.py
src/SMESH_SWIG/ex30_groupsOp.py
src/SMESH_SWIG/ex30_tepal.py
src/SMESH_SWIG/ex31_dimGroup.py

index 816dede851bb7945cf47fe7dec125bffc936c9db..63a04efa6bc365b6eead9f738853faca7c9c0b36 100644 (file)
@@ -22,6 +22,8 @@
 #
 import smesh
 
+smesh.SetCurrentStudy(salome.myStudy)
+
 def BuildGroupLyingOn(theMesh, theElemType, theName, theShape):
     aFilterMgr = smesh.smesh.CreateFilterManager()
     aFilter = aFilterMgr.CreateFilter()
index d3e744d5fa7d16e7b583e6bebd038b031a291d41..fce550fb51253bb5423a8764e96aa3a506a9e769 100644 (file)
@@ -36,6 +36,7 @@ import GEOM_Spanner
 isBlocksTest = 0 # False
 isMeshTest   = 1 # True
 
+smesh.SetCurrentStudy(salome.myStudy)
 
 GEOM_Spanner.MakeSpanner(geompy, math, isBlocksTest, isMeshTest, smesh)
 
index eb2c4e1fe4b2a9069d1e856943eee49d52638941..04091bdc61d21d916b6350cda5c37c43cff47557 100644 (file)
@@ -33,6 +33,7 @@ import SMESH
 modulecatalog = naming_service.Resolve("/Kernel/ModulCatalog")
 
 smesh = lcc.FindOrLoadComponent("FactoryServer", "SMESH")
+smesh.SetCurrentStudy(myStudy)
 myStudyBuilder = myStudy.NewBuilder()
 
 if myStudyBuilder is None:
index 34bb6e39d575338774e82cd4fb08e9ce8a468f58..3c1da5aabeac4e0041d68e8b45f33a985201cf4e 100644 (file)
@@ -287,6 +287,8 @@ piece_id = addToStudy(piece, "ex01_cube2build")
 # Meshing
 # =======
 
+smesh.SetCurrentStudy(salome.myStudy)
+
 # Create hexahedrical mesh on piece
 # ---------------------------------
 
index 885d8722a7c5631216adeefcbcebf845aeea872e..277dfbc8a4c3cfb1db97e5cbaf9d154761d05e9c 100644 (file)
@@ -98,6 +98,8 @@ piece_id = addToStudy(piece, "ex02_cube2primitive")
 # Meshing
 # =======
 
+smesh.SetCurrentStudy(salome.myStudy)
+
 # Create hexahedrical mesh on piece
 # ---------------------------------
 
index d620a641157772221a57e63df6e3ebcf7777294c..a9d1cc9757926a754a0e88355c21d87daa5dd4cc 100644 (file)
@@ -85,6 +85,8 @@ piece_id = addToStudy(piece, "ex03_cube2partition")
 # Meshing
 # =======
 
+smesh.SetCurrentStudy(salome.myStudy)
+
 # Create hexahedrical mesh on piece
 # ---------------------------------
 
index 02f6f2c87ef5ab972060130838c686ee4a8b428d..57edb88c81a12c712fbb5e4a56af0d5f12de1179 100644 (file)
@@ -66,6 +66,8 @@ piece_id = addToStudy(piece, "ex04_cube5tetraHexa")
 # Meshing
 # =======
 
+smesh.SetCurrentStudy(salome.myStudy)
+
 # Create a hexahedral mesh
 # ------------------------
 
index 31793da2e4624562b02d769e84b50ea7040e2b28..5b3cb4ab73870bc7ddc63b17183954adc78cb658 100644 (file)
@@ -124,6 +124,8 @@ piece_id = addToStudy(piece, "ex05_hole1build")
 # Meshing
 # =======
 
+smesh.SetCurrentStudy(salome.myStudy)
+
 # Create a hexahedral mesh
 # ------------------------
 
index acdc7f5e9925d37b34c2e2de4711167db8599a16..ee62820fb9e7dc9d462fca0532ba1ca3c62a78cd 100644 (file)
@@ -118,6 +118,8 @@ piece_id = addToStudy(piece, "ex06_hole1boolean")
 # Meshing
 # =======
 
+smesh.SetCurrentStudy(salome.myStudy)
+
 # Create a hexahedral mesh
 # ------------------------
 
index 4ca5c481db38baecb5723a2def372813e21981fa..ab55f37eed9ffdbbba2b31a83e93aed0280fed84 100644 (file)
@@ -82,6 +82,8 @@ piece_id = addToStudy(piece, "ex07_hole1partition")
 # Meshing
 # =======
 
+smesh.SetCurrentStudy(salome.myStudy)
+
 # Create a hexahedral mesh
 # ------------------------
 
index cb417562eee9f62a24428454c4e4cee694e38e05..af46cb5759e1349d9ccf67d484bacf63cdfd8221 100644 (file)
@@ -115,6 +115,8 @@ piece_id = addToStudy(piece, "ex08_hole2build")
 # Meshing
 # =======
 
+smesh.SetCurrentStudy(salome.myStudy)
+
 # Create a hexahedral mesh
 # ------------------------
 
index 4fd9c6db21644888051ff2f68ef80410ff7ff5cc..9d51821f64d45c6639ddd60290f23be1f9b0dcf8 100644 (file)
@@ -118,6 +118,8 @@ piece_id = addToStudy(piece, "ex09_grid4build")
 # Meshing
 # =======
 
+smesh.SetCurrentStudy(salome.myStudy)
+
 # Create a hexahedral mesh
 # ------------------------
 
index f9a8c399b4d77eeb70eaa55d00444fb0c13aba12..2e244e7c42e2ffe99e7df8999f823ce24b1490a8 100644 (file)
@@ -80,6 +80,8 @@ piece_id = addToStudy(piece, "ex10_grid4geometry")
 # Meshing
 # =======
 
+smesh.SetCurrentStudy(salome.myStudy)
+
 # Create a hexahedral mesh
 # ------------------------
 
index 1ed38c03b3d3f122b9f67d3ab0d2fe557952715f..71e88a7ed43336d304f696c6e5377700e4f90d4f 100644 (file)
@@ -101,6 +101,8 @@ piece_id = addToStudy(piece, "ex11_grid3partition")
 # Meshing
 # =======
 
+smesh.SetCurrentStudy(salome.myStudy)
+
 # Create a hexahedral mesh
 # ------------------------
 
index 3499a3e0bba07f47fa429b886b360bba4dca6e82..ca95b25de24992f8733ff130bb628fa9eca390d8 100644 (file)
@@ -116,6 +116,8 @@ piece_id = addToStudy(piece, "ex12_grid17partition")
 # Meshing
 # =======
 
+smesh.SetCurrentStudy(salome.myStudy)
+
 # Create a hexahedral mesh
 # ------------------------
 
index 609f48052624f0f3fe03305f3c491bb5e87793e1..24c12090df0b0a6e860d69307381fc15981ed70e 100644 (file)
@@ -214,6 +214,8 @@ piece_id = addToStudy(piece, "ex13_hole1partial")
 # Meshing
 # =======
 
+smesh.SetCurrentStudy(salome.myStudy)
+
 # Create a mesh
 # -------------
 
index 1c89971fce38dda2a87df88b3de05938d7a10a46..e01d6ac1a17efcfaa9ec6ef7a46fcca27021df1c 100644 (file)
@@ -99,6 +99,8 @@ piece_id = addToStudy(piece, "ex14_cyl1holed")
 # Maillage
 # ========
 
+smesh.SetCurrentStudy(salome.myStudy)
+
 # Creer un maillage hexahedrique
 # ------------------------------
 
index 72a0a4b92594e33d95f52c9482e3ce719826e012..418b1cb1eaaee5c28a9b69078c300b32c25986a1 100644 (file)
@@ -178,6 +178,8 @@ piece_id = addToStudy(piece, "ex15_cyl2geometry")
 # Meshing
 # =======
 
+smesh.SetCurrentStudy(salome.myStudy)
+
 # Create a hexahedral mesh
 # ------------------------
 
index 4a3adf337077e044acd5b5d10c867914c44580dc..c67af2395943e473f0216de1d9ba7f98c889aa81 100644 (file)
@@ -108,6 +108,8 @@ piece_id = addToStudy(piece, "ex16_cyl2complementary")
 # Meshing
 # =======
 
+smesh.SetCurrentStudy(salome.myStudy)
+
 # Create a hexahedral mesh
 # ------------------------
 
index c94136b20e309192a0b8717918bf7968908488fd..efa10ae09afa7428d384d370ad27a7eabd564278 100644 (file)
@@ -81,6 +81,8 @@ piece_id = addToStudy(piece, "ex17_dome1")
 # Maillage
 # ========
 
+smesh.SetCurrentStudy(salome.myStudy)
+
 # Maillage hexahedrique
 # ---------------------
 
index fc78722d7096d00943b9b2ab9f1608c32d4ed862..85df8ffe49b459b0a4acd6cf19f803313e4eeae0 100644 (file)
@@ -118,6 +118,8 @@ piece_id = addToStudy(piece, "ex18_dome2")
 # Maillage
 # ========
 
+smesh.SetCurrentStudy(salome.myStudy)
+
 # Maillage hexahedrique
 # ---------------------
 
index 53b6e2ae64e2b663fe9a4e183250ac186d5e4ebe..9aa839289238ee238d1571586fd129cdfdeebddb 100644 (file)
@@ -168,6 +168,8 @@ UnionList(groupe, groupe_sphere)
 # Meshing
 # =======
 
+smesh.SetCurrentStudy(salome.myStudy)
+
 # Create a hexahedral mesh
 # ------------------------
 
index b7a511d4d113c73d94e9b8ea2b158c80653d9ee1..c92b77eb15d5cd88c9142726fa60a0e71f7d4434 100644 (file)
@@ -93,6 +93,8 @@ UnionIDs(group, faces)
 # Create a mesh
 # =============
 
+smesh.SetCurrentStudy(salome.myStudy)
+
 # Define a mesh on a geometry
 # ---------------------------
 
index 2e7b52d821c0cddd52ecd42b626d40de57f9e5e1..22f363a1835f25fd828c337f63ab2abb060a9c10 100644 (file)
@@ -98,6 +98,8 @@ geo.DifferenceList(group_1, [group_1_box])
 # Mesh the blocks with hexahedral
 # -------------------------------
 
+smesh.SetCurrentStudy(salome.myStudy)
+
 def discretize(x, y, z,  n, s=blocks):
     p = geo.MakeVertex(x, y, z)
     e = geo.GetEdgeNearPoint(s, p)
index f1a857d9a1cb620394450554ac7bdbb66510fa79..9842e0b97316f9cfded0c89050784b8a5b7d3fb8 100755 (executable)
@@ -16,7 +16,7 @@ global Face_1
 Face_1 = geompy.MakeFaceHW(100, 100, 1)
 geompy.addToStudy( Face_1, "Face_1" )
 
-#smesh.smesh.SetCurrentStudy(aStudyId)
+smesh.SetCurrentStudy(salome.myStudy)
 import StdMeshers
 pattern = smesh.GetPattern()
 Mesh_1 = smesh.Mesh(Face_1)
index 61a0350225bdeaf088d53e8ed66c8c071e3ed309..1a3d7755e9ffd97d450115232a90f73e4acebc52 100644 (file)
@@ -28,6 +28,8 @@ geompy.addToStudy(cylinder, "Cylinder")
 # Define a mesh on a geometry
 # ---------------------------
 
+smesh.SetCurrentStudy(salome.myStudy)
+
 m = smesh.Mesh(cylinder)
 
 # 2D mesh with BLSURF
index 7f4600d3ff3e1bf52ebb33c4f878dcc1cd7e1657..149271fc02b40593e371960a0568686de01b77da 100755 (executable)
@@ -18,7 +18,7 @@ global Box_1
 Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
 geompy.addToStudy( Box_1, "Box_1" )
 
-#smesh.smesh.SetCurrentStudy(theStudy)
+smesh.SetCurrentStudy(salome.myStudy)
 import StdMeshers
 Mesh_1 = smesh.Mesh(Box_1)
 Regular_1D = Mesh_1.Segment()