1 # Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License.
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # Lesser General Public License for more details.
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with this library; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 # See http://www.salome-platform.org/
20 # CEA/LGLS 2004-2005, Francis KLOSS (OCC)
21 # =======================================
30 # Creer un cylindre surplombe d'une demi-sphere le tout troue par un petit cylindre.
31 # Decouper en hexahedre et mailler.
37 cylindre_hauteur = 400
40 trou_z = cylindre_rayon/2
47 cylindre_base = MakeVertex(0, 0, 0)
48 cylindre_dir = MakeVectorDXDYDZ(1, 0, 0)
49 cylindre = MakeCylinder(cylindre_base, cylindre_dir, cylindre_rayon, cylindre_hauteur)
54 dome_sphere = MakeSpherePntR(cylindre_base, cylindre_rayon)
55 dome = MakeFuse(dome_sphere, cylindre)
60 cheminee_base = MakeVertex(-cylindre_hauteur/2, 0, trou_z)
61 cheminee_trou = MakeCylinder(cheminee_base, cylindre_dir, trou_rayon, 2*cylindre_hauteur)
62 cheminee = MakeCut(dome, cheminee_trou)
64 # Decoupage et reparation
65 # -----------------------
67 blocs_plan1 = MakePlane(cheminee_base, MakeVectorDXDYDZ(0, 1, 0), plan_trim)
68 blocs_plan2 = MakePlane(cheminee_base, MakeVectorDXDYDZ(0, 0, 1), plan_trim)
70 blocs_part = MakePartition([cheminee], [blocs_plan1, blocs_plan2], [], [], ShapeType["SOLID"])
72 piece = RemoveExtraEdges(blocs_part)
77 piece_id = addToStudy(piece, "ex17_dome1")
82 # Maillage hexahedrique
83 # ---------------------
85 hexa = smesh.Mesh(piece, "ex17_dome1:hexa")
88 algo.NumberOfSegments(20)