Salome HOME
0021746: EDF 2135 GEOM: Unification of Python documentations
[modules/geom.git] / src / GEOM_SWIG / gsketcher.py
index 691cb5a8eb9a2f6a673667da3fe3a8414c72eab9..e738c19933d3a861598fef43ac290f060f70bb33 100644 (file)
@@ -1,10 +1,10 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  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
 # License as published by the Free Software Foundation; either
-# version 2.1 of the License.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 #  Author : Julia DOROVSKIKH, Open CASCADE S.A.S.
 #  Module : GEOM_SWIG
 
+## @defgroup sketcher sketcher - Wrapper to help the creation of simple sketches
+#  @{ 
+#  @details
+#  This module provides the user with a simple python API 
+#  to realize various sketches from the GEOM text user interface.
+#  @n Example:
+#  @code
+#  import GEOM
+#  from salome.geom import geomBuilder
+#  geompy = geomBuilder.New(salome.myStudy)
+#
+#  # create a wire for sketcher
+#  geomObj_1 = geompy.MakeMarker(0, 0, 0, 1, 0, 0, 0, 1, 0)
+#
+#  # Create the sketch
+#  sk = geompy.Sketcher2D()
+#  sk.addPoint(0.000000, 0.000000)
+#  sk.addSegmentAbsolute(50.000000, 50.000000)
+#  sk.addSegmentPerpY(0.000000)
+#  sk.addArcAbsolute(0.000000, 0.000000)
+#  sk.close()
+#  Sketch_1 = sk.wire(geomObj_1)
+#
+#  # add objects in the study
+#  geompy.addToStudy( Sketch_1, 'Sketch_1' )
+#
+#  # update object browser
+#  salome.sg.updateObjBrowser(1)
+#  @endcode
+#  @n Additionnal examples can be found as unit tests in the source code.
+#  @}
+
 """
     \namespace geompy
     \brief 2D and 3D Sketcher interfaces
@@ -37,6 +69,7 @@ def printVar (var):
 #  Use geompy.Sketcher3D() method to obtain an instance of this class.
 #
 #  @ref tui_3dsketcher_page "Example"
+#  @ingroup sketcher
 class Sketcher3D:
     """
     3D sketcher interface.
@@ -60,7 +93,7 @@ class Sketcher3D:
     #  Coordinates are considered as absolute.
     #  If the first point of sketcher is not yet defined, the first point
     #  from the listCoords will become the first sketcher point.
-    #  @param X1, Y1, Z1, X2, Y2, Z2, ... Coordinates of points
+    #  @param listCoords X1, Y1, Z1, X2, Y2, Z2, ... Coordinates of points
     def addPointsAbsolute (self, *listCoords):
         """
         Add one or more points, sequentially connected with straight segments.
@@ -91,7 +124,7 @@ class Sketcher3D:
     #  Coordinates are considered relative to the previous point.
     #  If the first point of sketcher is not yet defined, the
     #  origin (0, 0, 0) will become the first sketcher point.
-    #  @param X1, Y1, Z1, X2, Y2, Z2, ... Coordinates of points
+    #  @param listCoords X1, Y1, Z1, X2, Y2, Z2, ... Coordinates of points
     def addPointsRelative (self, *listCoords):
         """
         Add one or more points, sequentially connected with straight segments.
@@ -187,7 +220,7 @@ class Sketcher3D:
     #  @param axes can be: "OXY", "OYZ" or "OXZ"
     #  @param angle angle in a plane, defined by the \a axes
     #  @param height height from the plane, defined by the \a axes
-    #  @param radius distance to the coordinate system origin
+    #  @param length distance to the coordinate system origin
     def addPointRadiusAngleHRelative (self, length, angle, height, axes="OXY"):
         """
         Add one straight segment, defined by two angles and length.
@@ -284,9 +317,9 @@ class Sketcher3D:
         self.geompyD._autoPublish(wire, theName, "wire")
         return wire
 
-#  An interface to build a 2D Sketcher step-by-step.
+##  An interface to build a 2D Sketcher step-by-step.
 #  Use geompy.Sketcher2D() method to obtain an instance of this class.
-  
+#  @ingroup sketcher  
 class Sketcher2D:
     """
     2D sketcher interface.