Merge multi-study removal branch.

This commit is contained in:
rnv 2017-06-13 13:01:10 +03:00
parent 86ca561170
commit 264eeb2edd
514 changed files with 1701 additions and 2419 deletions

View File

@ -3,11 +3,11 @@
import salome import salome
salome.salome_init() salome.salome_init()
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH import SMESH
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
### ###
# Geometry: an assembly of a box, a cylinder and a truncated cone # Geometry: an assembly of a box, a cylinder and a truncated cone

View File

@ -2,7 +2,7 @@ import salome
salome.salome_init() salome.salome_init()
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
# This script demonstrates generation of 3D mesh basing on a modified 2D mesh # This script demonstrates generation of 3D mesh basing on a modified 2D mesh
# #
@ -31,7 +31,7 @@ Sph_Face = geompy.GetInPlace(Cut_1, Sph_Face, isNewImplementation=True, theName=
import SMESH import SMESH
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
Mesh_1 = smesh.Mesh(Cut_1) Mesh_1 = smesh.Mesh(Cut_1)
@ -59,4 +59,4 @@ Mesh_1.Tetrahedron()
Mesh_1.Compute() Mesh_1.Compute()
if salome.sg.hasDesktop(): if salome.sg.hasDesktop():
salome.sg.updateObjBrowser(True) salome.sg.updateObjBrowser()

View File

@ -5,11 +5,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
import salome_notebook import salome_notebook

View File

@ -4,11 +4,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
# create a box # create a box
box = geompy.MakeBox(0., 0., 0., 100., 200., 300.) box = geompy.MakeBox(0., 0., 0., 100., 200., 300.)

View File

@ -4,11 +4,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
# create a box # create a box
box = geompy.MakeBoxDXDYDZ(10., 10., 10.) box = geompy.MakeBoxDXDYDZ(10., 10., 10.)

View File

@ -4,11 +4,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200) Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
[Face_1,Face_2,Face_3,Face_4,Face_5,Face_6] = geompy.SubShapeAllSorted(Box_1, geompy.ShapeType["FACE"]) [Face_1,Face_2,Face_3,Face_4,Face_5,Face_6] = geompy.SubShapeAllSorted(Box_1, geompy.ShapeType["FACE"])

View File

@ -4,11 +4,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
def PrintMeshInfo(theMesh): def PrintMeshInfo(theMesh):
aMesh = theMesh.GetMesh() aMesh = theMesh.GetMesh()

View File

@ -4,11 +4,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
# create a box # create a box
box = geompy.MakeBox(0., 0., 0., 100., 200., 300.) box = geompy.MakeBox(0., 0., 0., 100., 200., 300.)

View File

@ -8,11 +8,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
import math import math
@ -84,7 +84,7 @@ geompy.DifferenceList(group_1, [group_1_box])
# Mesh the blocks with hexahedral # Mesh the blocks with hexahedral
# ------------------------------- # -------------------------------
smesh.SetCurrentStudy(salome.myStudy) smesh.UpdateStudy()
def discretize(x, y, z, nbSeg, shape=blocks): def discretize(x, y, z, nbSeg, shape=blocks):
vert = geompy.MakeVertex( x, y, z ) vert = geompy.MakeVertex( x, y, z )

View File

@ -4,11 +4,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
## create a bottom box ## create a bottom box
Box_inf = geompy.MakeBox(0., 0., 0., 200., 200., 50.) Box_inf = geompy.MakeBox(0., 0., 0., 200., 200., 50.)
@ -39,7 +39,7 @@ geompy.addToStudy(Box_sup, "Box_sup")
geompy.addToStudyInFather(Box_sup, Fsup2, "Fsup") geompy.addToStudyInFather(Box_sup, Fsup2, "Fsup")
geompy.addToStudyInFather(Box_sup, Finf2, "Finf") geompy.addToStudyInFather(Box_sup, Finf2, "Finf")
smesh.SetCurrentStudy(salome.myStudy) smesh.UpdateStudy()
## create a bottom mesh ## create a bottom mesh
Mesh_inf = smesh.Mesh(Box_inf, "Mesh_inf") Mesh_inf = smesh.Mesh(Box_inf, "Mesh_inf")
@ -78,4 +78,4 @@ Compound2 = smesh.Concatenate([Mesh_inf, Mesh_sup], 1, 0, 1e-05, True,
name='Compound with UniteGrps and GrpsOfAllElems') name='Compound with UniteGrps and GrpsOfAllElems')
if salome.sg.hasDesktop(): if salome.sg.hasDesktop():
salome.sg.updateObjBrowser(True) salome.sg.updateObjBrowser()

