Salome HOME
Rewrite local function ModifySurface of BlockFix_SphereSpaceModifier
[modules/geom.git] / src / GEOM_PY / sketcher.py
index ca768f5691cbad1901e774bd4f7ec96d2542c784..2f388f56808178d2a558e072db99adc11e1e46e1 100644 (file)
@@ -1,6 +1,6 @@
 # -*- coding: iso-8859-1 -*-
 #
-# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2021  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
 #
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
+## \defgroup simplesketcher sketcher - Simplified sketcher API
+#  \{
+#  \details
+#  This module provides simplified access to the 2D sketcher functionality of Geometry module.
+#  
+#  \note This module is deprecated, refer to \ref gsketcher for more details
+#  \}
+
 """
 This module provides the user with a simple python API to realize
 various sketches from the GEOM text user interface.
@@ -39,10 +48,10 @@ Example::
 
     # Put it in the study
     from salome.geom import geomBuilder
-    geompy = geomBuilder.New(salome.myStudy)
+    geompy = geomBuilder.New()
     geompy.addToStudy( wire, 'mysketch' )
 
-Additionnal examples can be found as unit tests in the source code.
+Additional examples can be found as unit tests in the source code.
 """
 
 geompyEnable = True
@@ -53,13 +62,15 @@ try:
         salome.salome_init()
         import GEOM
         from salome.geom import geomBuilder
-        geompy = geomBuilder.New(salome.myStudy)
+        geompy = geomBuilder.New()
         pass
     pass
 except:
     geompyEnable = False
     pass
 
+##
+#  \ingroup simplesketcher
 class Sketcher:
 
     __sketch = None
@@ -126,11 +137,11 @@ def TEST_toString():
 
     expectedResult = "Sketcher:F 1.234 4.321:TT 2.234 5.321"
     result = mysketcher.toString()
-    print "sketcher=",mysketcher.toString()
+    print("sketcher=",mysketcher.toString())
     if result == expectedResult:
-        print "OK"
+        print("OK")
     else:
-        print "Not OK"
+        print("Not OK")
 
 def TEST_usingGeom():
     mysketcher = Sketcher()