Back to index

salome-smesh  6.5.0
Functions | Variables
ex13_hole1partial Namespace Reference

Functions

def triangle
def local

Variables

int box_dx = 1000
int box_dy = 900
int box_dz = 800
int cyl_x = 500
int cyl_y = 300
int cyl_dz = 600
int cyl_radius = 150
int cyl_thick = 30
tuple hole_point_11 = MakeVertex(0 , 0 , 0)
tuple hole_point_21 = MakeVertex(box_dx, 0 , 0)
tuple hole_point_12 = MakeVertex(0 , box_dy, 0)
tuple hole_point_22 = MakeVertex(box_dx, box_dy, 0)
tuple hole_center = MakeVertex(cyl_x, cyl_y, 0)
tuple hole_face_1 = triangle(hole_point_11, hole_point_21, hole_center)
tuple hole_face_2 = triangle(hole_point_21, hole_point_22, hole_center)
tuple hole_face_3 = triangle(hole_point_12, hole_point_22, hole_center)
tuple hole_face_4 = triangle(hole_point_11, hole_point_12, hole_center)
tuple cyl_dir = MakeVectorDXDYDZ(0, 0, 1)
tuple hole_solid_1 = MakePrismVecH(hole_face_1, cyl_dir, cyl_dz)
tuple hole_solid_2 = MakePrismVecH(hole_face_2, cyl_dir, cyl_dz)
tuple hole_solid_3 = MakePrismVecH(hole_face_3, cyl_dir, cyl_dz)
tuple hole_solid_4 = MakePrismVecH(hole_face_4, cyl_dir, cyl_dz)
tuple hole_internal = MakeCylinder(hole_center, cyl_dir, cyl_radius , cyl_dz)
tuple hole_external = MakeCylinder(hole_center, cyl_dir, cyl_radius+cyl_thick, cyl_dz)
tuple hole_median = MakeCut(hole_external, hole_internal)
list blocks = []
tuple full_point_11 = MakeVertex(0 , 0 , cyl_dz)
tuple full_point_21 = MakeVertex(box_dx, 0 , cyl_dz)
tuple full_point_12 = MakeVertex(0 , box_dy, cyl_dz)
tuple full_point_22 = MakeVertex(box_dx, box_dy, cyl_dz)
tuple full_center = MakeVertex(cyl_x, cyl_y, cyl_dz)
tuple full_face_1 = triangle(full_point_11, full_point_21, full_center)
tuple full_face_2 = triangle(full_point_21, full_point_22, full_center)
tuple full_face_3 = triangle(full_point_12, full_point_22, full_center)
tuple full_face_4 = triangle(full_point_11, full_point_12, full_center)
 full_dz = box_dz-cyl_dz
tuple full_solid_1 = MakePrismVecH(full_face_1, cyl_dir, full_dz)
tuple full_solid_2 = MakePrismVecH(full_face_2, cyl_dir, full_dz)
tuple full_solid_3 = MakePrismVecH(full_face_3, cyl_dir, full_dz)
tuple full_solid_4 = MakePrismVecH(full_face_4, cyl_dir, full_dz)
tuple full_internal = MakeCylinder(full_center, cyl_dir, cyl_radius , full_dz)
tuple full_external = MakeCylinder(full_center, cyl_dir, cyl_radius+cyl_thick, full_dz)
tuple full_median = MakeCut(full_external, full_internal)
list full = []
int box_d = 3
 x = cyl_x-box_d
 y = x*cyl_y/cyl_x
