def setWidth(self, width):
"""B.setWidth(float) -- modify width attribute"""
- self._fill_attribute(self._width, width)
+ self._fillAttribute(self._width, width)
pass
def setLength(self, length):
"""B.setLength(float) -- modify length attribute"""
- self._fill_attribute(self._length, length)
+ self._fillAttribute(self._length, length)
pass
def setHeight(self, height):
"""B.setHeight(float) -- modify height attribute"""
- self._fill_attribute(self._height, height)
+ self._fillAttribute(self._height, height)
pass
pass
def __clear(self):
- self._fill_attribute(self._CreationMethod, "AxisByPointsCase")
- self._fill_attribute(self._FirstPoint, None)
- self._fill_attribute(self._SecondPoint, None)
- self._fill_attribute(self._CylindricalFace, None)
+ self._fillAttribute(self._CreationMethod, "AxisByPointsCase")
+ self._fillAttribute(self._FirstPoint, None)
+ self._fillAttribute(self._SecondPoint, None)
+ self._fillAttribute(self._CylindricalFace, None)
def setPoints(self, p1, p2):
"""Modify points attribute of the feature.
See __init__.
"""
self.__clear()
- self._fill_attribute(self._CreationMethod, "AxisByPointsCase")
- self._fill_attribute(self._FirstPoint, p1)
- self._fill_attribute(self._SecondPoint, p2)
+ self._fillAttribute(self._CreationMethod, "AxisByPointsCase")
+ self._fillAttribute(self._FirstPoint, p1)
+ self._fillAttribute(self._SecondPoint, p2)
pass
def setCylindricalFace(self, face):
See __init__.
"""
self.__clear()
- self._fill_attribute(self._CreationMethod, "AxisByCylindricalFaceCase")
- self._fill_attribute(self._CylindricalFace, face)
+ self._fillAttribute(self._CreationMethod, "AxisByCylindricalFaceCase")
+ self._fillAttribute(self._CylindricalFace, face)
pass
pass
def __clear(self):
- self._fill_attribute(self._CreationMethod, "PlaneByFaceAndDistance")
- self._fill_attribute(self._plane_face, None)
- self._fill_attribute(self._distance, 0)
- self._fill_attribute(self._a, 0)
- self._fill_attribute(self._b, 0)
- self._fill_attribute(self._c, 0)
- self._fill_attribute(self._d, 0)
+ self._fillAttribute(self._CreationMethod, "PlaneByFaceAndDistance")
+ self._fillAttribute(self._plane_face, None)
+ self._fillAttribute(self._distance, 0)
+ self._fillAttribute(self._a, 0)
+ self._fillAttribute(self._b, 0)
+ self._fillAttribute(self._c, 0)
+ self._fillAttribute(self._d, 0)
def setFaceAndDistance(self, face, distance):
"""Modify face and distance attribute of the feature.
See __init__.
"""
self.__clear()
- self._fill_attribute(self._CreationMethod, "PlaneByFaceAndDistance")
- self._fill_attribute(self._plane_face, face)
- self._fill_attribute(self._distance, distance)
+ self._fillAttribute(self._CreationMethod, "PlaneByFaceAndDistance")
+ self._fillAttribute(self._plane_face, face)
+ self._fillAttribute(self._distance, distance)
pass
def setGeneralEquation(self, a, b, c, d):
See __init__.
"""
self.__clear()
- self._fill_attribute(self._CreationMethod, "PlaneByGeneralEquation")
- self._fill_attribute(self._a, a)
- self._fill_attribute(self._b, b)
- self._fill_attribute(self._c, c)
- self._fill_attribute(self._d, d)
+ self._fillAttribute(self._CreationMethod, "PlaneByGeneralEquation")
+ self._fillAttribute(self._a, a)
+ self._fillAttribute(self._b, b)
+ self._fillAttribute(self._c, c)
+ self._fillAttribute(self._d, d)
pass
See __init__.
"""
- self._fill_attribute(self._x, x)
- self._fill_attribute(self._y, y)
- self._fill_attribute(self._z, z)
+ self._fillAttribute(self._x, x)
+ self._fillAttribute(self._y, y)
+ self._fillAttribute(self._z, z)
pass
See __init__.
"""
- self._fill_attribute(self._file_path, file_path)
+ self._fillAttribute(self._file_path, file_path)
pass
See __init__.
"""
- self._fill_attribute(self._file_path, file_path)
+ self._fillAttribute(self._file_path, file_path)
pass
def setFileFormat(self, file_format):
See __init__.
"""
- self._fill_attribute(self._file_format, file_format)
+ self._fillAttribute(self._file_format, file_format)
pass
def setObjects(self, objects):
See __init__.
"""
- self._fill_attribute(self._objects, object)
+ self._fillAttribute(self._objects, object)
pass
def setMainObjects(self, main_objects):
"""F.setMainObjects(iterable) -- modify main_objects attribute"""
- self._fill_attribute(self._main_objects, main_objects)
+ self._fillAttribute(self._main_objects, main_objects)
pass
def setToolObjects(self, tool_objects):
"""F.setToolObjects(iterable) -- modify tool_objects attribute"""
- self._fill_attribute(self._tool_objects, tool_objects)
+ self._fillAttribute(self._tool_objects, tool_objects)
pass
def setBoolType(self, bool_type):
- GeomAlgoAPI_Boolean.BOOL_CUT
- GeomAlgoAPI_Boolean.BOOL_COMMON
"""
- self._fill_attribute(self._bool_type, bool_type)
+ self._fillAttribute(self._bool_type, bool_type)
pass
def __clear(self):
self._CreationMethod.setValue("BySizes")
- self._fill_attribute(self._to_size, 0)
- self._fill_attribute(self._from_size, 0)
- self._fill_attribute(self._to_object, None)
- self._fill_attribute(self._to_offset, 0)
- self._fill_attribute(self._from_object, None)
- self._fill_attribute(self._from_offset, 0)
+ self._fillAttribute(self._to_size, 0)
+ self._fillAttribute(self._from_size, 0)
+ self._fillAttribute(self._to_object, None)
+ self._fillAttribute(self._to_offset, 0)
+ self._fillAttribute(self._from_object, None)
+ self._fillAttribute(self._from_offset, 0)
pass
def setBase(self, base):
See __init__.
"""
- self._fill_attribute(self._base, base)
+ self._fillAttribute(self._base, base)
pass
def setSizes(self, to_size, from_size):
See __init__.
"""
self.__clear()
- self._fill_attribute(self._CreationMethod, "BySizes")
- self._fill_attribute(self._to_size, to_size)
- self._fill_attribute(self._from_size, from_size)
+ self._fillAttribute(self._CreationMethod, "BySizes")
+ self._fillAttribute(self._to_size, to_size)
+ self._fillAttribute(self._from_size, from_size)
pass
def setSize(self, size):
"""
self.__clear()
self._CreationMethod.setValue("ByPlanesAndOffsets")
- self._fill_attribute(self._to_object, to_object)
- self._fill_attribute(self._to_offset, to_offset)
- self._fill_attribute(self._from_object, from_object)
- self._fill_attribute(self._from_offset, from_offset)
+ self._fillAttribute(self._to_object, to_object)
+ self._fillAttribute(self._to_offset, to_offset)
+ self._fillAttribute(self._from_object, from_object)
+ self._fillAttribute(self._from_offset, from_offset)
pass
def result(self):
def __clear(self):
self._CreationMethod.setValue("BySizes")
- self._fill_attribute(self._to_size, 0)
- self._fill_attribute(self._from_size, 0)
- self._fill_attribute(self._to_object, None)
- self._fill_attribute(self._to_offset, 0)
- self._fill_attribute(self._from_object, None)
- self._fill_attribute(self._from_offset, 0)
+ self._fillAttribute(self._to_size, 0)
+ self._fillAttribute(self._from_size, 0)
+ self._fillAttribute(self._to_object, None)
+ self._fillAttribute(self._to_offset, 0)
+ self._fillAttribute(self._from_object, None)
+ self._fillAttribute(self._from_offset, 0)
pass
def setSizes(self, to_size, from_size):
"""
self.__clear()
self._CreationMethod.setValue("BySizes")
- self._fill_attribute(self._to_size, to_size)
- self._fill_attribute(self._from_size, from_size)
+ self._fillAttribute(self._to_size, to_size)
+ self._fillAttribute(self._from_size, from_size)
pass
def setPlanesAndOffsets(self, to_object, to_offset,
"""
self.__clear()
self._CreationMethod.setValue("ByPlanesAndOffsets")
- self._fill_attribute(self._to_object, to_object)
- self._fill_attribute(self._to_offset, to_offset)
- self._fill_attribute(self._from_object, from_object)
- self._fill_attribute(self._from_offset, from_offset)
+ self._fillAttribute(self._to_object, to_object)
+ self._fillAttribute(self._to_offset, to_offset)
+ self._fillAttribute(self._from_object, from_object)
+ self._fillAttribute(self._from_offset, from_offset)
pass
def __clear(self):
self._CreationMethod.setValue("BySizes")
- self._fill_attribute(self._to_size, 0)
- self._fill_attribute(self._from_size, 0)
- self._fill_attribute(self._to_object, None)
- self._fill_attribute(self._to_offset, 0)
- self._fill_attribute(self._from_object, None)
- self._fill_attribute(self._from_offset, 0)
+ self._fillAttribute(self._to_size, 0)
+ self._fillAttribute(self._from_size, 0)
+ self._fillAttribute(self._to_object, None)
+ self._fillAttribute(self._to_offset, 0)
+ self._fillAttribute(self._from_object, None)
+ self._fillAttribute(self._from_offset, 0)
pass
def setSizes(self, to_size, from_size):
"""
self.__clear()
self._CreationMethod.setValue("BySizes")
- self._fill_attribute(self._to_size, to_size)
- self._fill_attribute(self._from_size, from_size)
+ self._fillAttribute(self._to_size, to_size)
+ self._fillAttribute(self._from_size, from_size)
pass
def setPlanesAndOffsets(self, to_object, to_offset,
"""
self.__clear()
self._CreationMethod.setValue("ByPlanesAndOffsets")
- self._fill_attribute(self._to_object, to_object)
- self._fill_attribute(self._to_offset, to_offset)
- self._fill_attribute(self._from_object, from_object)
- self._fill_attribute(self._from_offset, from_offset)
+ self._fillAttribute(self._to_object, to_object)
+ self._fillAttribute(self._to_offset, to_offset)
+ self._fillAttribute(self._from_object, from_object)
+ self._fillAttribute(self._from_offset, from_offset)
pass
See __init__.
"""
- self._fill_attribute(self._group_list, group_list)
+ self._fillAttribute(self._group_list, group_list)
pass
See __init__.
"""
- self._fill_attribute(self._main_objects, main_objects)
+ self._fillAttribute(self._main_objects, main_objects)
pass
def setToolObjects(self, tool_objects):
See __init__.
"""
- self._fill_attribute(self._tool_objects, tool_objects)
+ self._fillAttribute(self._tool_objects, tool_objects)
pass
def setPartitionCombine(self, partition_combine):
See __init__.
"""
- self._fill_attribute(self._partition_combine, partition_combine)
+ self._fillAttribute(self._partition_combine, partition_combine)
pass
See __init__.
"""
- self._fill_attribute(self._objects_list, objects_list)
+ self._fillAttribute(self._objects_list, objects_list)
pass
def setStartShape(self, start_shape):
See __init__.
"""
- self._fill_attribute(self._start_shape, start_shape)
+ self._fillAttribute(self._start_shape, start_shape)
pass
def setEndShape(self, end_shape):
See __init__.
"""
- self._fill_attribute(self._end_shape, end_shape)
+ self._fillAttribute(self._end_shape, end_shape)
pass
def setReverseDirection(self, reverse_direction):
See __init__.
"""
- self._fill_attribute(self._reverse_direction, reverse_direction)
+ self._fillAttribute(self._reverse_direction, reverse_direction)
pass
def setCentering(self, centering):
See __init__.
"""
- self._fill_attribute(self._centering, centering)
+ self._fillAttribute(self._centering, centering)
pass
def __clear(self):
self._CreationMethod.setValue("ByAngles")
- self._fill_attribute(self._to_angle, 0)
- self._fill_attribute(self._from_angle, 0)
- self._fill_attribute(self._to_object, None)
- self._fill_attribute(self._to_offset, 0)
- self._fill_attribute(self._from_object, None)
- self._fill_attribute(self._from_offset, 0)
+ self._fillAttribute(self._to_angle, 0)
+ self._fillAttribute(self._from_angle, 0)
+ self._fillAttribute(self._to_object, None)
+ self._fillAttribute(self._to_offset, 0)
+ self._fillAttribute(self._from_object, None)
+ self._fillAttribute(self._from_offset, 0)
pass
def setBase(self, base):
See __init__.
"""
- self._fill_attribute(self._base, base)
+ self._fillAttribute(self._base, base)
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 setAngles(self, to_angle, from_angle):
"""
self.__clear()
self._CreationMethod.setValue("ByAngles")
- self._fill_attribute(self._to_angle, to_angle)
- self._fill_attribute(self._from_angle, from_angle)
+ self._fillAttribute(self._to_angle, to_angle)
+ self._fillAttribute(self._from_angle, from_angle)
pass
def setPlanesAndOffsets(self, to_object, to_offset,
"""
self.__clear()
self._CreationMethod.setValue("ByPlanesAndOffsets")
- self._fill_attribute(self._to_object, to_object)
- self._fill_attribute(self._to_offset, to_offset)
- self._fill_attribute(self._from_object, from_object)
- self._fill_attribute(self._from_offset, from_offset)
+ self._fillAttribute(self._to_object, to_object)
+ self._fillAttribute(self._to_offset, to_offset)
+ self._fillAttribute(self._from_object, from_object)
+ self._fillAttribute(self._from_offset, from_offset)
pass
def __clear(self):
self._CreationMethod.setValue("ByAngles")
- self._fill_attribute(self._to_angle, 0)
- self._fill_attribute(self._from_angle, 0)
- self._fill_attribute(self._to_object, None)
- self._fill_attribute(self._to_offset, 0)
- self._fill_attribute(self._from_object, None)
- self._fill_attribute(self._from_offset, 0)
+ self._fillAttribute(self._to_angle, 0)
+ self._fillAttribute(self._from_angle, 0)
+ self._fillAttribute(self._to_object, None)
+ self._fillAttribute(self._to_offset, 0)
+ self._fillAttribute(self._from_object, None)
+ self._fillAttribute(self._from_offset, 0)
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 setAngles(self, to_angle, from_angle):
"""
self.__clear()
self._CreationMethod.setValue("ByAngles")
- self._fill_attribute(self._to_angle, to_angle)
- self._fill_attribute(self._from_angle, from_angle)
+ self._fillAttribute(self._to_angle, to_angle)
+ self._fillAttribute(self._from_angle, from_angle)
pass
def setPlanesAndOffsets(self, to_object, to_offset,
"""
self.__clear()
self._CreationMethod.setValue("ByPlanesAndOffsets")
- self._fill_attribute(self._to_object, to_object)
- self._fill_attribute(self._to_offset, to_offset)
- self._fill_attribute(self._from_object, from_object)
- self._fill_attribute(self._from_offset, from_offset)
+ self._fillAttribute(self._to_object, to_object)
+ self._fillAttribute(self._to_offset, to_offset)
+ self._fillAttribute(self._from_object, from_object)
+ self._fillAttribute(self._from_offset, from_offset)
pass
def __clear(self):
self._CreationMethod.setValue("ByAngles")
- self._fill_attribute(self._to_angle, 0)
- self._fill_attribute(self._from_angle, 0)
- self._fill_attribute(self._to_object, None)
- self._fill_attribute(self._to_offset, 0)
- self._fill_attribute(self._from_object, None)
- self._fill_attribute(self._from_offset, 0)
+ self._fillAttribute(self._to_angle, 0)
+ self._fillAttribute(self._from_angle, 0)
+ self._fillAttribute(self._to_object, None)
+ self._fillAttribute(self._to_offset, 0)
+ self._fillAttribute(self._from_object, None)
+ self._fillAttribute(self._from_offset, 0)
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 setAngles(self, to_angle, from_angle):
"""
self.__clear()
self._CreationMethod.setValue("ByAngles")
- self._fill_attribute(self._to_angle, to_angle)
- self._fill_attribute(self._from_angle, from_angle)
+ self._fillAttribute(self._to_angle, to_angle)
+ self._fillAttribute(self._from_angle, from_angle)
pass
def setPlanesAndOffsets(self, to_object, to_offset,
"""
self.__clear()
self._CreationMethod.setValue("ByPlanesAndOffsets")
- self._fill_attribute(self._to_object, to_object)
- self._fill_attribute(self._to_offset, to_offset)
- self._fill_attribute(self._from_object, from_object)
- self._fill_attribute(self._from_offset, from_offset)
+ self._fillAttribute(self._to_object, to_object)
+ self._fillAttribute(self._to_offset, to_offset)
+ self._fillAttribute(self._from_object, from_object)
+ self._fillAttribute(self._from_offset, from_offset)
pass
def setSketch(self, sketch):
"""Modify sketch attribute"""
- self._fill_attribute(self._sketch, sketch)
+ self._fillAttribute(self._sketch, sketch)
pass
def setSketchSelection(self, sketch_selection):
"""Modify sketch_selection attribute"""
- self._fill_attribute(self._sketch_selection, sketch_selection)
+ self._fillAttribute(self._sketch_selection, sketch_selection)
pass
def setBooleanObjects(self, boolean_objects):
"""Modify boolean_objects attribute"""
- self._fill_attribute(self._boolean_objects, boolean_objects)
+ self._fillAttribute(self._boolean_objects, boolean_objects)
pass
def setSketch(self, sketch):
"""Modify sketch attribute"""
- self._fill_attribute(self._sketch, sketch)
+ self._fillAttribute(self._sketch, sketch)
pass
def setSketchSelection(self, sketch_selection):
"""Modify sketch_selection attribute"""
- self._fill_attribute(self._sketch_selection, sketch_selection)
+ self._fillAttribute(self._sketch_selection, sketch_selection)
pass
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
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 setDistance(self, distance):
See __init__.
"""
- self._fill_attribute(self._distance, distance)
+ self._fillAttribute(self._distance, distance)
pass
See __init__.
"""
- self._fill_attribute(self._name, name)
+ self._fillAttribute(self._name, name)
pass
def setExpression(self, expression):
See __init__.
"""
- self._fill_attribute(self._expression, expression)
+ self._fillAttribute(self._expression, expression)
pass
def __init__(self, feature):
"""x.__init__(...) initializes x; see x.__class__.__doc__ for signature"""
self._feature = feature
- self._attribute_white_list = [
- "execute",
- "getKind", "results", "firstResult", "lastResult",
- ]
def __getattr__(self, name):
"""Process missing attributes.
Add get*() methods for access feature attributes.
- Redirect some missing attributes to the feature.
"""
if name.startswith("get"):
possible_names = [
return getattr(self, possible_name)
return getter
- if name in self._attribute_white_list:
- return getattr(self._feature, name)
-
raise AttributeError()
def feature(self):
"""Return ModelAPI_Feature."""
return self._feature
- def _fill_attribute(self, attribute, value):
+ def execute(self):
+ """Computes or recomputes the results"""
+ return self._feature.execute()
+
+ def getKind(self):
+ """Return the unique kind of the feature"""
+ return self._feature.getKind()
+
+ def results(self):
+ """Return current results of the feature"""
+ return self._feature.results()
+
+ def firstResult(self):
+ """Return the first result in the list of results"""
+ return self._feature.firstResult()
+
+ def lastResult(self):
+ """Return the result in the list of results"""
+ return self._feature.lastResult()
+
+ def _fillAttribute(self, attribute, value):
"""Fill ModelAPI_Attribute* with value."""
tools.fill_attribute(attribute, value)