1 # CEA/LGLS 2004-2005, Francis KLOSS (OCC)
2 # =======================================
11 # A small cube centered and put on a great cube build by primitive geometric functionalities
25 blockPoint111 = MakeVertex(ox , oy, oz)
26 blockPoint211 = MakeVertex(ox+arete, oy, oz)
27 blockPoint112 = MakeVertex(ox , oy, oz+arete)
28 blockPoint212 = MakeVertex(ox+arete, oy, oz+arete)
33 blockFace1 = MakeQuad4Vertices(blockPoint111, blockPoint211, blockPoint212, blockPoint112)
35 blockSolid11 = MakePrismVecH(blockFace1, MakeVectorDXDYDZ(0, 1, 0), arete)
40 blockSolid21 = MakeTranslation(blockSolid11, arete, 0, 0)
41 blockSolid31 = MakeTranslation(blockSolid21, arete, 0, 0)
43 blockSolid12 = MakeTranslation(blockSolid11, 0, 0, arete)
44 blockSolid22 = MakeTranslation(blockSolid12, arete, 0, 0)
45 blockSolid32 = MakeTranslation(blockSolid22, arete, 0, 0)
47 blockSolid13 = MakeTranslation(blockSolid12, 0, 0, arete)
48 blockSolid23 = MakeTranslation(blockSolid13, arete, 0, 0)
49 blockSolid33 = MakeTranslation(blockSolid23, arete, 0, 0)
51 blockSolid111 = MakeTranslation(blockSolid22, 0, arete, 0)
57 c_l.append(blockSolid11)
58 c_l.append(blockSolid21)
59 c_l.append(blockSolid31)
60 c_l.append(blockSolid12)
61 c_l.append(blockSolid22)
62 c_l.append(blockSolid32)
63 c_l.append(blockSolid13)
64 c_l.append(blockSolid23)
65 c_l.append(blockSolid33)
66 c_l.append(blockSolid111)
68 c_cpd = MakeCompound(c_l)
70 piece = MakeGlueFaces(c_cpd, 1.e-5)
75 piece_id = addToStudy(piece, "ex02_cube2primitive")
80 # Create hexahedrical mesh on piece
81 # ---------------------------------
83 hexa = smesh.Mesh(piece, "ex02_cube2primitive:hexa")