X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGEOM_PY%2Fsketcher.py;h=cc6404bd85f9b1fd82ffd945e6a8249055d3baf9;hb=fcc908e69cdb3917400fd6c6cbdae04da399b491;hp=aeba6b43b5fe79927e968d5fb346248f8a9b759a;hpb=73555c78ebf12a1fdb85157b8e7934ad566ae90a;p=modules%2Fgeom.git diff --git a/src/GEOM_PY/sketcher.py b/src/GEOM_PY/sketcher.py index aeba6b43b..cc6404bd8 100644 --- a/src/GEOM_PY/sketcher.py +++ b/src/GEOM_PY/sketcher.py @@ -1,6 +1,6 @@ # -*- coding: iso-8859-1 -*- # -# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -38,7 +38,8 @@ Example:: wire = mysketcher.getGeomWire() # Put it in the study - import geompy + from salome.geom import geomBuilder + geompy = geomBuilder.New(salome.myStudy) geompy.addToStudy( wire, 'mysketch' ) Additionnal examples can be found as unit tests in the source code. @@ -46,10 +47,18 @@ Additionnal examples can be found as unit tests in the source code. geompyEnable = True try: - import geompy + from salome.kernel.deprecation import is_called_by_sphinx + if not is_called_by_sphinx(): + import salome + salome.salome_init() + import GEOM + from salome.geom import geomBuilder + geompy = geomBuilder.New(salome.myStudy) + pass + pass except: geompyEnable = False - + pass class Sketcher: