Back to index

salome-smesh  6.5.0
Functions | Variables
SMESH_AdvancedEditor Namespace Reference

Functions

def GetNewNodes

Variables

tuple mesh = smesh.Mesh()
float tol = 0.001
tuple n1 = mesh.AddNode(55,-5,0)
tuple n2 = mesh.AddNode(55,5,0)
tuple e1 = mesh.AddEdge([n1,n2])
tuple dir1 = smesh.DirStruct(smesh.PointStruct(-10,0,0))
tuple n3 = mesh.AddNode(-5,-55,0)
tuple n4 = mesh.AddNode(5,-55,0)
tuple e2 = mesh.AddEdge([n3,n4])
tuple dir2 = smesh.DirStruct(smesh.PointStruct(0,10,0))
tuple nodes = mesh.FindCoincidentNodes(0.001)
tuple faces = mesh.GetElementsByType(smesh.FACE)
tuple nbf = len(faces)
float maxang = 2.0
int zstep = 5
int nbzsteps = 50
tuple dir3 = smesh.DirStruct(smesh.PointStruct(0,0,zstep))
list newfaces = []
tuple res = mesh.GetLastCreatedElems()
tuple nbr = len(res)
list nfaces = []
tuple nbn = mesh.GetElemNbNodes(j)
tuple nn1 = mesh.GetElemNode(j,0)
tuple xyz1 = mesh.GetNodeXYZ(nn1)
tuple nn2 = mesh.GetElemNode(j,1)
tuple xyz2 = mesh.GetNodeXYZ(nn2)
tuple nn3 = mesh.GetElemNode(j,2)
tuple xyz3 = mesh.GetNodeXYZ(nn3)
tuple axisr1 = smesh.AxisStruct(0,0,0,0,0,1)
tuple ang = maxang*(1-math.cos((i+1)*math.pi/nbzsteps))
tuple n5 = mesh.AddNode(65,0,0)
tuple n6 = mesh.AddNode(67.5,0,0)
tuple n7 = mesh.AddNode(70,0,0)
tuple e56 = mesh.AddEdge([n5,n6])
tuple e67 = mesh.AddEdge([n6,n7])
tuple axisr2 = smesh.AxisStruct(65,0,0,0,1,0)
list faces1 = []
tuple nbf1 = len(faces1)
tuple n8 = mesh.AddNode(-65,0,0)
tuple n9 = mesh.AddNode(-67.5,0,0)
tuple n10 = mesh.AddNode(-70,0,0)
tuple e8 = mesh.AddEdge([n8,n9])
tuple e9 = mesh.AddEdge([n9,n10])
tuple axisr3 = smesh.AxisStruct(-65,0,0,0,-1,0)
list faces2 = []
tuple nbf2 = len(faces2)
int nbcircs = 2
int nbrsteps = 24
 nbrs = nbcircs*nbrsteps
 dz = nbzsteps*zstep/nbrs
list oldnodes = []
tuple newnodes = GetNewNodes(mesh,faces1,oldnodes)
list volumes = []
tuple xyz = mesh.GetNodeXYZ(j)

Function Documentation

def SMESH_AdvancedEditor.GetNewNodes (   mesh,
  Elems,
  OldNodes 
)
Auxilary function, which return list of nodes from
given Elems avoided nodes from OldNodes

Definition at line 30 of file SMESH_AdvancedEditor.py.

00030 
00031 def GetNewNodes(mesh,Elems,OldNodes):
00032     """
00033     Auxilary function, which return list of nodes from
00034     given Elems avoided nodes from OldNodes
00035     """
00036     newnodes = []
00037     for i in Elems:
00038         nbn = mesh.GetElemNbNodes(i)
00039         for j in range(0,nbn):
00040             nn = mesh.GetElemNode(i,j)
00041             isold = 0
00042             for k in range(0,len(newnodes)):
00043                 if nn==newnodes[k]:
00044                     isold = 1
00045                     break
00046                 pass
00047             if isold: continue
00048             for k in range(0,len(OldNodes)):
00049                 if nn==OldNodes[k]:
00050                     isold = 1
00051                     break
00052                 pass
00053             if isold: continue
00054             newnodes.append(nn)
00055             pass
00056         pass
00057     return newnodes
00058             
00059 smesh.SetCurrentStudy(salome.myStudy)
00060 
# create empty mesh

Variable Documentation

tuple SMESH_AdvancedEditor.ang = maxang*(1-math.cos((i+1)*math.pi/nbzsteps))

Definition at line 126 of file SMESH_AdvancedEditor.py.

Definition at line 124 of file SMESH_AdvancedEditor.py.

Definition at line 138 of file SMESH_AdvancedEditor.py.

Definition at line 155 of file SMESH_AdvancedEditor.py.

Definition at line 70 of file SMESH_AdvancedEditor.py.

Definition at line 76 of file SMESH_AdvancedEditor.py.

Definition at line 91 of file SMESH_AdvancedEditor.py.

Definition at line 173 of file SMESH_AdvancedEditor.py.

tuple SMESH_AdvancedEditor.e1 = mesh.AddEdge([n1,n2])

Definition at line 69 of file SMESH_AdvancedEditor.py.

tuple SMESH_AdvancedEditor.e2 = mesh.AddEdge([n3,n4])

Definition at line 75 of file SMESH_AdvancedEditor.py.

tuple SMESH_AdvancedEditor.e56 = mesh.AddEdge([n5,n6])

