From 1b1945a31c3f8023b9261d34b17c2027af7a5974 Mon Sep 17 00:00:00 2001 From: vsr Date: Fri, 20 Feb 2015 10:08:10 +0300 Subject: [PATCH] 0022878: [CEA 1424] performances of Compute method from the Mesh class in smeshBuilder.py --- src/SMESH_SWIG/PAL_MESH_043_3D.py | 4 ++-- src/SMESH_SWIG/SMESH_BuildCompound.py | 2 ++ src/SMESH_SWIG/SMESH_Sphere.py | 2 ++ src/SMESH_SWIG/SMESH_box2_tetra.py | 5 ++--- src/SMESH_SWIG/SMESH_box3_tetra.py | 5 ++--- src/SMESH_SWIG/SMESH_box_tetra.py | 4 ++-- src/SMESH_SWIG/SMESH_fixation_hexa.py | 5 ++--- src/SMESH_SWIG/SMESH_fixation_netgen.py | 4 ++-- src/SMESH_SWIG/SMESH_fixation_tetra.py | 5 ++--- src/SMESH_SWIG/SMESH_flight_skin.py | 6 ++---- src/SMESH_SWIG/SMESH_mechanic_netgen.py | 4 ++-- src/SMESH_SWIG/SMESH_test.py | 2 ++ src/SMESH_SWIG/ex01_cube2build.py | 5 +++++ src/SMESH_SWIG/ex02_cube2primitive.py | 5 +++++ src/SMESH_SWIG/ex03_cube2partition.py | 5 +++++ src/SMESH_SWIG/ex04_cube5tetraHexa.py | 5 +++++ src/SMESH_SWIG/ex05_hole1build.py | 5 +++++ src/SMESH_SWIG/ex06_hole1boolean.py | 5 +++++ src/SMESH_SWIG/ex07_hole1partition.py | 5 +++++ src/SMESH_SWIG/ex08_hole2build.py | 5 +++++ src/SMESH_SWIG/ex09_grid4build.py | 5 +++++ src/SMESH_SWIG/ex10_grid4geometry.py | 5 +++++ src/SMESH_SWIG/ex11_grid3partition.py | 5 +++++ src/SMESH_SWIG/ex12_grid17partition.py | 5 +++++ src/SMESH_SWIG/ex13_hole1partial.py | 5 +++++ src/SMESH_SWIG/ex14_cyl1holed.py | 5 +++++ src/SMESH_SWIG/ex15_cyl2geometry.py | 5 +++++ src/SMESH_SWIG/ex16_cyl2complementary.py | 5 +++++ src/SMESH_SWIG/ex17_dome1.py | 4 ++++ src/SMESH_SWIG/ex18_dome2.py | 5 +++++ src/SMESH_SWIG/ex19_sphereINcube.py | 5 +++++ src/SMESH_SWIG/ex21_lamp.py | 5 +++++ src/SMESH_SWIG/ex24_cylinder.py | 5 +++++ src/SMESH_SWIG/ex30_tepal.py | 5 +++++ src/SMESH_SWIG/smeshBuilder.py | 17 ++++++++++------- 35 files changed, 143 insertions(+), 31 deletions(-) diff --git a/src/SMESH_SWIG/PAL_MESH_043_3D.py b/src/SMESH_SWIG/PAL_MESH_043_3D.py index 46dfeef61..baa2649dc 100755 --- a/src/SMESH_SWIG/PAL_MESH_043_3D.py +++ b/src/SMESH_SWIG/PAL_MESH_043_3D.py @@ -89,5 +89,5 @@ smesh.SetName(hypNbSeg2, "NumberOfSegments_" + str(numberOfSegments2)) mesh1.Compute() mesh2.Compute() -# ---- udate object browser -salome.sg.updateObjBrowser(1); +# ---- update object browser +salome.sg.updateObjBrowser(1) diff --git a/src/SMESH_SWIG/SMESH_BuildCompound.py b/src/SMESH_SWIG/SMESH_BuildCompound.py index 724dce7e4..7a8d552ea 100644 --- a/src/SMESH_SWIG/SMESH_BuildCompound.py +++ b/src/SMESH_SWIG/SMESH_BuildCompound.py @@ -103,3 +103,5 @@ smesh.SetName(Compound1, 'Compound_with_RenamedGrps_and_MergeElems') Compound2 = smesh.Concatenate([Mesh_inf.GetMesh(), Mesh_sup.GetMesh()], 1, 0, 1e-05, True) smesh.SetName(Compound2, 'Compound_with_UniteGrps_and_GrpsOfAllElems') #end + +salome.sg.updateObjBrowser(1) diff --git a/src/SMESH_SWIG/SMESH_Sphere.py b/src/SMESH_SWIG/SMESH_Sphere.py index b23eccab9..9e3d72463 100644 --- a/src/SMESH_SWIG/SMESH_Sphere.py +++ b/src/SMESH_SWIG/SMESH_Sphere.py @@ -117,3 +117,5 @@ algo.NumberOfSegments(NbSeg) my_hexa.Quadrangle() my_hexa.Hexahedron() my_hexa.Compute() + +salome.sg.updateObjBrowser(1) diff --git a/src/SMESH_SWIG/SMESH_box2_tetra.py b/src/SMESH_SWIG/SMESH_box2_tetra.py index 7c7fadd06..a4b9ce58e 100644 --- a/src/SMESH_SWIG/SMESH_box2_tetra.py +++ b/src/SMESH_SWIG/SMESH_box2_tetra.py @@ -121,9 +121,6 @@ print hypVolume.GetId() print hypVolume.GetMaxElementVolume() smesh.SetName(hypVolume, "MaxElementVolume_" + str(maxElementVolume)) - -salome.sg.updateObjBrowser(1) - print "-------------------------- compute shell" ret = mesh.Compute() print ret @@ -140,3 +137,5 @@ if ret != 0: print "Number of tetrahedrons: ", mesh.NbTetras() else: print "probleme when computing the mesh" + +salome.sg.updateObjBrowser(1) diff --git a/src/SMESH_SWIG/SMESH_box3_tetra.py b/src/SMESH_SWIG/SMESH_box3_tetra.py index 65e2a8e26..f2cfeb4dd 100644 --- a/src/SMESH_SWIG/SMESH_box3_tetra.py +++ b/src/SMESH_SWIG/SMESH_box3_tetra.py @@ -131,9 +131,6 @@ print hypVolume.GetId() print hypVolume.GetMaxElementVolume() smesh.SetName(hypVolume, "MaxElementVolume_" + str(maxElementVolume)) - -salome.sg.updateObjBrowser(1) - print "-------------------------- compute shell" ret = mesh.Compute() print ret @@ -150,3 +147,5 @@ if ret != 0: print "Number of tetrahedrons: ", mesh.NbTetras() else: print "probleme when computing the mesh" + +salome.sg.updateObjBrowser(1) diff --git a/src/SMESH_SWIG/SMESH_box_tetra.py b/src/SMESH_SWIG/SMESH_box_tetra.py index ad6b4b344..2f96f70a3 100644 --- a/src/SMESH_SWIG/SMESH_box_tetra.py +++ b/src/SMESH_SWIG/SMESH_box_tetra.py @@ -90,8 +90,6 @@ print hypVolume.GetId() print hypVolume.GetMaxElementVolume() smesh.SetName(hypVolume, "MaxElementVolume_" + str(maxElementVolume)) -salome.sg.updateObjBrowser(1) - print "-------------------------- compute the mesh of the boxe" ret = mesh.Compute() print ret @@ -108,3 +106,5 @@ if ret != 0: print "Number of tetrahedrons: ", mesh.NbTetras() else: print "probleme when computing the mesh" + +salome.sg.updateObjBrowser(1) diff --git a/src/SMESH_SWIG/SMESH_fixation_hexa.py b/src/SMESH_SWIG/SMESH_fixation_hexa.py index 0b3be6949..e0b0c0bad 100644 --- a/src/SMESH_SWIG/SMESH_fixation_hexa.py +++ b/src/SMESH_SWIG/SMESH_fixation_hexa.py @@ -82,9 +82,6 @@ print "-------------------------- Hexa_3D" hexa3D = mesh.Hexahedron() hexa3D.SetName("Hexa_3D") - -salome.sg.updateObjBrowser(1) - print "-------------------------- compute compshell" ret = mesh.Compute() print ret @@ -101,3 +98,5 @@ if ret != 0: print "Number of hexahedrons : ", mesh.NbHexas() else: print "problem when Computing the mesh" + +salome.sg.updateObjBrowser(1) diff --git a/src/SMESH_SWIG/SMESH_fixation_netgen.py b/src/SMESH_SWIG/SMESH_fixation_netgen.py index 542fdce4b..c8ad219be 100644 --- a/src/SMESH_SWIG/SMESH_fixation_netgen.py +++ b/src/SMESH_SWIG/SMESH_fixation_netgen.py @@ -61,8 +61,6 @@ netgen.SetMaxSize( 50 ) netgen.SetFineness( smeshBuilder.Fine ) #netgen.SetOptimize( 1 ) -salome.sg.updateObjBrowser(1) - print "-------------------------- compute mesh" ret = mesh.Compute() print ret @@ -77,3 +75,5 @@ if ret != 0: else: print "problem when computing the mesh" + +salome.sg.updateObjBrowser(1) diff --git a/src/SMESH_SWIG/SMESH_fixation_tetra.py b/src/SMESH_SWIG/SMESH_fixation_tetra.py index 5840aef88..daf2b8793 100644 --- a/src/SMESH_SWIG/SMESH_fixation_tetra.py +++ b/src/SMESH_SWIG/SMESH_fixation_tetra.py @@ -105,9 +105,6 @@ print hypVolume.GetId() print hypVolume.GetMaxElementVolume() smesh.SetName(hypVolume, "MaxElementVolume_" + str(maxElementVolume)) - -salome.sg.updateObjBrowser(1) - print "-------------------------- compute compshell" ret = mesh.Compute(mesh) print ret @@ -125,3 +122,5 @@ if ret != 0: else: print "problem when computing the mesh" + +salome.sg.updateObjBrowser(1) diff --git a/src/SMESH_SWIG/SMESH_flight_skin.py b/src/SMESH_SWIG/SMESH_flight_skin.py index fa3c9743e..225fb0941 100644 --- a/src/SMESH_SWIG/SMESH_flight_skin.py +++ b/src/SMESH_SWIG/SMESH_flight_skin.py @@ -91,10 +91,6 @@ print hypLengthFromEdge.GetName() print hypLengthFromEdge.GetId() smesh.SetName(hypLengthFromEdge,"LengthFromEdge") - -salome.sg.updateObjBrowser(1) - - print "-------------------------- compute the skin flight" ret = mesh.Compute() print ret @@ -110,3 +106,5 @@ if ret != 0: print "Number of volumes : ", mesh.NbVolumes() else: print "probleme when computing the mesh" + +salome.sg.updateObjBrowser(1) diff --git a/src/SMESH_SWIG/SMESH_mechanic_netgen.py b/src/SMESH_SWIG/SMESH_mechanic_netgen.py index 543349736..46670e57b 100644 --- a/src/SMESH_SWIG/SMESH_mechanic_netgen.py +++ b/src/SMESH_SWIG/SMESH_mechanic_netgen.py @@ -119,8 +119,6 @@ netgen.SetFineness( smeshBuilder.Fine ) netgen.SetQuadAllowed( 1 ) #netgen.SetOptimize( 1 ) -salome.sg.updateObjBrowser(1) - print "-------------------------- compute mesh" ret = mesh.Compute() print ret @@ -136,3 +134,5 @@ if ret != 0: else: print "problem when computing the mesh" + +salome.sg.updateObjBrowser(1) diff --git a/src/SMESH_SWIG/SMESH_test.py b/src/SMESH_SWIG/SMESH_test.py index e38dfb6b3..e153cd658 100644 --- a/src/SMESH_SWIG/SMESH_test.py +++ b/src/SMESH_SWIG/SMESH_test.py @@ -146,3 +146,5 @@ for a in log: #ii = ii+1 ii = ii+1 print "AddTriangle %i - %i %i %i" % (ind, i1, i2, i3) + +salome.sg.updateObjBrowser(1) diff --git a/src/SMESH_SWIG/ex01_cube2build.py b/src/SMESH_SWIG/ex01_cube2build.py index 8374aab46..f5bc3b385 100644 --- a/src/SMESH_SWIG/ex01_cube2build.py +++ b/src/SMESH_SWIG/ex01_cube2build.py @@ -319,3 +319,8 @@ algo.Propagation() # ---------------- hexa.Compute() + +# Update object browser +# --------------------- + +salome.sg.updateObjBrowser(1) diff --git a/src/SMESH_SWIG/ex02_cube2primitive.py b/src/SMESH_SWIG/ex02_cube2primitive.py index d7307f4bb..e80bb8e50 100644 --- a/src/SMESH_SWIG/ex02_cube2primitive.py +++ b/src/SMESH_SWIG/ex02_cube2primitive.py @@ -121,3 +121,8 @@ hexa.Hexahedron() # ---------------- hexa.Compute() + +# Update object browser +# --------------------- + +salome.sg.updateObjBrowser(1) diff --git a/src/SMESH_SWIG/ex03_cube2partition.py b/src/SMESH_SWIG/ex03_cube2partition.py index 7a3dd871f..18a725b92 100644 --- a/src/SMESH_SWIG/ex03_cube2partition.py +++ b/src/SMESH_SWIG/ex03_cube2partition.py @@ -108,3 +108,8 @@ hexa.Hexahedron() # ---------------- hexa.Compute() + +# Update object browser +# --------------------- + +salome.sg.updateObjBrowser(1) diff --git a/src/SMESH_SWIG/ex04_cube5tetraHexa.py b/src/SMESH_SWIG/ex04_cube5tetraHexa.py index 69da3a5e1..9039986c7 100644 --- a/src/SMESH_SWIG/ex04_cube5tetraHexa.py +++ b/src/SMESH_SWIG/ex04_cube5tetraHexa.py @@ -113,3 +113,8 @@ localMesh(box_tetra2, 0) # ------------- mixed.Compute() + +# Update object browser +# --------------------- + +salome.sg.updateObjBrowser(1) diff --git a/src/SMESH_SWIG/ex05_hole1build.py b/src/SMESH_SWIG/ex05_hole1build.py index c715d6573..5fa0caffc 100644 --- a/src/SMESH_SWIG/ex05_hole1build.py +++ b/src/SMESH_SWIG/ex05_hole1build.py @@ -148,3 +148,8 @@ hexa.Hexahedron() # ------------- hexa.Compute() + +# Update object browser +# --------------------- + +salome.sg.updateObjBrowser(1) diff --git a/src/SMESH_SWIG/ex06_hole1boolean.py b/src/SMESH_SWIG/ex06_hole1boolean.py index 2daac570d..00cad90e6 100644 --- a/src/SMESH_SWIG/ex06_hole1boolean.py +++ b/src/SMESH_SWIG/ex06_hole1boolean.py @@ -165,3 +165,8 @@ algo4.Propagation() # ------------- hexa.Compute() + +# Update object browser +# --------------------- + +salome.sg.updateObjBrowser(1) diff --git a/src/SMESH_SWIG/ex07_hole1partition.py b/src/SMESH_SWIG/ex07_hole1partition.py index 96894aca6..c6f1a607f 100644 --- a/src/SMESH_SWIG/ex07_hole1partition.py +++ b/src/SMESH_SWIG/ex07_hole1partition.py @@ -105,3 +105,8 @@ hexa.Hexahedron() # ------------- hexa.Compute() + +# Update object browser +# --------------------- + +salome.sg.updateObjBrowser(1) diff --git a/src/SMESH_SWIG/ex08_hole2build.py b/src/SMESH_SWIG/ex08_hole2build.py index 5219a0c85..3ce8e825a 100644 --- a/src/SMESH_SWIG/ex08_hole2build.py +++ b/src/SMESH_SWIG/ex08_hole2build.py @@ -138,3 +138,8 @@ hexa.Hexahedron() # ------------- hexa.Compute() + +# Update object browser +# --------------------- + +salome.sg.updateObjBrowser(1) diff --git a/src/SMESH_SWIG/ex09_grid4build.py b/src/SMESH_SWIG/ex09_grid4build.py index b20e802ee..c9509b5e4 100644 --- a/src/SMESH_SWIG/ex09_grid4build.py +++ b/src/SMESH_SWIG/ex09_grid4build.py @@ -141,3 +141,8 @@ hexa.Hexahedron() # ------------- hexa.Compute() + +# Update object browser +# --------------------- + +salome.sg.updateObjBrowser(1) diff --git a/src/SMESH_SWIG/ex10_grid4geometry.py b/src/SMESH_SWIG/ex10_grid4geometry.py index c308683c8..f7066d8c1 100644 --- a/src/SMESH_SWIG/ex10_grid4geometry.py +++ b/src/SMESH_SWIG/ex10_grid4geometry.py @@ -103,3 +103,8 @@ hexa.Hexahedron() # ------------- hexa.Compute() + +# Update object browser +# --------------------- + +salome.sg.updateObjBrowser(1) diff --git a/src/SMESH_SWIG/ex11_grid3partition.py b/src/SMESH_SWIG/ex11_grid3partition.py index dc340413f..939559ef7 100644 --- a/src/SMESH_SWIG/ex11_grid3partition.py +++ b/src/SMESH_SWIG/ex11_grid3partition.py @@ -124,3 +124,8 @@ hexa.Hexahedron() # ------------- hexa.Compute() + +# Update object browser +# --------------------- + +salome.sg.updateObjBrowser(1) diff --git a/src/SMESH_SWIG/ex12_grid17partition.py b/src/SMESH_SWIG/ex12_grid17partition.py index 0c559aebf..81e1b800f 100644 --- a/src/SMESH_SWIG/ex12_grid17partition.py +++ b/src/SMESH_SWIG/ex12_grid17partition.py @@ -139,3 +139,8 @@ hexa.Hexahedron() # ------------- hexa.Compute() + +# Update object browser +# --------------------- + +salome.sg.updateObjBrowser(1) diff --git a/src/SMESH_SWIG/ex13_hole1partial.py b/src/SMESH_SWIG/ex13_hole1partial.py index 4524a7764..da9807f3e 100644 --- a/src/SMESH_SWIG/ex13_hole1partial.py +++ b/src/SMESH_SWIG/ex13_hole1partial.py @@ -257,3 +257,8 @@ local(cyl_x+d, cyl_y+d, box_dz, 10) # ---------------- hexa.Compute() + +# Update object browser +# --------------------- + +salome.sg.updateObjBrowser(1) diff --git a/src/SMESH_SWIG/ex14_cyl1holed.py b/src/SMESH_SWIG/ex14_cyl1holed.py index fe1a0dcb4..e95938025 100644 --- a/src/SMESH_SWIG/ex14_cyl1holed.py +++ b/src/SMESH_SWIG/ex14_cyl1holed.py @@ -142,3 +142,8 @@ while m_i