tuple box_point_11 = MakeVertex(x, y, cyl_dz)
tuple box_point_12 = MakeVertex(x, y, cyl_dz)
tuple box_point_21 = MakeVertex(x, y, cyl_dz)
tuple box_point_22 = MakeVertex(x, y, cyl_dz)
tuple box_face = MakeQuad4Vertices(box_point_11, box_point_12, box_point_21, box_point_22)
tuple box = MakePrismVecH(box_face, cyl_dir, full_dz)
tuple full_plan = MakePlane(MakeVertex(0, 0, cyl_dz+cyl_thick), cyl_dir, 5000)
tuple full_parts = MakePartition(full, [full_plan], [], [], ShapeType["SOLID"])
tuple piece_cpd = MakeCompound(blocks)
tuple piece_ok = RemoveExtraEdges(piece_cpd, doUnionFaces=True)
tuple piece = MakeGlueFaces(piece_ok, 1.e-3)
tuple piece_id = addToStudy(piece, "ex13_hole1partial")
tuple hexa = smesh.Mesh(piece, "ex13_hole1partial:hexa")
tuple algo = hexa.Segment()
int d = 3
 coefficient constant de l'√©quation du plan de coupe

Function Documentation

def ex13_hole1partial.local (   x,
  y,
  z,
  d 
)

Definition at line 235 of file ex13_hole1partial.py.

00235 
00236 def local(x, y, z, d):
00237     edge = GetEdgeNearPoint(piece, MakeVertex(x, y, z))
00238     algo = hexa.Segment(edge)
00239     algo.NumberOfSegments(d)
00240     algo.Propagation()
00241 
00242 local(0, 0, 100, 40)
00243 local(0, 0, 700, 15)
00244 
00245 local(100, 0, 0, 20)
00246 local(0, 100, 0, 20)
00247 
00248 local(100, 100, 0, 25)

Here is the caller graph for this function:

def ex13_hole1partial.triangle (   p1,
  p2,
  p3 
)

Definition at line 51 of file ex13_hole1partial.py.

00051 
00052 def triangle(p1, p2, p3):
00053     l = []
00054     l.append(MakeEdge(p1, p2))
00055     l.append(MakeEdge(p2, p3))
00056     l.append(MakeEdge(p3, p1))
00057     w = MakeWire(l)
00058     return MakeFace(w, 1)
00059 
00060 # The holed part
00061 # ==============
00062 
00063 # Vertex of the holed part
00064 # ------------------------

Here is the call graph for this function:


Variable Documentation

tuple ex13_hole1partial.algo = hexa.Segment()

Definition at line 225 of file ex13_hole1partial.py.

Definition at line 97 of file ex13_hole1partial.py.

tuple ex13_hole1partial.box = MakePrismVecH(box_face, cyl_dir, full_dz)

Definition at line 186 of file ex13_hole1partial.py.

Definition at line 166 of file ex13_hole1partial.py.

Definition at line 38 of file ex13_hole1partial.py.

Definition at line 39 of file ex13_hole1partial.py.

Definition at line 40 of file ex13_hole1partial.py.

Definition at line 184 of file ex13_hole1partial.py.

tuple ex13_hole1partial.box_point_11 = MakeVertex(x, y, cyl_dz)

Definition at line 170 of file ex13_hole1partial.py.

tuple ex13_hole1partial.box_point_12 = MakeVertex(x, y, cyl_dz)

Definition at line 174 of file ex13_hole1partial.py.

tuple ex13_hole1partial.box_point_21 = MakeVertex(x, y, cyl_dz)

Definition at line 178 of file ex13_hole1partial.py.

tuple ex13_hole1partial.box_point_22 = MakeVertex(x, y, cyl_dz)

Definition at line 182 of file ex13_hole1partial.py.

tuple ex13_hole1partial.cyl_dir = MakeVectorDXDYDZ(0, 0, 1)

Definition at line 83 of file ex13_hole1partial.py.

Definition at line 44 of file ex13_hole1partial.py.

Definition at line 45 of file ex13_hole1partial.py.

Definition at line 46 of file ex13_hole1partial.py.

Definition at line 42 of file ex13_hole1partial.py.

Definition at line 43 of file ex13_hole1partial.py.

coefficient constant de l'équation du plan de coupe

Definition at line 249 of file ex13_hole1partial.py.

Definition at line 149 of file ex13_hole1partial.py.