View File

@ -4,11 +4,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
# make geometry of a box # make geometry of a box
box = geompy.MakeBoxDXDYDZ(100,100,100) box = geompy.MakeBoxDXDYDZ(100,100,100)

View File

@ -1,9 +1,9 @@
import salome, math import salome, math
salome.salome_init() salome.salome_init()
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
box = geompy.MakeBoxDXDYDZ( 100, 100, 100 ) box = geompy.MakeBoxDXDYDZ( 100, 100, 100 )

View File

@ -4,10 +4,10 @@ import salome
salome.salome_init() salome.salome_init()
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
# create a box # create a box
box = geompy.MakeBoxDXDYDZ(10., 10., 10.) box = geompy.MakeBoxDXDYDZ(10., 10., 10.)

View File

@ -4,11 +4,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
# create a face from arc and straight segment # create a face from arc and straight segment
px = geompy.MakeVertex(100., 0. , 0. ) px = geompy.MakeVertex(100., 0. , 0. )

View File

@ -4,11 +4,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
# create a box # create a box
box = geompy.MakeBoxDXDYDZ(10., 10., 10.) box = geompy.MakeBoxDXDYDZ(10., 10., 10.)

View File

@ -4,11 +4,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
# create a box # create a box
box = geompy.MakeBoxDXDYDZ(10., 10., 10.) box = geompy.MakeBoxDXDYDZ(10., 10., 10.)

View File

@ -4,11 +4,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
# create a face # create a face
px = geompy.MakeVertex(100., 0. , 0. ) px = geompy.MakeVertex(100., 0. , 0. )

View File

@ -4,11 +4,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
# create a cylinder # create a cylinder
cyl = geompy.MakeCylinderRH(30., 50.) cyl = geompy.MakeCylinderRH(30., 50.)

View File

@ -4,11 +4,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
# create sketchers # create sketchers
sketcher1 = geompy.MakeSketcher("Sketcher:F 0 0:TT 70 0:TT 70 70:TT 0 70:WW") sketcher1 = geompy.MakeSketcher("Sketcher:F 0 0:TT 70 0:TT 70 70:TT 0 70:WW")

View File

@ -4,11 +4,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
# create a box # create a box
base = geompy.MakeSketcher("Sketcher:F 0 0:TT 10 0:TT 20 10:TT 0 10:WF", theName="F") base = geompy.MakeSketcher("Sketcher:F 0 0:TT 10 0:TT 20 10:TT 0 10:WF", theName="F")

View File

@ -4,11 +4,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
# create a box # create a box
box = geompy.MakeBoxDXDYDZ(10., 10., 10.) box = geompy.MakeBoxDXDYDZ(10., 10., 10.)

View File

@ -6,11 +6,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
# Prepare geometry # Prepare geometry

View File

@ -6,11 +6,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
# Prepare geometry # Prepare geometry

View File

@ -4,11 +4,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
from salome.StdMeshers import StdMeshersBuilder from salome.StdMeshers import StdMeshersBuilder
# Create face and explode it on edges # Create face and explode it on edges

View File

@ -4,11 +4,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
# Create face from the wire and add to study # Create face from the wire and add to study
Face = geompy.MakeSketcher("Sketcher:F 0 0:TT 20 0:R 90:C 20 90:WF", [0, 0, 0, 1, 0, 0, 0, 0, 1]) Face = geompy.MakeSketcher("Sketcher:F 0 0:TT 20 0:R 90:C 20 90:WF", [0, 0, 0, 1, 0, 0, 0, 0, 1])

View File

@ -4,11 +4,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
# Get 1/4 part from the disk face. # Get 1/4 part from the disk face.
Box_1 = geompy.MakeBoxDXDYDZ(100, 100, 100) Box_1 = geompy.MakeBoxDXDYDZ(100, 100, 100)

View File

@ -4,11 +4,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
from salome.StdMeshers import StdMeshersBuilder from salome.StdMeshers import StdMeshersBuilder
# Make quadrangle face and explode it on edges. # Make quadrangle face and explode it on edges.

