X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=tests%2Ftest_sphere.py;h=5f622107283edaabfffa82a44c31e87b9403165e;hb=1a4ddaa3e853fe240d166df56c6b3a6149a537e3;hp=2f52eb1f03c4b99783ce79a69af1f12dbf824244;hpb=f5d7d05b75bfc4929980962223a22b6731cdb9ea;p=plugins%2Fblsurfplugin.git diff --git a/tests/test_sphere.py b/tests/test_sphere.py index 2f52eb1..5f62210 100644 --- a/tests/test_sphere.py +++ b/tests/test_sphere.py @@ -4,7 +4,6 @@ import sys import salome salome.salome_init() -theStudy = salome.myStudy ### ### GEOM component @@ -12,10 +11,10 @@ theStudy = salome.myStudy import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() -geompy.init_geom(theStudy) +geompy.init_geom() sphere = geompy.MakeSphereR(10) geompy.addToStudy( sphere, 'sphere' ) @@ -26,7 +25,7 @@ geompy.addToStudy( sphere, 'sphere' ) import SMESH from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() Mesh_1 = smesh.Mesh(sphere) @@ -36,12 +35,6 @@ BLSURF_Parameters = BLSURF_1.Parameters() BLSURF_Parameters.SetPhySize( 5 ) BLSURF_Parameters.SetGeometricMesh( 1 ) BLSURF_Parameters.SetAngleMesh( 8 ) -# Activate PreCAD -# REMARK: These lines are the default behaviour from Salome 7.5.0 -# => It is not needed to add them -#BLSURF_Parameters.SetTopology( 3 ) -#BLSURF_Parameters.SetPreCADMergeEdges( False ) -#BLSURF_Parameters.SetPreCADProcess3DTopology( False ) ok = Mesh_1.Compute() @@ -55,16 +48,5 @@ ok = Mesh_1.Compute() if not ok: raise Exception("Error when computing volume mesh") -## Check that vertices are merged by preCAD preprocessing -#nodes = [] -#for p in vertices: - #x, y, z = geompy.PointCoordinates(p) - #id_node = Mesh_1.FindNodeClosestTo(x, y, z) - #nodes.append(id_node) - -#nodes = set(nodes) - -#assert(len(nodes) == 1) - if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser(1) + salome.sg.updateObjBrowser()