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())
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