]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/PythonAPI/extension/box.py
Salome HOME
Improve PythonAPI documentstion.
[modules/shaper.git] / src / PythonAPI / extension / box.py
index 4cdfa75a2c870383449b54a616d130a8e2f1e7fa..6808cd4412632a520c1ecf8ff5b6d7aa79de4f14 100644 (file)
@@ -7,15 +7,26 @@ from model import Interface
 from macros.box.feature import BoxFeature as MY
 
 
-def addBox(container, *args):
-    feature = container.addFeature(MY.ID())
+def addBox(part, *args):
+    """Add Box feature to the part and return Box.
+
+    Pass all args to Box __init__ function.
+    """
+    feature = part.addFeature(MY.ID())
     return Box(feature, *args)
 
 
 class Box(Interface):
-    """Executes the macro-feature Box."""
+    """Executes the macro-feature Box.
+
+    Box(feature) -> feature interface without initialization
+    Extrusion(feature, dx, dy, dz) ->
+        feature interface initialized from arguments:
+        - dx, dy, dz -- box dimensions
+    """
 
     def __init__(self, feature, *args):
+        """x.__init__(...) initializes x; see x.__class__.__doc__ for signature"""
         Interface.__init__(self, feature)
         assert(self._feature.getKind() == MY.ID())
 
@@ -40,13 +51,16 @@ class Box(Interface):
         pass
 
     def setWidth(self, width):
+        """B.setWidth(float) -- modify width attribute"""
         self._fill_attribute(self._width, width)
         pass
 
     def setLength(self, length):
+        """B.setLength(float) -- modify length attribute"""
         self._fill_attribute(self._length, length)
         pass
 
     def setHeight(self, height):
+        """B.setHeight(float) -- modify height attribute"""
         self._fill_attribute(self._height, height)
         pass