def addRotation(part, *args):
- """Add an Rotation feature to the Part and return Rotation.
+ """Add a Rotation feature to the Part.
- Pass all args to Rotation __init__ function.
+ .. function:: addRotation(part, main_objects, axis_object, angle)
+
+ Args:
+ part (ModelAPI_Document): part document
+ main_objects (list of Selection): main objects
+ axis_object (list of Selection): axis object
+ angle (double): angle
+
+ Returns:
+ Rotation: rotation object
"""
assert(args)
feature = part.addFeature("Rotation")
class Rotation(Interface):
+ """Interface class for Rotation features.
+
+ .. function:: Rotation(feature)
+
+ Create interface for the feature without initialization.
+
+ .. function:: Rotation(feature, main_objects, axis_object, angle)
+
+ Create interface for the feature and initialize the feature with arguments.
+ """
def __init__(self, feature, *args):
+ """x.__init__(...) initializes x; see x.__class__.__doc__ for signature"""
Interface.__init__(self, feature)
assert(self._feature.getKind() == "Rotation")
self.setAxisObject(args[1])
self.setAngle(args[2])
- self._execute()
+ self.execute()
pass
def setMainObjects(self, main_objects):
See __init__.
"""
- self._fill_attribute(self._main_objects, main_objects)
+ self._fillAttribute(self._main_objects, main_objects)
pass
def setAxisObject(self, axis_object):
See __init__.
"""
- self._fill_attribute(self._axis_object, axis_object)
+ self._fillAttribute(self._axis_object, axis_object)
pass
def setAngle(self, angle):
See __init__.
"""
- self._fill_attribute(self._angle, angle)
+ self._fillAttribute(self._angle, angle)
pass