X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=doc%2Fexamples%2Fcreating_parallel_2D_mesh.py;fp=doc%2Fexamples%2Fcreating_parallel_2D_mesh.py;h=2515543aafbac5a51c3a6696be161a2569b0f34b;hp=a351bfc779bd07a30719ef4ed731e7fa2753a157;hb=aa034dad38ed214bf71255119d299ec6826588f8;hpb=b0b5c3242d8bd2485bb138ef3a9b93b6521b7e60 diff --git a/doc/examples/creating_parallel_2D_mesh.py b/doc/examples/creating_parallel_2D_mesh.py index a351bfc77..2515543aa 100644 --- a/doc/examples/creating_parallel_2D_mesh.py +++ b/doc/examples/creating_parallel_2D_mesh.py @@ -45,8 +45,8 @@ boxes = [] # boxes.append(box) -#With 6 boxes works -#But simplify for 2 boxes to also Test possibility of rewritting the +#With 6 boxes works +#But simplify for 2 boxes to also Test possibility of rewritting the # input mesh from other parallel tests. In that case this test will break # because the input mesh will not match the exported/imported box geometry. for i in range(nbox): @@ -78,12 +78,19 @@ all_boxes = geompy.MakeGlueFaces(all_boxes, 1e-07) geompy.addToStudy(all_boxes, 'Glued_Faces_1') rubik_cube = geompy.MakeGlueEdges(all_boxes, 1e-07) -geompy.addToStudy(all_boxes, 'rubik_cube') +geompy.addToStudy(rubik_cube, 'rubik_cube') smesh = smeshBuilder.New() print("Creating Parallel Mesh") -par_mesh = smesh.ParallelMesh(rubik_cube, name="par_mesh", mesher2D="NETGEN_2D_Remote") +par_mesh = smesh.ParallelMesh(rubik_cube, name="par_mesh") + +print("Creating hypoehtesis for netgen") +NETGEN_2D_Parameters_1 = smesh.CreateHypothesisByAverageLength( 'NETGEN_Parameters_2D', + 'NETGENEngine', 34.641, 0 ) + +print("Adding hypothesis") +par_mesh.Add2DGlobalHypothesis(NETGEN_2D_Parameters_1) print("Setting parallelism method") par_mesh.SetParallelismMethod(smeshBuilder.MULTITHREAD)