]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
0020623: EDF 1209 SMESH: Load script/execfile add the objects in the wrong study
authoreap <eap@opencascade.com>
Mon, 21 Dec 2009 08:24:08 +0000 (08:24 +0000)
committereap <eap@opencascade.com>
Mon, 21 Dec 2009 08:24:08 +0000 (08:24 +0000)
  set current study to SMESH_Gen

29 files changed:
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_AdvancedEditor.py
src/SMESH_SWIG/SMESH_BuildCompound.py
src/SMESH_SWIG/SMESH_Nut.py
src/SMESH_SWIG/SMESH_Partition1_tetra.py
src/SMESH_SWIG/SMESH_Sphere.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_netgen.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_netgen.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_test1_AndDisplay.py
src/SMESH_SWIG/SMESH_test4.py
src/SMESH_SWIG/SMESH_test5.py

index 523429d2bb29020c24975a83d8eb2d0f71e319db..66252f223c022911e2e9abf4646f22f8954f1699 100755 (executable)
@@ -54,7 +54,7 @@ Id_face1 = geompy.addToStudy(face1,"Face1")
 
 
 #-----------------------------SMESH-------------------------------------------
-
+smesh.SetCurrentStudy(salome.myStudy)
 
 # -- Init mesh --
 plane_mesh = salome.IDToObject( Id_face1)
index 35bd54cda299820577daf6364117a23922372b1d..85fa92589c47e8cc6aebe761502237998d36e44d 100755 (executable)
@@ -52,6 +52,7 @@ id_ellipse2 = geompy.addToStudy(ellipse2, "Ellips 2")
 
 
 #---------------------------------SMESH
+smesh.SetCurrentStudy(salome.myStudy)
 
 # create the path mesh
 mesh1 = smesh.Mesh(ellipse1, "Path Mesh")
index bc4e115f035d5c9aa41d07c751870b60b226dd00..009ca3991f29168490320f42e76b6d9fbdb06655 100755 (executable)
@@ -50,6 +50,7 @@ idcircle = geompy.addToStudy(circle, "Circle")
 idface   = geompy.addToStudy(face,   "Circular face")
 
 
+smesh.SetCurrentStudy(salome.myStudy)
 
 # init a Mesh with the circular face
 mesh1 = smesh.Mesh(face, "Mesh on circular face")
index a480d029f261ad09da17a8781f6c896771755877..561f1dc52495bb1c16b7e1273f98b51398b016e3 100644 (file)
@@ -51,7 +51,8 @@ def GetNewNodes(mesh,Elems,OldNodes):
         pass
     return newnodes
             
-    
+smesh.SetCurrentStudy(salome.myStudy)
+
 # create empty mesh
 mesh = smesh.Mesh()
 
index e82abfa409e4d1b0d198e0206993a0110c7481b7..0f92cda70d916ac26c8317174ff2c61b09a88b6b 100644 (file)
@@ -61,6 +61,8 @@ geompy.addToStudy(Box_sup, "Box_sup")
 geompy.addToStudyInFather(Box_sup, Fsup2, "Fsup")
 geompy.addToStudyInFather(Box_sup, Finf2, "Finf")
 
+smesh.SetCurrentStudy(salome.myStudy)
+
 ## create a bottom mesh
 Mesh_inf = smesh.Mesh(Box_inf, "Mesh_inf")
 algo1D_1=Mesh_inf.Segment()
index 11428f8c5d0d5e8a6c296e18d782e99155762801..ff0df1683f1e22d4aaa38e02a59b2f1090e79c6d 100755 (executable)
@@ -97,6 +97,8 @@ Cut_1_ID = geompy.addToStudy(Cut_1, "Cut_1")
 
 #Mesh creation
 
+smesh.SetCurrentStudy(salome.myStudy)
+
 # -- Init --
 shape_mesh = salome.IDToObject( Cut_1_ID )
 
index e3af5d2d1fbd5d70ffc99c3f0541d909d20112fb..5c282584617a903e4a928b4f46f29c417221a135 100644 (file)
@@ -119,6 +119,7 @@ status = geompy.CheckShape(alveole)
 print " check status ", status
 
 # ---- launch SMESH
+smesh.SetCurrentStudy(salome.myStudy)
 
 # ---- init a Mesh with the alveole
 shape_mesh = salome.IDToObject( idalveole )
index 3b1ca2e79b8a6f9c851d7ed6fa6c694237c3f9cc..e79f5eaf643cf4e35167591e1a82de51ccfb2523 100644 (file)
@@ -103,6 +103,7 @@ Id_Result      = addToStudy(Result, "Result")
 
 #-----------------------------------------------------------------------
 #Meshing
+smesh.SetCurrentStudy(salome.myStudy)
 my_hexa = smesh.Mesh(Result, "Sphere_Mesh")
 algo = my_hexa.Segment()
 algo.NumberOfSegments(NbSeg)