View File

@ -4,11 +4,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
# Make a patritioned box # Make a patritioned box

View File

@ -4,11 +4,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
X = geompy.MakeVectorDXDYDZ( 1,0,0 ) X = geompy.MakeVectorDXDYDZ( 1,0,0 )
O = geompy.MakeVertex( 100,50,50 ) O = geompy.MakeVertex( 100,50,50 )

View File

@ -4,9 +4,9 @@
import salome, SMESH import salome, SMESH
salome.salome_init() salome.salome_init()
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
# create mesh # create mesh
face = geompy.MakeFaceHW(100, 100, 1, theName="quadrangle") face = geompy.MakeFaceHW(100, 100, 1, theName="quadrangle")

View File

@ -4,9 +4,9 @@
import salome, SMESH import salome, SMESH
salome.salome_init() salome.salome_init()
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
# create mesh # create mesh
face = geompy.MakeFaceHW(100, 100, 1) face = geompy.MakeFaceHW(100, 100, 1)

View File

@ -5,11 +5,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
import salome_notebook import salome_notebook
# make a mesh on a box # make a mesh on a box

View File

@ -3,10 +3,10 @@
import salome import salome
salome.salome_init() salome.salome_init()
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH import SMESH
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
# make a mesh on a box # make a mesh on a box
box = geompy.MakeBoxDXDYDZ(100,100,100) box = geompy.MakeBoxDXDYDZ(100,100,100)

View File

@ -3,10 +3,10 @@
import salome import salome
salome.salome_init() salome.salome_init()
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH import SMESH
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
# make a mesh on a box # make a mesh on a box
box = geompy.MakeBoxDXDYDZ(100,100,100) box = geompy.MakeBoxDXDYDZ(100,100,100)

View File

@ -3,9 +3,9 @@
import salome, SMESH import salome, SMESH
salome.salome_init() salome.salome_init()
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
# create two boxes to have two domains in the mesh # create two boxes to have two domains in the mesh

View File

@ -8,11 +8,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
# geometry # geometry

View File

@ -77,4 +77,4 @@ aGroup.Remove( [2,3,4] )
salome.sg.updateObjBrowser(True) salome.sg.updateObjBrowser()

View File

@ -5,11 +5,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
# create a box # create a box
box = geompy.MakeBox(0., 0., 0., 100., 100., 100.) box = geompy.MakeBox(0., 0., 0., 100., 100., 100.)
@ -43,4 +43,4 @@ aSmeshGroup1 = quadra.GroupOnGeom(face, "SMESHGroup1")
# create SMESH group on <aGeomGroupE> with default name # create SMESH group on <aGeomGroupE> with default name
aSmeshGroup2 = quadra.GroupOnGeom(aGeomGroupE) aSmeshGroup2 = quadra.GroupOnGeom(aGeomGroupE)
salome.sg.updateObjBrowser(True) salome.sg.updateObjBrowser()

View File

