X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=doc%2Fsalome%2Fexamples%2Fcreating_meshes_ex02.py;h=230e67a00f8f9ec9886c5288fc37d5941c5d3677;hb=046f5915e17f5038b8a14e6606e9f4ebdeb212e2;hp=3980d4d74ebd3b4cd1fc5f8387981bb5c5faa9bc;hpb=a17b36970bc61da1d664453c615754997c925b18;p=modules%2Fsmesh.git diff --git a/doc/salome/examples/creating_meshes_ex02.py b/doc/salome/examples/creating_meshes_ex02.py index 3980d4d74..230e67a00 100644 --- a/doc/salome/examples/creating_meshes_ex02.py +++ b/doc/salome/examples/creating_meshes_ex02.py @@ -40,11 +40,27 @@ algo_local = mesh.Segment(EdgeX) algo_local.Arithmetic1D(1, 4) # define "Propagation" hypothesis that propagates algo_local and "Arithmetic1D" hypothesis -# on all parallel edges of the box +# from EdgeX to all parallel edges algo_local.Propagation() # assign a hexahedral algorithm mesh.Hexahedron() -# compute the mesh + +# any sub-shape can be meshed individually -- +# compute mesh on two surfaces using different methods + +# get surfaces +surfaces = geompy.SubShapeAll(box, geompy.ShapeType["FACE"]) + +# method 1: no sub-mesh is created +mesh.Compute( surfaces[0] ) + +# method 2: a sub-mesh is created +submesh = mesh.GetSubMesh( surfaces[2], "submesh 2" ) +submesh.Compute() + + + +# compute the whole mesh mesh.Compute()