1 # CEA/LGLS 2004-2005, Francis KLOSS (OCC)
2 # =======================================
11 # Element of a grid compound by a square with a cylinder on each vertex build by using partition
29 piecePoint = MakeVertex(ox, oy, oz)
31 pieceBox = MakeBoxTwoPnt(piecePoint, MakeVertex(ox+arete, oy+hauteur, oz+arete))
36 dirUp = MakeVectorDXDYDZ(0, 1, 0)
38 pieceCut1 = MakeCut(pieceBox , MakeCylinder(piecePoint , dirUp, rayon, hauteur))
39 pieceCut2 = MakeCut(pieceCut1, MakeCylinder(MakeVertex(ox+arete, oy, oz ), dirUp, rayon, hauteur))
40 pieceCut3 = MakeCut(pieceCut2, MakeCylinder(MakeVertex(ox , oy, oz+arete), dirUp, rayon, hauteur))
41 pieceCut4 = MakeCut(pieceCut3, MakeCylinder(MakeVertex(ox+arete, oy, oz+arete), dirUp, rayon, hauteur))
43 # Compound by make a partition of a solid
44 # ---------------------------------------
46 dir = MakeVectorDXDYDZ(-1, 0, 1)
49 tools.append(MakePlane(MakeVertex(ox+rayon, oy, oz ), dir, g_trim))
50 tools.append(MakePlane(MakeVertex(ox , oy, oz+rayon), dir, g_trim))
52 piece = MakePartition([pieceCut4], tools, [], [], ShapeType["SOLID"])
57 piece_id = addToStudy(piece, "ex10_grid4geometry")
62 # Create a hexahedral mesh
63 # ------------------------
65 hexa = smesh.Mesh(piece, "ex10_grid4geometry:hexa")
68 algo.NumberOfSegments(10)