index 8a1b39cacc6f50009785eee6dcc898806d438e84..6e034aca07c591f0b605de86f6ed97dc5b848d44 100755 (executable)
@@ -47,6 +47,7 @@ box    = geompy.MakeBox(0.,0.,0.,1.,1.,1.)
 boxId  = geompy.addToStudy(box,"box")
 
 # ---- SMESH
+smesh.SetCurrentStudy(salome.myStudy)
 
 # ---- init a Mesh
 
index 79cf3b536b56121d39b727420c0b77954db5b65d..ab189a361e5c24e50b745a760abfbb0b37080ff1 100644 (file)
@@ -73,6 +73,7 @@ print "number of Edges  in shell : ", len(subEdgeList)
 
 
 ### ---------------------------- SMESH --------------------------------------
+smesh.SetCurrentStudy(salome.myStudy)
 
 # ---- init a Mesh with the shell
 
index fd1b3ef62e52524de61cab9683b1d6f9607d37cc..5e750101a607e12000cd7c839861eccf576ed303 100644 (file)
@@ -84,7 +84,7 @@ print "number of Edges  in shell : ", len(subEdgeList)
 
 
 ### ---------------------------- SMESH --------------------------------------
-
+smesh.SetCurrentStudy(salome.myStudy)
 
 # ---- init a Mesh with the shell
 
index 279ae11ab57f44fc3d4b5d2239f084a3e7e1a6b6..e02f74718eb5beb48b368e41de22624ffb0f47e0 100644 (file)
@@ -45,6 +45,7 @@ print "number of Edges  in box : ", len(subEdgeList)
 
 
 ### ---------------------------- SMESH --------------------------------------
+smesh.SetCurrentStudy(salome.myStudy)
 
 # ---- init a Mesh with the boxe
 
index f5f6d65e50323ae91c3226609b64668b9f22568d..ba48f57f6ea79a3efc8195e624400176345c6e22 100755 (executable)
@@ -124,6 +124,7 @@ for i in range(8):
     idEdgeZ.append(geompy.addToStudyInFather(vol,edgeZ[i],"EdgeZ"+str(i+1)))
 
 ### ---------------------------- SMESH --------------------------------------
+smesh.SetCurrentStudy(salome.myStudy)
 
 # ---- init a Mesh with the volume
 
index 6a73b38b8161acc44a69a1fe7fffbbfa942654a0..d556ffd23ec078348a96d09229a7876f3e579294 100644 (file)
@@ -45,6 +45,7 @@ status = geompy.CheckShape(compshell)
 print " check status ", status
 
 ### ---------------------------- SMESH --------------------------------------
+smesh.SetCurrentStudy(salome.myStudy)
 
 # ---- init a Mesh with the compshell
 shape_mesh = salome.IDToObject( idcomp  )
index 16295a5e5c8ef51f963797586e897da5d5e522a2..aad14b6cdce77b050106c7a90f68b005351816bf 100644 (file)
@@ -45,6 +45,7 @@ status = geompy.CheckShape(compshell)
 print " check status ", status
 
 ### ---------------------------- SMESH --------------------------------------
+smesh.SetCurrentStudy(salome.myStudy)
 
 print "-------------------------- create Mesh, algorithm, hypothesis"
 
index 483cd666dd60474f4cd8a1447a98beb01d04da16..7af18468f19a8a6c7f8d7307f3d14cff722d7195 100644 (file)
@@ -45,6 +45,7 @@ status = geompy.CheckShape(compshell)
 print " check status ", status
 
 ### ---------------------------- SMESH --------------------------------------
+smesh.SetCurrentStudy(salome.myStudy)
 
 # ---- init a Mesh with the compshell
 
index 534bed16cca0105d2722da8bc056d1e682c90665..dcd788a528726c0418dda815f573fd854c85d392 100644 (file)
@@ -55,6 +55,7 @@ print "number of Edges  in flight : ", len(subEdgeList)
 
 
 ### ---------------------------- SMESH --------------------------------------
+smesh.SetCurrentStudy(salome.myStudy)
 
 # ---- init a Mesh with the shell
 shape_mesh = salome.IDToObject( idShape )
index 4c5fc646da63f7aff9abb41d19edac0ce36caa96..539451150f13ff70a874cda1c88378c37bf0f858 100644 (file)
@@ -41,6 +41,7 @@ idbox = geompy.addToStudy( aBox, "box" )
 aBox  = salome.IDToObject( idbox )
 
 # Create mesh
+smesh.SetCurrentStudy(salome.myStudy)
 
 mesh = smesh.Mesh(aBox, "Mesh_freebord")
 
index 4345b08b8f2d009275f3e29bf71dfe6746fb2434..abec53438a664bb543ab0fa6c3df702b84c30f22 100755 (executable)
@@ -95,6 +95,7 @@ salome.sg.updateObjBrowser(1)
 # -----------------------------------------------------------------------------
 
 print "-------------------------- mesh"
+smesh.SetCurrentStudy(salome.myStudy)
 
 # ---- init a Mesh with the geom shape
 shape_mesh = blob
