1 # CEA/LGLS 2004, Francis KLOSS (OCC)
2 # ==================================
13 # grid compound by a square with a cylinder on each vertex
31 piecePoint = MakeVertex(ox, oy, oz)
33 pieceBox = MakeBoxTwoPnt(piecePoint, MakeVertex(ox+arete, oy+hauteur, oz+arete))
38 dirUp = MakeVectorDXDYDZ(0, 1, 0)
40 pieceCut1 = MakeCut(pieceBox , MakeCylinder(piecePoint , dirUp, rayon, hauteur))
41 pieceCut2 = MakeCut(pieceCut1, MakeCylinder(MakeVertex(ox+arete, oy, oz ), dirUp, rayon, hauteur))
42 pieceCut3 = MakeCut(pieceCut2, MakeCylinder(MakeVertex(ox , oy, oz+arete), dirUp, rayon, hauteur))
43 pieceCut4 = MakeCut(pieceCut3, MakeCylinder(MakeVertex(ox+arete, oy, oz+arete), dirUp, rayon, hauteur))
45 # Compound by make a partition of a solid
46 # ---------------------------------------
48 dir = MakeVectorDXDYDZ(-1, 0, 1)
51 tools.append(MakePlane(MakeVertex(ox+rayon, oy, oz ), dir, g_trim))
52 tools.append(MakePlane(MakeVertex(ox , oy, oz+rayon), dir, g_trim))
54 piece = MakePartition([pieceCut4], tools, [], [], ShapeType["SOLID"])
59 piece_id = addToStudy(piece, "Grid4partition")
64 # Create hexahedrical mesh on piece
65 # ---------------------------------
67 m_hexa=MeshHexa(piece, 4, "Grid4partitionHexa")