Definition at line 136 of file SMESH_AdvancedEditor.py.

tuple SMESH_AdvancedEditor.e67 = mesh.AddEdge([n6,n7])

Definition at line 137 of file SMESH_AdvancedEditor.py.

tuple SMESH_AdvancedEditor.e8 = mesh.AddEdge([n8,n9])

Definition at line 153 of file SMESH_AdvancedEditor.py.

tuple SMESH_AdvancedEditor.e9 = mesh.AddEdge([n9,n10])

Definition at line 154 of file SMESH_AdvancedEditor.py.

SMESH_AdvancedEditor.faces = mesh.GetElementsByType(smesh.FACE)

Definition at line 86 of file SMESH_AdvancedEditor.py.

Definition at line 141 of file SMESH_AdvancedEditor.py.

Definition at line 158 of file SMESH_AdvancedEditor.py.

Definition at line 88 of file SMESH_AdvancedEditor.py.

Definition at line 61 of file SMESH_AdvancedEditor.py.

tuple SMESH_AdvancedEditor.n1 = mesh.AddNode(55,-5,0)

Definition at line 67 of file SMESH_AdvancedEditor.py.

tuple SMESH_AdvancedEditor.n10 = mesh.AddNode(-70,0,0)

Definition at line 152 of file SMESH_AdvancedEditor.py.

tuple SMESH_AdvancedEditor.n2 = mesh.AddNode(55,5,0)

Definition at line 68 of file SMESH_AdvancedEditor.py.

tuple SMESH_AdvancedEditor.n3 = mesh.AddNode(-5,-55,0)

Definition at line 73 of file SMESH_AdvancedEditor.py.

tuple SMESH_AdvancedEditor.n4 = mesh.AddNode(5,-55,0)

Definition at line 74 of file SMESH_AdvancedEditor.py.

tuple SMESH_AdvancedEditor.n5 = mesh.AddNode(65,0,0)

Definition at line 133 of file SMESH_AdvancedEditor.py.

tuple SMESH_AdvancedEditor.n6 = mesh.AddNode(67.5,0,0)

Definition at line 134 of file SMESH_AdvancedEditor.py.

tuple SMESH_AdvancedEditor.n7 = mesh.AddNode(70,0,0)

Definition at line 135 of file SMESH_AdvancedEditor.py.

tuple SMESH_AdvancedEditor.n8 = mesh.AddNode(-65,0,0)

Definition at line 150 of file SMESH_AdvancedEditor.py.

tuple SMESH_AdvancedEditor.n9 = mesh.AddNode(-67.5,0,0)

Definition at line 151 of file SMESH_AdvancedEditor.py.

Definition at line 170 of file SMESH_AdvancedEditor.py.

Definition at line 87 of file SMESH_AdvancedEditor.py.

Definition at line 146 of file SMESH_AdvancedEditor.py.

Definition at line 163 of file SMESH_AdvancedEditor.py.

tuple SMESH_AdvancedEditor.nbn = mesh.GetElemNbNodes(j)

Definition at line 102 of file SMESH_AdvancedEditor.py.

Definition at line 99 of file SMESH_AdvancedEditor.py.

Definition at line 172 of file SMESH_AdvancedEditor.py.

Definition at line 171 of file SMESH_AdvancedEditor.py.

Definition at line 90 of file SMESH_AdvancedEditor.py.

Definition at line 92 of file SMESH_AdvancedEditor.py.

Definition at line 177 of file SMESH_AdvancedEditor.py.

Definition at line 100 of file SMESH_AdvancedEditor.py.

tuple SMESH_AdvancedEditor.nn1 = mesh.GetElemNode(j,0)

Definition at line 104 of file SMESH_AdvancedEditor.py.

tuple SMESH_AdvancedEditor.nn2 = mesh.GetElemNode(j,1)

Definition at line 106 of file SMESH_AdvancedEditor.py.

tuple SMESH_AdvancedEditor.nn3 = mesh.GetElemNode(j,2)

Definition at line 108 of file SMESH_AdvancedEditor.py.

list SMESH_AdvancedEditor.nodes = mesh.FindCoincidentNodes(0.001)

Definition at line 81 of file SMESH_AdvancedEditor.py.

Definition at line 176 of file SMESH_AdvancedEditor.py.

tuple SMESH_AdvancedEditor.res = mesh.GetLastCreatedElems()

Definition at line 98 of file SMESH_AdvancedEditor.py.

float SMESH_AdvancedEditor.tol = 0.001

Definition at line 63 of file SMESH_AdvancedEditor.py.

Definition at line 185 of file SMESH_AdvancedEditor.py.

tuple SMESH_AdvancedEditor.xyz = mesh.GetNodeXYZ(j)

Definition at line 189 of file SMESH_AdvancedEditor.py.

tuple SMESH_AdvancedEditor.xyz1 = mesh.GetNodeXYZ(nn1)

Definition at line 105 of file SMESH_AdvancedEditor.py.

tuple SMESH_AdvancedEditor.xyz2 = mesh.GetNodeXYZ(nn2)

Definition at line 107 of file SMESH_AdvancedEditor.py.

tuple SMESH_AdvancedEditor.xyz3 = mesh.GetNodeXYZ(nn3)

Definition at line 109 of file SMESH_AdvancedEditor.py.

Definition at line 89 of file SMESH_AdvancedEditor.py.