0020623: EDF 1209 SMESH: Load script/execfile add the objects in the wrong study

This commit is contained in:
dmv 2009-12-21 14:26:43 +00:00
parent 0c1e7c3900
commit 313bdfc1c7
27 changed files with 50 additions and 2 deletions

View File

@ -22,6 +22,8 @@
#
import smesh
smesh.SetCurrentStudy(salome.myStudy)
def BuildGroupLyingOn(theMesh, theElemType, theName, theShape):
aFilterMgr = smesh.smesh.CreateFilterManager()
aFilter = aFilterMgr.CreateFilter()

View 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)

View 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:

View File

@ -287,6 +287,8 @@ piece_id = addToStudy(piece, "ex01_cube2build")
# Meshing
# =======
smesh.SetCurrentStudy(salome.myStudy)
# Create hexahedrical mesh on piece
# ---------------------------------

View File

@ -98,6 +98,8 @@ piece_id = addToStudy(piece, "ex02_cube2primitive")
# Meshing
# =======
smesh.SetCurrentStudy(salome.myStudy)
# Create hexahedrical mesh on piece
# ---------------------------------

View File

@ -85,6 +85,8 @@ piece_id = addToStudy(piece, "ex03_cube2partition")
# Meshing
# =======
smesh.SetCurrentStudy(salome.myStudy)
# Create hexahedrical mesh on piece
# ---------------------------------

View File

@ -66,6 +66,8 @@ piece_id = addToStudy(piece, "ex04_cube5tetraHexa")
# Meshing
# =======
smesh.SetCurrentStudy(salome.myStudy)
# Create a hexahedral mesh
# ------------------------

View File

@ -124,6 +124,8 @@ piece_id = addToStudy(piece, "ex05_hole1build")
# Meshing
# =======
smesh.SetCurrentStudy(salome.myStudy)
# Create a hexahedral mesh
# ------------------------

View File

@ -118,6 +118,8 @@ piece_id = addToStudy(piece, "ex06_hole1boolean")
# Meshing
# =======
smesh.SetCurrentStudy(salome.myStudy)
# Create a hexahedral mesh
# ------------------------

View File

@ -82,6 +82,8 @@ piece_id = addToStudy(piece, "ex07_hole1partition")
# Meshing
# =======
smesh.SetCurrentStudy(salome.myStudy)
# Create a hexahedral mesh
# ------------------------

View File

@ -115,6 +115,8 @@ piece_id = addToStudy(piece, "ex08_hole2build")
# Meshing
# =======
smesh.SetCurrentStudy(salome.myStudy)
# Create a hexahedral mesh
# ------------------------

View File

@ -118,6 +118,8 @@ piece_id = addToStudy(piece, "ex09_grid4build")
# Meshing
# =======
smesh.SetCurrentStudy(salome.myStudy)
# Create a hexahedral mesh
# ------------------------

View File

@ -80,6 +80,8 @@ piece_id = addToStudy(piece, "ex10_grid4geometry")
# Meshing
# =======
smesh.SetCurrentStudy(salome.myStudy)
# Create a hexahedral mesh
# ------------------------

View File

@ -101,6 +101,8 @@ piece_id = addToStudy(piece, "ex11_grid3partition")
# Meshing
# =======
smesh.SetCurrentStudy(salome.myStudy)
# Create a hexahedral mesh
# ------------------------

View File

@ -116,6 +116,8 @@ piece_id = addToStudy(piece, "ex12_grid17partition")
# Meshing
# =======
smesh.SetCurrentStudy(salome.myStudy)
# Create a hexahedral mesh
# ------------------------

View File

@ -214,6 +214,8 @@ piece_id = addToStudy(piece, "ex13_hole1partial")
# Meshing
# =======
smesh.SetCurrentStudy(salome.myStudy)
# Create a mesh
# -------------

View File

@ -99,6 +99,8 @@ piece_id = addToStudy(piece, "ex14_cyl1holed")
# Maillage
# ========
smesh.SetCurrentStudy(salome.myStudy)
# Creer un maillage hexahedrique
# ------------------------------

View File

@ -178,6 +178,8 @@ piece_id = addToStudy(piece, "ex15_cyl2geometry")
# Meshing
# =======
smesh.SetCurrentStudy(salome.myStudy)
# Create a hexahedral mesh
# ------------------------

View File

@ -108,6 +108,8 @@ piece_id = addToStudy(piece, "ex16_cyl2complementary")
# Meshing
# =======
smesh.SetCurrentStudy(salome.myStudy)
# Create a hexahedral mesh
# ------------------------

View File

@ -81,6 +81,8 @@ piece_id = addToStudy(piece, "ex17_dome1")
# Maillage
# ========
smesh.SetCurrentStudy(salome.myStudy)
# Maillage hexahedrique
# ---------------------

View File

@ -118,6 +118,8 @@ piece_id = addToStudy(piece, "ex18_dome2")
# Maillage
# ========
smesh.SetCurrentStudy(salome.myStudy)
# Maillage hexahedrique
# ---------------------

View File

@ -168,6 +168,8 @@ UnionList(groupe, groupe_sphere)
# Meshing
# =======
smesh.SetCurrentStudy(salome.myStudy)
# Create a hexahedral mesh
# ------------------------

View File

@ -93,6 +93,8 @@ UnionIDs(group, faces)
# Create a mesh
# =============
smesh.SetCurrentStudy(salome.myStudy)
# Define a mesh on a geometry
# ---------------------------

View 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)

View File

@ -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)

View 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

View File

@ -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()