# -*- 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.
# 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
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
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()