From: prascle Date: Fri, 15 Mar 2013 14:20:15 +0000 (+0000) Subject: PR: basic example in doc X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=07e24752f0764f0b5fd3cad965c3375deee242c5;p=modules%2Fgeom.git PR: basic example in doc --- diff --git a/doc/salome/examples/GEOM_box.py b/doc/salome/examples/GEOM_box.py new file mode 100644 index 000000000..1d9864b2f --- /dev/null +++ b/doc/salome/examples/GEOM_box.py @@ -0,0 +1,16 @@ +# --- salome initialization +import salome +salome.salome_init() + +# --- geom Python interface +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) + +# --- Create a box and publish it into the salome study +Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200) +geompy.addToStudy( Box_1, 'Box_1' ) + +# --- update the study object browser +if salome.sg.hasDesktop(): + salome.sg.updateObjBrowser(1) diff --git a/doc/salome/examples/Makefile.am b/doc/salome/examples/Makefile.am index e7137ed7e..15ffae4e2 100644 --- a/doc/salome/examples/Makefile.am +++ b/doc/salome/examples/Makefile.am @@ -74,6 +74,7 @@ GOOD_TESTS = \ complex_objs_ex10.py \ free_boundaries.py \ free_faces.py \ + GEOM_box.py \ get_non_blocks.py \ import_export.py \ inertia.py \ diff --git a/src/GEOM_SWIG/GEOM_box.py b/src/GEOM_SWIG/GEOM_box.py deleted file mode 100644 index 1d9864b2f..000000000 --- a/src/GEOM_SWIG/GEOM_box.py +++ /dev/null @@ -1,16 +0,0 @@ -# --- salome initialization -import salome -salome.salome_init() - -# --- geom Python interface -import GEOM -from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) - -# --- Create a box and publish it into the salome study -Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200) -geompy.addToStudy( Box_1, 'Box_1' ) - -# --- update the study object browser -if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser(1) diff --git a/src/GEOM_SWIG/Makefile.am b/src/GEOM_SWIG/Makefile.am index 16d568ba4..0099083fb 100644 --- a/src/GEOM_SWIG/Makefile.am +++ b/src/GEOM_SWIG/Makefile.am @@ -35,7 +35,6 @@ include $(top_srcdir)/adm_local/unix/make_common_starter.am dist_salomescript_DATA = \ geompy.py \ GEOM_Spanner.py \ - GEOM_box.py \ GEOM_blocks.py \ GEOM_example.py \ GEOM_example2.py \ @@ -71,10 +70,7 @@ dist_salomescript_DATA = \ mypkgpythondir = $(salomepythondir)/salome/geom mypkgpython_PYTHON = \ geomBuilder.py \ - gsketcher.py -# geompyDC.py -# batchmode_geompy.py - + gsketcher.py sharedpkgpython_PYTHON = \ GEOM_shared_modules.py