From: mpa Date: Tue, 19 Nov 2013 11:23:26 +0000 (+0000) Subject: - Modifing Geometry and Mesh Python scripts from SALOME 6 and before X-Git-Tag: BR_hydro_v_0_3_1~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=68942c34e31cd9bdd5009cfd868e67bb0c37cd19;p=modules%2Fkernel.git - Modifing Geometry and Mesh Python scripts from SALOME 6 and before --- diff --git a/src/KERNEL_PY/kernel/services.py b/src/KERNEL_PY/kernel/services.py index cddfa1f5f..5b15af882 100644 --- a/src/KERNEL_PY/kernel/services.py +++ b/src/KERNEL_PY/kernel/services.py @@ -222,10 +222,12 @@ def TEST_getComponentList(): def TEST_createObject(): """ - WARNING: for this test, we need GEOM (used to create an object + WARNING: for this test, we need GEOM (used to create an object) """ - import geompy - geompy.init_geom(salome.myStudy) + import GEOM + from salome.geom import geomBuilder + geompy = geomBuilder.New(salome.myStudy) + box = geompy.MakeBoxDXDYDZ(200, 200, 200) id = geompy.addToStudy( box, 'box' ) return id diff --git a/src/KERNEL_PY/salome_test.py b/src/KERNEL_PY/salome_test.py index b9c520a4b..8035aa410 100755 --- a/src/KERNEL_PY/salome_test.py +++ b/src/KERNEL_PY/salome_test.py @@ -171,15 +171,16 @@ print "======================================================================" print " %d. Test Mesh " % step; step+=1 print "======================================================================" -import StdMeshers +from salome.StdMeshers import StdMeshersBuilder import SMESH +from salome.smesh import smeshBuilder smesh = salome.lcc.FindOrLoadComponent("FactoryServer", "SMESH") if salome.hasDesktop(): smeshgui = salome.ImportComponentGUI("SMESH") smeshgui.Init(salome.myStudyId); else: - smesh.SetCurrentStudy(salome.myStudy) + smesh = smeshBuilder.New(salome.myStudy) # ---- create hypotheses