1 # CEA/LGLS 2004, Francis KLOSS (OCC)
2 # ==================================
13 # Create the hexahedrical block geometry of a holed parallelepipede.
14 # The hole has a T form composed by 2 cylinders with different radius, and their axis are normal.
15 # This piece is meshed in hexahedrical.
36 p_boite = MakeBox(gx-g_dx, gy-g_dy, gz-g_dz, gx+g_dx, gy+g_dy, gz+g_dz)
41 g_base = MakeVertex(gx-g_dx, gy, gz)
42 g_dir = MakeVectorDXDYDZ(1, 0, 0)
43 g_cyl = MakeCylinder(g_base, g_dir, g_rayonGrand, g_dx*2)
48 b_boite = MakeCut(p_boite , g_cyl)
53 p_base = MakeVertex(gx, gy, gz)
57 p_tools.append(MakePlane(p_base, MakeVectorDXDYDZ(0, 1 , 0 ), g_trim))
58 p_tools.append(MakePlane(p_base, MakeVectorDXDYDZ(0, g_dz, g_dy), g_trim))
59 p_tools.append(MakePlane(p_base, MakeVectorDXDYDZ(0, -g_dz, g_dy), g_trim))
61 p_tools.append(MakePlane(MakeVertex(gx-g_rayonPetit, gy, gz), g_dir, g_trim))
62 p_tools.append(MakePlane(MakeVertex(gx+g_rayonPetit, gy, gz), g_dir, g_trim))
64 p_piece = MakePartition([b_boite], p_tools, [], [], ShapeType["SOLID"])
69 c_cyl = MakeCylinder(p_base, MakeVectorDXDYDZ(0, 0, 1), g_rayonPetit, g_dz)
74 d_element = SubShapeAllSorted(p_piece, ShapeType["SOLID"])
76 d_element[ 8] = MakeCut(d_element[ 8], c_cyl)
77 d_element[10] = MakeCut(d_element[10], c_cyl)
82 comp_all = MakeCompound(d_element)
83 piece = BlocksOp.RemoveExtraEdges(comp_all)
84 #piece = MakeCompound(d_element)
89 piece_id = addToStudy(piece, "BoxHoled2Cylinders")
94 # Mesh with hexahedrons
95 # ---------------------
97 m_hexa=MeshHexa(piece, 4, "BoxHoled2CylindersHexa")