1 # CEA/LGLS 2004, Francis KLOSS (OCC)
2 # ==================================
35 def triangle(p1, p2, p3):
37 l.append(MakeEdge(p1, p2))
38 l.append(MakeEdge(p2, p3))
39 l.append(MakeEdge(p3, p1))
46 basePoint111 = MakeVertex(ox-longueur1, oy, oz-largeur1)
47 basePoint211 = MakeVertex(ox+longueur2, oy, oz-largeur1)
48 basePoint112 = MakeVertex(ox-longueur1, oy, oz+largeur2)
49 basePoint212 = MakeVertex(ox+longueur2, oy, oz+largeur2)
51 holePoint = MakeVertex(ox, oy, oz)
56 baseFace1 = triangle(basePoint111, basePoint211, holePoint)
57 baseFace2 = triangle(basePoint211, basePoint212, holePoint)
58 baseFace3 = triangle(basePoint212, basePoint112, holePoint)
59 baseFace4 = triangle(basePoint112, basePoint111, holePoint)
64 baseVector = MakeVectorDXDYDZ(0, 1, 0)
66 baseSolid1 = MakePrismVecH(baseFace1, baseVector, hauteur)
67 baseSolid2 = MakePrismVecH(baseFace2, baseVector, hauteur)
68 baseSolid3 = MakePrismVecH(baseFace3, baseVector, hauteur)
69 baseSolid4 = MakePrismVecH(baseFace4, baseVector, hauteur)
71 holeSolid = MakeCylinder(holePoint, baseVector, rayon, hauteur)
76 baseHexa1 = MakeCut(baseSolid1, holeSolid)
77 baseHexa2 = MakeCut(baseSolid2, holeSolid)
78 baseHexa3 = MakeCut(baseSolid3, MakeRotation(holeSolid, baseVector, 3.141592653))
79 baseHexa4 = MakeCut(baseSolid4, holeSolid)
90 c_cpd = MakeCompound(c_l)
91 piece = MakeGlueFaces(c_cpd, 1.e-5)
96 piece_id = addToStudy(piece, "Hole1geometry")
101 # Create hexahedrical mesh on piece
102 # ---------------------------------
104 m_hexa=MeshHexa(piece, 4, "Hole1geometryHexa")