@ -5,11 +5,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
import salome_notebook import salome_notebook
@ -46,4 +46,4 @@ filt2.SetCriteria( [ smesh.GetCriterion( SMESH.FACE, SMESH.FT_RangeOfIds, "1-70"
filtIDs3 = filtGroup.GetIDs() filtIDs3 = filtGroup.GetIDs()
print "After filter modification, group on filter contains %s elemens" % filtGroup.Size() print "After filter modification, group on filter contains %s elemens" % filtGroup.Size()
salome.sg.updateObjBrowser(True) salome.sg.updateObjBrowser()

View File

@ -42,4 +42,4 @@ for i in range(len(aGroupElemIDs)):
pass pass
print "" print ""
salome.sg.updateObjBrowser(True) salome.sg.updateObjBrowser()

View File

@ -52,4 +52,4 @@ aGroup4.SetColor( SALOMEDS.Color(1.,0.,0.));
aGroup5 = mesh.UnionListOfGroups([aGroup3, aGroup4], "Any Area") aGroup5 = mesh.UnionListOfGroups([aGroup3, aGroup4], "Any Area")
print "Criterion: Any Area, Nb = ", len(aGroup5.GetListOfID()) print "Criterion: Any Area, Nb = ", len(aGroup5.GetListOfID())
salome.sg.updateObjBrowser(True) salome.sg.updateObjBrowser()

View File

@ -34,4 +34,4 @@ aGroup3 = mesh.IntersectListOfGroups([aGroup1, aGroup2], "20 < Area < 60")
print "Criterion: 20 < Area < 60, Nb = ", len(aGroup3.GetListOfID()) print "Criterion: 20 < Area < 60, Nb = ", len(aGroup3.GetListOfID())
# Please note that also there is IntersectGroups() method which works with two groups only # Please note that also there is IntersectGroups() method which works with two groups only
salome.sg.updateObjBrowser(True) salome.sg.updateObjBrowser()

View File

@ -32,4 +32,4 @@ aGroupRes = mesh.CutGroups(aGroupMain, aGroupTool, "Area >= 60")
print "Criterion: Area >= 60, Nb = ", len(aGroupRes.GetListOfID()) print "Criterion: Area >= 60, Nb = ", len(aGroupRes.GetListOfID())
# Please note that also there is CutListOfGroups() method which works with lists of groups of any lengths # Please note that also there is CutListOfGroups() method which works with lists of groups of any lengths
salome.sg.updateObjBrowser(True) salome.sg.updateObjBrowser()

View File

@ -30,4 +30,4 @@ aGrp = mesh.CreateDimGroup( [aSrcGroup1, aSrcGroup2], SMESH.EDGE, "Edges" )
# Create group of nodes using source groups of faces # Create group of nodes using source groups of faces
aGrp = mesh.CreateDimGroup( [aSrcGroup1, aSrcGroup2], SMESH.NODE, "Nodes" ) aGrp = mesh.CreateDimGroup( [aSrcGroup1, aSrcGroup2], SMESH.NODE, "Nodes" )
salome.sg.updateObjBrowser(True) salome.sg.updateObjBrowser()

View File

@ -4,11 +4,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
import salome_notebook import salome_notebook
from SMESH_mechanic import mesh as mesh1 from SMESH_mechanic import mesh as mesh1

View File

@ -5,11 +5,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
import salome_notebook import salome_notebook
from SMESH_mechanic import mesh as mesh1 from SMESH_mechanic import mesh as mesh1

View File

@ -5,11 +5,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
# create a box # create a box
box = geompy.MakeBoxDXDYDZ(100,100,100) box = geompy.MakeBoxDXDYDZ(100,100,100)

View File

@ -4,7 +4,7 @@ import salome
salome.salome_init() salome.salome_init()
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
mesh = smesh.Mesh() mesh = smesh.Mesh()

View File

@ -4,7 +4,7 @@ import salome
salome.salome_init() salome.salome_init()
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
mesh = smesh.Mesh() mesh = smesh.Mesh()

View File

@ -5,11 +5,11 @@ import salome
salome.salome_init() salome.salome_init()
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
# create a geometry # create a geometry

View File

@ -7,7 +7,7 @@ salome.salome_init()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
# create an empty mesh structure # create an empty mesh structure
@ -34,4 +34,4 @@ f1 = MakePolygon(mesh, 0, 0, 0, 30, 13)
f2 = MakePolygon(mesh, 0, 0, 10, 21, 9) f2 = MakePolygon(mesh, 0, 0, 10, 21, 9)
f3 = MakePolygon(mesh, 0, 0, 20, 13, 6) f3 = MakePolygon(mesh, 0, 0, 20, 13, 6)
salome.sg.updateObjBrowser(True) salome.sg.updateObjBrowser()

View File

@ -5,7 +5,7 @@ import salome
salome.salome_init() salome.salome_init()
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
import math import math
@ -60,4 +60,4 @@ mesh.AddPolyhedralVolume([dd[0], dd[1], dd[2], dd[3], dd[4], # top
[5,5,5,5,5,5,5,5,5,5,5,5]) [5,5,5,5,5,5,5,5,5,5,5,5])
if salome.sg.hasDesktop(): if salome.sg.hasDesktop():
salome.sg.updateObjBrowser(True) salome.sg.updateObjBrowser()

View File

@ -5,11 +5,11 @@ import salome
salome.salome_init() salome.salome_init()
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
box = geompy.MakeBoxDXDYDZ(200, 200, 200) box = geompy.MakeBoxDXDYDZ(200, 200, 200)

View File

@ -5,11 +5,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
import salome_notebook import salome_notebook
@ -51,4 +51,4 @@ res = mesh.InverseDiag(bb[1], tt[2])
if not res: print "failed!" if not res: print "failed!"
else: print "done." else: print "done."
salome.sg.updateObjBrowser(True) salome.sg.updateObjBrowser()

View File

@ -5,11 +5,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
import salome_notebook import salome_notebook
@ -51,4 +51,4 @@ res = mesh.DeleteDiag(bb[1], tt[2])
if not res: print "failed!" if not res: print "failed!"
else: print "done." else: print "done."
salome.sg.updateObjBrowser(True) salome.sg.updateObjBrowser()

View File

@ -5,11 +5,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
import salome_notebook import salome_notebook
@ -51,4 +51,4 @@ res = mesh.TriToQuad([ff[2], ff[3], ff[4], ff[5]], SMESH.FT_MinimumAngle, 60.)
if not res: print "failed!" if not res: print "failed!"
else: print "done." else: print "done."
salome.sg.updateObjBrowser(True) salome.sg.updateObjBrowser()

View File

@ -5,11 +5,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
import salome_notebook import salome_notebook
@ -42,4 +42,4 @@ f5 = mesh.AddFace([n5, n6, n12, n11])
# Change the orientation of the second and the fourth faces. # Change the orientation of the second and the fourth faces.
mesh.Reorient([2, 4]) mesh.Reorient([2, 4])
salome.sg.updateObjBrowser(True) salome.sg.updateObjBrowser()

View File

@ -5,11 +5,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
import SMESH_mechanic import SMESH_mechanic
@ -32,4 +32,4 @@ print "\nSmoothing ... ",
if not res: print "failed!" if not res: print "failed!"
else: print "done." else: print "done."
salome.sg.updateObjBrowser(True) salome.sg.updateObjBrowser()

View File

@ -5,11 +5,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
import SMESH_mechanic import SMESH_mechanic
@ -31,4 +31,4 @@ GroupTri = mesh.GroupOnGeom(face, "Group of faces (extrusion)", SMESH.FACE)
# perform extrusion of the group # perform extrusion of the group
mesh.ExtrusionSweepObject(GroupTri, vector, 5) mesh.ExtrusionSweepObject(GroupTri, vector, 5)
salome.sg.updateObjBrowser(True) salome.sg.updateObjBrowser()

View File

@ -6,11 +6,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
# 1. Create points # 1. Create points
points = [[0, 0], [50, 30], [50, 110], [0, 150], [-80, 150], [-130, 70], [-130, -20]] points = [[0, 0], [50, 30], [50, 110], [0, 150], [-80, 150], [-130, 70], [-130, -20]]
@ -128,4 +128,4 @@ error = quad_6.ExtrusionAlongPath(ff_6 , Edge_Circle_mesh, Edge_Circle, 1,
error = quad_7.ExtrusionAlongPath(ff_7, Edge_Circle_mesh, Edge_Circle, 1, error = quad_7.ExtrusionAlongPath(ff_7, Edge_Circle_mesh, Edge_Circle, 1,
1, [a45, -a45, a45, -a45, a45, -a45, a45, -a45], 0, refPoint) 1, [a45, -a45, a45, -a45, a45, -a45, a45, -a45], 0, refPoint)
salome.sg.updateObjBrowser(True) salome.sg.updateObjBrowser()

View File

@ -5,11 +5,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
# define the geometry # define the geometry
Box_1 = geompy.MakeBoxDXDYDZ(200., 200., 200.) Box_1 = geompy.MakeBoxDXDYDZ(200., 200., 200.)

View File

@ -5,11 +5,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
# create sphere of radius 100 # create sphere of radius 100

View File

@ -5,11 +5,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
import salome_notebook import salome_notebook
# set variables # set variables

View File

@ -4,11 +4,11 @@ import salome
salome.salome_init() salome.salome_init()
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH import SMESH
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
OX = geompy.MakeVectorDXDYDZ(1,0,0) OX = geompy.MakeVectorDXDYDZ(1,0,0)
OY = geompy.MakeVectorDXDYDZ(0,1,0) OY = geompy.MakeVectorDXDYDZ(0,1,0)

View File

@ -5,11 +5,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
# create open shell: a box without one plane # create open shell: a box without one plane
box = geompy.MakeBox(0., 0., 0., 20., 20., 15.) box = geompy.MakeBox(0., 0., 0., 20., 20., 15.)
@ -44,4 +44,4 @@ print ""
aGroup = mesh.GetMesh().CreateGroup(SMESH.EDGE, "Free borders") aGroup = mesh.GetMesh().CreateGroup(SMESH.EDGE, "Free borders")
aGroup.Add(anIds) aGroup.Add(anIds)
salome.sg.updateObjBrowser(True) salome.sg.updateObjBrowser()

View File

@ -5,11 +5,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
# create open shell: a box without one plane # create open shell: a box without one plane
box = geompy.MakeBox(0., 0., 0., 20., 20., 15.) box = geompy.MakeBox(0., 0., 0., 20., 20., 15.)
@ -46,4 +46,4 @@ print ""
aGroup = mesh.GetMesh().CreateGroup(SMESH.EDGE, "Borders at multi-connections") aGroup = mesh.GetMesh().CreateGroup(SMESH.EDGE, "Borders at multi-connections")
aGroup.Add(anIds) aGroup.Add(anIds)
salome.sg.updateObjBrowser(True) salome.sg.updateObjBrowser()

View File

@ -5,11 +5,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
# create open shell: a box without one plane # create open shell: a box without one plane
box = geompy.MakeBox(0., 0., 0., 20., 20., 15.) box = geompy.MakeBox(0., 0., 0., 20., 20., 15.)
@ -46,4 +46,4 @@ print ""
aGroup = mesh.GetMesh().CreateGroup(SMESH.EDGE, "Edges with length > " + `length_margin`) aGroup = mesh.GetMesh().CreateGroup(SMESH.EDGE, "Edges with length > " + `length_margin`)
aGroup.Add(anIds) aGroup.Add(anIds)
salome.sg.updateObjBrowser(True) salome.sg.updateObjBrowser()

View File

@ -37,4 +37,4 @@ for i in range(len(aBorders)):
aGroupF.Add([aBorder.myElemId]) aGroupF.Add([aBorder.myElemId])
aGroupN.Add([aBorder.myPnt1, aBorder.myPnt2]) aGroupN.Add([aBorder.myPnt1, aBorder.myPnt2])
salome.sg.updateObjBrowser(True) salome.sg.updateObjBrowser()

View File

@ -5,11 +5,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
# create box # create box
box = geompy.MakeBox(0., 0., 0., 100., 200., 300.) box = geompy.MakeBox(0., 0., 0., 100., 200., 300.)
@ -51,4 +51,4 @@ for i in range(len(anNodeIds)):
pass pass
print "" print ""
salome.sg.updateObjBrowser(True) salome.sg.updateObjBrowser()

View File

@ -5,11 +5,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
####### GEOM part ######## ####### GEOM part ########
@ -75,4 +75,4 @@ aFaceIds = Mesh_1.GetIdsFromFilter(aFilter)
aGroup = Mesh_1.CreateEmptyGroup(SMESH.FACE, "Shared_faces") aGroup = Mesh_1.CreateEmptyGroup(SMESH.FACE, "Shared_faces")
aGroup.Add(aFaceIds) aGroup.Add(aFaceIds)
salome.sg.updateObjBrowser(True) salome.sg.updateObjBrowser()

View File

@ -5,11 +5,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
import salome_notebook import salome_notebook

View File

@ -5,11 +5,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
import salome_notebook import salome_notebook

View File

@ -5,11 +5,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
import salome_notebook import salome_notebook

View File

@ -5,11 +5,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
import salome_notebook import salome_notebook

View File

@ -5,11 +5,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
# create open shell: a box without one plane # create open shell: a box without one plane
box = geompy.MakeBox(0., 0., 0., 20., 20., 15.) box = geompy.MakeBox(0., 0., 0., 20., 20., 15.)
@ -47,4 +47,4 @@ print ""
aGroup = mesh.CreateEmptyGroup(SMESH.FACE, "Faces with length 2D > " + `length_margin`) aGroup = mesh.CreateEmptyGroup(SMESH.FACE, "Faces with length 2D > " + `length_margin`)
aGroup.Add(anIds) aGroup.Add(anIds)
salome.sg.updateObjBrowser(True) salome.sg.updateObjBrowser()

View File

@ -5,11 +5,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
# create a compound of two glued boxes # create a compound of two glued boxes
box1 = geompy.MakeBox(0., 0., 0., 20., 20., 15.) box1 = geompy.MakeBox(0., 0., 0., 20., 20., 15.)
@ -47,4 +47,4 @@ print ""
aGroup = mesh.CreateEmptyGroup(SMESH.FACE, "Borders at multi-connection 2D = " + `nb_conn`) aGroup = mesh.CreateEmptyGroup(SMESH.FACE, "Borders at multi-connection 2D = " + `nb_conn`)
aGroup.Add(anIds) aGroup.Add(anIds)
salome.sg.updateObjBrowser(True) salome.sg.updateObjBrowser()

View File

@ -28,4 +28,4 @@ print ""
aGroup = mesh.CreateEmptyGroup(SMESH.FACE, "Area > " + `area_margin`) aGroup = mesh.CreateEmptyGroup(SMESH.FACE, "Area > " + `area_margin`)
aGroup.Add(anIds) aGroup.Add(anIds)
salome.sg.updateObjBrowser(True) salome.sg.updateObjBrowser()

View File

@ -28,4 +28,4 @@ print ""
aGroup = mesh.CreateEmptyGroup(SMESH.FACE, "Taper > " + `taper_margin`) aGroup = mesh.CreateEmptyGroup(SMESH.FACE, "Taper > " + `taper_margin`)
aGroup.Add(anIds) aGroup.Add(anIds)
salome.sg.updateObjBrowser(True) salome.sg.updateObjBrowser()

View File

@ -28,4 +28,4 @@ print ""
aGroup = mesh.CreateEmptyGroup(SMESH.FACE, "Aspect Ratio > " + `ar_margin`) aGroup = mesh.CreateEmptyGroup(SMESH.FACE, "Aspect Ratio > " + `ar_margin`)
aGroup.Add(anIds) aGroup.Add(anIds)
salome.sg.updateObjBrowser(True) salome.sg.updateObjBrowser()

View File

@ -29,4 +29,4 @@ aGroup = mesh.CreateEmptyGroup(SMESH.FACE, "Minimum Angle < " + `min_angle`)
aGroup.Add(anIds) aGroup.Add(anIds)
salome.sg.updateObjBrowser(True) salome.sg.updateObjBrowser()

View File

@ -29,4 +29,4 @@ aGroup = mesh.CreateEmptyGroup(SMESH.FACE, "Warp > " + `wa_margin`)
aGroup.Add(anIds) aGroup.Add(anIds)
salome.sg.updateObjBrowser(True) salome.sg.updateObjBrowser()

View File

@ -28,4 +28,4 @@ print ""
aGroup = mesh.CreateEmptyGroup(SMESH.FACE, "Skew > " + `skew_margin`) aGroup = mesh.CreateEmptyGroup(SMESH.FACE, "Skew > " + `skew_margin`)
aGroup.Add(anIds) aGroup.Add(anIds)
salome.sg.updateObjBrowser(True) salome.sg.updateObjBrowser()

View File

@ -28,4 +28,4 @@ print ""
aGroup = mesh.CreateEmptyGroup(SMESH.FACE, "Element Diameter 2D > " + `mel_2d_margin`) aGroup = mesh.CreateEmptyGroup(SMESH.FACE, "Element Diameter 2D > " + `mel_2d_margin`)
aGroup.Add(anIds) aGroup.Add(anIds)
salome.sg.updateObjBrowser(True) salome.sg.updateObjBrowser()

View File

@ -29,4 +29,4 @@ aGroup = mesh.CreateEmptyGroup(SMESH.VOLUME, "Aspect Ratio 3D > " + `ar_margin`)
aGroup.Add(anIds) aGroup.Add(anIds)
salome.sg.updateObjBrowser(True) salome.sg.updateObjBrowser()

View File

@ -30,4 +30,4 @@ aGroup = mesh.CreateEmptyGroup(SMESH.VOLUME, "Volume < " + `volume_margin`)
aGroup.Add(anIds) aGroup.Add(anIds)
salome.sg.updateObjBrowser(True) salome.sg.updateObjBrowser()

View File

@ -28,4 +28,4 @@ print ""
aGroup = mesh.CreateEmptyGroup(SMESH.FACE, "Element Diameter 3D > " + `mel_3d_margin`) aGroup = mesh.CreateEmptyGroup(SMESH.FACE, "Element Diameter 3D > " + `mel_3d_margin`)
aGroup.Add(anIds) aGroup.Add(anIds)
salome.sg.updateObjBrowser(True) salome.sg.updateObjBrowser()

View File

@ -4,10 +4,10 @@ import salome
salome.salome_init() salome.salome_init()
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
# make a shape consisting of two quadranges # make a shape consisting of two quadranges
OY = geompy.MakeVectorDXDYDZ(0, 1, 0) OY = geompy.MakeVectorDXDYDZ(0, 1, 0)

View File

@ -4,11 +4,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
Box = geompy.MakeBoxDXDYDZ(200, 200, 200) Box = geompy.MakeBoxDXDYDZ(200, 200, 200)
f = geompy.SubShapeAllSorted(Box, geompy.ShapeType["FACE"]) f = geompy.SubShapeAllSorted(Box, geompy.ShapeType["FACE"])

View File

@ -5,11 +5,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
# create a face to be meshed # create a face to be meshed
px = geompy.MakeVertex(100., 0. , 0. ) px = geompy.MakeVertex(100., 0. , 0. )
@ -77,4 +77,4 @@ print "Triangles : ", trias.NbTriangles()
print "Quadrangles: ", trias.NbQuadrangles() print "Quadrangles: ", trias.NbQuadrangles()
print "Volumes : ", trias.NbVolumes() print "Volumes : ", trias.NbVolumes()
salome.sg.updateObjBrowser(True) salome.sg.updateObjBrowser()

View File

@ -5,11 +5,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
# create two faces of a box # create two faces of a box
box1 = geompy.MakeBox(0., 0., -10., 30., 20., 25.) box1 = geompy.MakeBox(0., 0., -10., 30., 20., 25.)

View File

@ -5,11 +5,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
import salome_notebook import salome_notebook

View File

@ -5,11 +5,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
# make two not sewed quadranges # make two not sewed quadranges
OY0 = geompy.MakeVectorDXDYDZ(0, 1, 0) OY0 = geompy.MakeVectorDXDYDZ(0, 1, 0)

View File

@ -4,11 +4,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
# create two boxes # create two boxes
box1 = geompy.MakeBox(0., 0., 0., 10., 10., 10.) box1 = geompy.MakeBox(0., 0., 0., 10., 10., 10.)

View File

@ -6,11 +6,11 @@ salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH import SMESH
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
# Create a box # Create a box
@ -92,4 +92,4 @@ mesh.DoubleElements([ 1, 2 ])
# Update object browser # Update object browser
if salome.sg.hasDesktop(): if salome.sg.hasDesktop():
salome.sg.updateObjBrowser(False) salome.sg.updateObjBrowser()

View File

@ -5,11 +5,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
import salome_notebook import salome_notebook

View File

@ -5,11 +5,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
import salome_notebook import salome_notebook

View File

@ -5,11 +5,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
import salome_notebook import salome_notebook
import numpy as np import numpy as np

View File

@ -5,11 +5,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
# create a box # create a box
box = geompy.MakeBox(0., 0., 0., 20., 20., 20.) box = geompy.MakeBox(0., 0., 0., 20., 20., 20.)

View File

@ -5,11 +5,11 @@ import salome
salome.salome_init() salome.salome_init()
import GEOM import GEOM
from salome.geom import geomBuilder from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy) geompy = geomBuilder.New()
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
# Create a geometry to mesh # Create a geometry to mesh
box = geompy.MakeBoxDXDYDZ(100,100,100) box = geompy.MakeBoxDXDYDZ(100,100,100)

View File

@ -20,13 +20,13 @@ salome.salome_init()
\n the old mode (from dump): \n the old mode (from dump):
\code \code
import smesh, SMESH, SALOMEDS import smesh, SMESH, SALOMEDS
smesh.SetCurrentStudy(salome.myStudy) smesh.UpdateStudy()
\endcode \endcode
\n the new mode: \n the new mode:
\code \code
import SMESH, SALOMEDS import SMESH, SALOMEDS
from salome.smesh import smeshBuilder from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy) smesh = smeshBuilder.New()
\endcode \endcode

Some files were not shown because too many files have changed in this diff Show More