Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 from geompy import *
00027
00028 import smesh
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039 cylindre_rayon = 100
00040 cylindre_hauteur = 400
00041
00042 trou_rayon = 20
00043 trou_z = cylindre_rayon/2
00044
00045 plan_trim = 2000
00046
00047
00048
00049
00050 cylindre_base = MakeVertex(0, 0, 0)
00051 cylindre_dir = MakeVectorDXDYDZ(1, 0, 0)
00052 cylindre = MakeCylinder(cylindre_base, cylindre_dir, cylindre_rayon, cylindre_hauteur)
00053
00054
00055
00056
00057 dome_sphere = MakeSpherePntR(cylindre_base, cylindre_rayon)
00058 dome = MakeFuse(dome_sphere, cylindre)
00059
00060
00061
00062
00063 cheminee_base = MakeVertex(-cylindre_hauteur/2, 0, trou_z)
00064 cheminee_trou = MakeCylinder(cheminee_base, cylindre_dir, trou_rayon, 2*cylindre_hauteur)
00065 cheminee = MakeCut(dome, cheminee_trou)
00066
00067
00068
00069
00070 blocs_plan1 = MakePlane(cheminee_base, MakeVectorDXDYDZ(0, 1, 0), plan_trim)
00071 blocs_plan2 = MakePlane(cheminee_base, MakeVectorDXDYDZ(0, 0, 1), plan_trim)
00072
00073 blocs_part = MakePartition([cheminee], [blocs_plan1, blocs_plan2], [], [], ShapeType["SOLID"])
00074
00075 piece = RemoveExtraEdges(blocs_part)
00076
00077
00078
00079
00080 piece_id = addToStudy(piece, "ex17_dome1")
00081
00082
00083
00084
00085 smesh.SetCurrentStudy(salome.myStudy)
00086
00087
00088
00089
00090 hexa = smesh.Mesh(piece, "ex17_dome1:hexa")
00091
00092 algo = hexa.Segment()
00093 algo.NumberOfSegments(20)
00094
00095 hexa.Quadrangle()
00096
00097 hexa.Hexahedron()
00098
00099
00100
00101
00102 hexa.Compute()