Definition at line 122 of file ex13_hole1partial.py.

Definition at line 135 of file ex13_hole1partial.py.

Definition at line 143 of file ex13_hole1partial.py.

Definition at line 127 of file ex13_hole1partial.py.

Definition at line 128 of file ex13_hole1partial.py.

Definition at line 129 of file ex13_hole1partial.py.

Definition at line 130 of file ex13_hole1partial.py.

Definition at line 142 of file ex13_hole1partial.py.

Definition at line 144 of file ex13_hole1partial.py.

tuple ex13_hole1partial.full_parts = MakePartition(full, [full_plan], [], [], ShapeType["SOLID"])

Definition at line 200 of file ex13_hole1partial.py.

tuple ex13_hole1partial.full_plan = MakePlane(MakeVertex(0, 0, cyl_dz+cyl_thick), cyl_dir, 5000)

Definition at line 198 of file ex13_hole1partial.py.

tuple ex13_hole1partial.full_point_11 = MakeVertex(0 , 0 , cyl_dz)

Definition at line 117 of file ex13_hole1partial.py.

tuple ex13_hole1partial.full_point_12 = MakeVertex(0 , box_dy, cyl_dz)

Definition at line 119 of file ex13_hole1partial.py.

tuple ex13_hole1partial.full_point_21 = MakeVertex(box_dx, 0 , cyl_dz)

Definition at line 118 of file ex13_hole1partial.py.

Definition at line 120 of file ex13_hole1partial.py.

Definition at line 137 of file ex13_hole1partial.py.

Definition at line 138 of file ex13_hole1partial.py.

Definition at line 139 of file ex13_hole1partial.py.

Definition at line 140 of file ex13_hole1partial.py.

tuple ex13_hole1partial.hexa = smesh.Mesh(piece, "ex13_hole1partial:hexa")

Definition at line 223 of file ex13_hole1partial.py.

tuple ex13_hole1partial.hole_center = MakeVertex(cyl_x, cyl_y, 0)

Definition at line 70 of file ex13_hole1partial.py.

Definition at line 91 of file ex13_hole1partial.py.

Definition at line 75 of file ex13_hole1partial.py.

Definition at line 76 of file ex13_hole1partial.py.

Definition at line 77 of file ex13_hole1partial.py.

Definition at line 78 of file ex13_hole1partial.py.

Definition at line 90 of file ex13_hole1partial.py.

Definition at line 92 of file ex13_hole1partial.py.

tuple ex13_hole1partial.hole_point_11 = MakeVertex(0 , 0 , 0)

Definition at line 65 of file ex13_hole1partial.py.

tuple ex13_hole1partial.hole_point_12 = MakeVertex(0 , box_dy, 0)

Definition at line 67 of file ex13_hole1partial.py.

tuple ex13_hole1partial.hole_point_21 = MakeVertex(box_dx, 0 , 0)

Definition at line 66 of file ex13_hole1partial.py.

Definition at line 68 of file ex13_hole1partial.py.

Definition at line 85 of file ex13_hole1partial.py.

Definition at line 86 of file ex13_hole1partial.py.

Definition at line 87 of file ex13_hole1partial.py.

Definition at line 88 of file ex13_hole1partial.py.

tuple ex13_hole1partial.piece = MakeGlueFaces(piece_ok, 1.e-3)

Definition at line 211 of file ex13_hole1partial.py.

tuple ex13_hole1partial.piece_cpd = MakeCompound(blocks)

Definition at line 207 of file ex13_hole1partial.py.

tuple ex13_hole1partial.piece_id = addToStudy(piece, "ex13_hole1partial")

Definition at line 213 of file ex13_hole1partial.py.

tuple ex13_hole1partial.piece_ok = RemoveExtraEdges(piece_cpd, doUnionFaces=True)

Definition at line 209 of file ex13_hole1partial.py.

Definition at line 168 of file ex13_hole1partial.py.

Definition at line 169 of file ex13_hole1partial.py.