index 46032383c3e42f518f304cc6ef9e1cf9a7c1629a..134e8ee7ecdc2dd4e30526b78e35063d60a0edbd 100644 (file)
@@ -120,6 +120,7 @@ name      = geompy.SubShapeName( sub_face4, mechanic )
 Id_SubFace4 = geompy.addToStudyInFather( mechanic, sub_face4, name )
 
 # ---------------------------- SMESH --------------------------------------
+smesh.SetCurrentStudy(salome.myStudy)
 
 # -- Init --
 shape_mesh = salome.IDToObject( Id_mechanic )
index 9ff0027040430d23ac0922d6e872d402ec0a34b2..630b308b5213d3e540d7ba3a392e35b7bc4543bf 100644 (file)
@@ -118,6 +118,7 @@ name      = geompy.SubShapeName( sub_face4, mechanic )
 Id_SubFace4 = geompy.addToStudyInFather( mechanic, sub_face4, name )
 
 # ---------------------------- SMESH --------------------------------------
+smesh.SetCurrentStudy(salome.myStudy)
 
 # -- Init --
 shape_mesh = salome.IDToObject( Id_mechanic )
index 038e64e0b655c818e85d4f6eef542eed9679dbc9..8fa15f583337c612989d942c7555959ceb25d546 100644 (file)
@@ -104,6 +104,7 @@ print "number of Faces in mechanic : ",len(subFaceList)
 print "number of Edges in mechanic : ",len(subEdgeList)
 
 ### ---------------------------- SMESH --------------------------------------
+smesh.SetCurrentStudy(salome.myStudy)
 
 print "-------------------------- create Mesh, algorithm, hypothesis"
 
index 1307067df0221544f50b94b2ccbdbfc0d1b39fa5..42f5bf896a0c91d410d48581034591313884baae 100644 (file)
@@ -104,6 +104,7 @@ print "number of Faces in mechanic : ",len(subFaceList)
 print "number of Edges in mechanic : ",len(subEdgeList)
 
 ### ---------------------------- SMESH --------------------------------------
+smesh.SetCurrentStudy(salome.myStudy)
 
 shape_mesh = salome.IDToObject( Id_mechanic  )
 
index 92005898dcc50b012e6d119c4ee66de69c5ef389..85f81731a0fbdb40a5269413687e8715a153d3bb 100644 (file)
@@ -58,7 +58,7 @@ salome.sg.updateObjBrowser(1);
 # ---- launch SMESH
 smeshgui = salome.ImportComponentGUI("SMESH")
 smeshgui.Init(salome.myStudyId)
-
+smesh.SetCurrentStudy(salome.myStudy)
 
 # ---- Creating meshes
 
index da4eda8435792be5748c968878892caaed30a8d6..e08256cb430301a98da27455ba1bd1557c3b7ca6 100644 (file)
@@ -56,6 +56,7 @@ ide = geompy.addToStudyInFather(face, edge, name)
 
 # ---- SMESH
 
+smesh.SetCurrentStudy(salome.myStudy)
 box = salome.IDToObject(idb)
 mesh = smesh.Mesh(box, "Meshbox")
 
index cd68018d2fb63d04b2a6cf0de3dc20108ee7c21a..169ca7a4fc898503d14c3238b6bff284c02ec2b4 100644 (file)
@@ -60,6 +60,8 @@ idedge = geompy.addToStudyInFather(face, edge, name)
 
 # ---- SMESH
 
+smesh.SetCurrentStudy(salome.myStudy)
+
 # ---- Init a Mesh with the box
 
 mesh = smesh.Mesh(box, "Meshbox")
index c87694894c9eb8201feada5aa7f79daf9412ef56..96e50282145f661912d1ab8bfdc29a14d10148c8 100644 (file)
@@ -60,6 +60,8 @@ idedge = geompy.addToStudyInFather(face, edge, name)
 
 # ---- SMESH
 
+smesh.SetCurrentStudy(salome.myStudy)
+
 # ---- Init a Mesh with the box
 
 mesh = smesh.Mesh(box, "Meshbox")
index 18183393469b6fc3d05d8a3475cd95c2bd740632..c2ac4c48092233ed1accdc2ba65bd26b6ca6566c 100755 (executable)
@@ -40,6 +40,7 @@ face = salome.IDToObject(idface)
 
 # ---- SMESH
 
+smesh.SetCurrentStudy(salome.myStudy)
 mesh = smesh.Mesh(box, "Meshbox")
 
 # Set 1D algorithm/hypotheses to mesh
index 616f0e39ded82148ccc667e474743da7eff00deb..f80dffc4cb7e8a0829b9a45e6cf9652de4ce62c0 100644 (file)
@@ -30,6 +30,8 @@ import CORBA
 import os
 import os.path
 
+smesh.SetCurrentStudy(salome.myStudy)
+
 def SetSObjName(theSObj,theName) :
     ok, anAttr = theSObj.FindAttribute("AttributeName")
     if ok: