]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Rename _fill_attribute to _fillAttribute. Make redirection using functions.
authorspo <sergey.pokhodenko@opencascade.com>
Tue, 3 Nov 2015 10:28:04 +0000 (13:28 +0300)
committerspo <sergey.pokhodenko@opencascade.com>
Tue, 3 Nov 2015 10:28:11 +0000 (13:28 +0300)
20 files changed:
src/PythonAPI/extension/box.py
src/PythonAPI/model/construction/axis.py
src/PythonAPI/model/construction/plane.py
src/PythonAPI/model/construction/point.py
src/PythonAPI/model/exchange/exchange.py
src/PythonAPI/model/features/boolean.py
src/PythonAPI/model/features/extrusion.py
src/PythonAPI/model/features/extrusion_boolean.py
src/PythonAPI/model/features/extrusion_sketch.py
src/PythonAPI/model/features/group.py
src/PythonAPI/model/features/partition.py
src/PythonAPI/model/features/placement.py
src/PythonAPI/model/features/revolution.py
src/PythonAPI/model/features/revolution_boolean.py
src/PythonAPI/model/features/revolution_sketch.py
src/PythonAPI/model/features/roots.py
src/PythonAPI/model/features/rotation.py
src/PythonAPI/model/features/translation.py
src/PythonAPI/model/parameter/parameter.py
src/PythonAPI/model/roots.py

index 6808cd4412632a520c1ecf8ff5b6d7aa79de4f14..c4ef0018a60864601011612b58106201682171cb 100644 (file)
@@ -52,15 +52,15 @@ class Box(Interface):
 
     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
index 5e26942275e2567c4c69ae757ace06a55399b411..2ec9ab00fee28c15465adb50d6a472470a04b321 100644 (file)
@@ -57,10 +57,10 @@ class Axis(Interface):
         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.
@@ -68,9 +68,9 @@ class Axis(Interface):
         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):
@@ -79,6 +79,6 @@ class Axis(Interface):
         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
index f007de2481afc53aa8f6b3c54afa617489f16073..6035493e82a609ad96758b9d07c93412042b72ea 100644 (file)
@@ -63,13 +63,13 @@ class Plane(Interface):
         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.
@@ -77,9 +77,9 @@ class Plane(Interface):
         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):
@@ -88,9 +88,9 @@ class Plane(Interface):
         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
index 6d04280070bdccd9cfd1c4fb20e90d76a1cbd2f5..3892a1abd5b5c3f86bd2eacadb83ebd468e7df8f 100644 (file)
@@ -52,7 +52,7 @@ class Point(Interface):
 
         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
index 66f5c780927c87d2d1f7ffa43c41efc8600f3054..7acbc28ca655163c1f35a7e34a8f1361fa76ff60 100644 (file)
@@ -48,7 +48,7 @@ class Import(Interface):
 
         See __init__.
         """
-        self._fill_attribute(self._file_path, file_path)
+        self._fillAttribute(self._file_path, file_path)
         pass
 
 
@@ -102,7 +102,7 @@ class Export(Interface):
 
         See __init__.
         """
-        self._fill_attribute(self._file_path, file_path)
+        self._fillAttribute(self._file_path, file_path)
         pass
 
     def setFileFormat(self, file_format):
@@ -110,7 +110,7 @@ class Export(Interface):
 
         See __init__.
         """
-        self._fill_attribute(self._file_format, file_format)
+        self._fillAttribute(self._file_format, file_format)
         pass
 
     def setObjects(self, objects):
@@ -118,5 +118,5 @@ class Export(Interface):
 
         See __init__.
         """
-        self._fill_attribute(self._objects, object)
+        self._fillAttribute(self._objects, object)
         pass
index 95e27d019fb0348c8734439fdafbb20ba5c488ba..0beb4674c9ce0722458abae87e9d87f5303fdf7c 100644 (file)
@@ -76,12 +76,12 @@ class Boolean(Interface):
 
     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):
@@ -92,5 +92,5 @@ class Boolean(Interface):
         - GeomAlgoAPI_Boolean.BOOL_CUT
         - GeomAlgoAPI_Boolean.BOOL_COMMON
         """
-        self._fill_attribute(self._bool_type, bool_type)
+        self._fillAttribute(self._bool_type, bool_type)
         pass
index a6a18ee024ea4810cc68ef6a01a0617799f1062c..27c2ec2430246609f1eb747374680dbce3bdeea1 100644 (file)
@@ -83,12 +83,12 @@ class Extrusion(Interface):
 
     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):
@@ -96,7 +96,7 @@ class Extrusion(Interface):
 
         See __init__.
         """
-        self._fill_attribute(self._base, base)
+        self._fillAttribute(self._base, base)
         pass
 
     def setSizes(self, to_size, from_size):
@@ -105,9 +105,9 @@ class Extrusion(Interface):
         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):
@@ -133,10 +133,10 @@ class Extrusion(Interface):
         """
         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):
index a5b4d1e0937af2995b1760e09e7764f706d8ed4e..9399e860a45e32cfdedc16d1270b12a22a2f5031 100644 (file)
@@ -90,12 +90,12 @@ class ExtrusionBoolean(CompositeBoolean):
 
     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):
@@ -105,8 +105,8 @@ class ExtrusionBoolean(CompositeBoolean):
         """
         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,
@@ -117,9 +117,9 @@ class ExtrusionBoolean(CompositeBoolean):
         """
         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
 
index fdd436874bcbaecdbe105193155a12e072b039b9..4bdb13ce7037e65b54c7d16f5b7dc2d468c55f31 100644 (file)
@@ -74,12 +74,12 @@ class ExtrusionSketch(CompositeSketch):
 
     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):
@@ -89,8 +89,8 @@ class ExtrusionSketch(CompositeSketch):
         """
         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,
@@ -101,9 +101,9 @@ class ExtrusionSketch(CompositeSketch):
         """
         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
 
index d0c4207e6983dd47767f89db42d8229937e8fb0b..bfe661307dc1545b6b0da17d3439d3db650ffeb9 100644 (file)
@@ -48,5 +48,5 @@ class Group(Interface):
 
         See __init__.
         """
-        self._fill_attribute(self._group_list, group_list)
+        self._fillAttribute(self._group_list, group_list)
         pass
index 04876d232e2a486e280253da25806fd9e397a6ab..d2242347fa57dce40282337415a0ba8a9ba3939a 100644 (file)
@@ -58,7 +58,7 @@ class Partition(Interface):
 
         See __init__.
         """
-        self._fill_attribute(self._main_objects, main_objects)
+        self._fillAttribute(self._main_objects, main_objects)
         pass
 
     def setToolObjects(self, tool_objects):
@@ -66,7 +66,7 @@ class Partition(Interface):
 
         See __init__.
         """
-        self._fill_attribute(self._tool_objects, tool_objects)
+        self._fillAttribute(self._tool_objects, tool_objects)
         pass
 
     def setPartitionCombine(self, partition_combine):
@@ -74,5 +74,5 @@ class Partition(Interface):
 
         See __init__.
         """
-        self._fill_attribute(self._partition_combine, partition_combine)
+        self._fillAttribute(self._partition_combine, partition_combine)
         pass
index 258389e970e197462598db6a8f9b3ec0f54980bc..4153d39e639ee924d162bd3a5b066ddcac9fe4d7 100644 (file)
@@ -65,7 +65,7 @@ class Placement(Interface):
 
         See __init__.
         """
-        self._fill_attribute(self._objects_list, objects_list)
+        self._fillAttribute(self._objects_list, objects_list)
         pass
 
     def setStartShape(self, start_shape):
@@ -73,7 +73,7 @@ class Placement(Interface):
 
         See __init__.
         """
-        self._fill_attribute(self._start_shape, start_shape)
+        self._fillAttribute(self._start_shape, start_shape)
         pass
 
     def setEndShape(self, end_shape):
@@ -81,7 +81,7 @@ class Placement(Interface):
 
         See __init__.
         """
-        self._fill_attribute(self._end_shape, end_shape)
+        self._fillAttribute(self._end_shape, end_shape)
         pass
 
     def setReverseDirection(self, reverse_direction):
@@ -89,7 +89,7 @@ class Placement(Interface):
 
         See __init__.
         """
-        self._fill_attribute(self._reverse_direction, reverse_direction)
+        self._fillAttribute(self._reverse_direction, reverse_direction)
         pass
 
     def setCentering(self, centering):
@@ -97,5 +97,5 @@ class Placement(Interface):
 
         See __init__.
         """
-        self._fill_attribute(self._centering, centering)
+        self._fillAttribute(self._centering, centering)
         pass
index 662190a1b6a69d6290c04f9dc4da4af7e9304f6d..e816d62047968e30e0198b7de554edc8953a57f9 100644 (file)
@@ -83,12 +83,12 @@ class Revolution(Interface):
 
     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):
@@ -96,7 +96,7 @@ class Revolution(Interface):
 
         See __init__.
         """
-        self._fill_attribute(self._base, base)
+        self._fillAttribute(self._base, base)
         pass
 
     def setAxisObject(self, axis_object):
@@ -104,7 +104,7 @@ class Revolution(Interface):
 
         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):
@@ -114,8 +114,8 @@ class Revolution(Interface):
         """
         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,
@@ -126,8 +126,8 @@ class Revolution(Interface):
         """
         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
index 2b80d0c88a50849e4071027631feffbde17831f9..34f3fbc08c12ec592bcd4af28e9b23d43456d38a 100644 (file)
@@ -97,12 +97,12 @@ class RevolutionBoolean(CompositeBoolean):
 
     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):
@@ -110,7 +110,7 @@ class RevolutionBoolean(CompositeBoolean):
 
         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):
@@ -120,8 +120,8 @@ class RevolutionBoolean(CompositeBoolean):
         """
         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,
@@ -132,9 +132,9 @@ class RevolutionBoolean(CompositeBoolean):
         """
         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
 
index 55e751cc43927057888f21a662937e3b1b657fbb..feafe5f1ea463f41a2538e684e1735d2a11f7d1e 100644 (file)
@@ -82,12 +82,12 @@ class RevolutionSketch(CompositeSketch):
 
     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):
@@ -95,7 +95,7 @@ class RevolutionSketch(CompositeSketch):
 
         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):
@@ -105,8 +105,8 @@ class RevolutionSketch(CompositeSketch):
         """
         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,
@@ -117,9 +117,9 @@ class RevolutionSketch(CompositeSketch):
         """
         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
 
index 3aa27d42cc532e95aea65b014327d97f77457e2c..2aeacfe171a5e6037a7e0d11f44ba556cd46ec60 100644 (file)
@@ -38,17 +38,17 @@ class CompositeBoolean(Interface):
 
     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
 
 
@@ -85,10 +85,10 @@ class CompositeSketch(Interface):
 
     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
index 2c8b044a03c44e554cb68be72d92372c63ef926f..9165b89fa20e6b6b7e24123f64d4e2aff16f752c 100644 (file)
@@ -56,7 +56,7 @@ class Rotation(Interface):
 
         See __init__.
         """
-        self._fill_attribute(self._main_objects, main_objects)
+        self._fillAttribute(self._main_objects, main_objects)
         pass
 
     def setAxisObject(self, axis_object):
@@ -64,7 +64,7 @@ class Rotation(Interface):
 
         See __init__.
         """
-        self._fill_attribute(self._axis_object, axis_object)
+        self._fillAttribute(self._axis_object, axis_object)
         pass
 
     def setAngle(self, angle):
@@ -72,5 +72,5 @@ class Rotation(Interface):
 
         See __init__.
         """
-        self._fill_attribute(self._angle, angle)
+        self._fillAttribute(self._angle, angle)
         pass
index 802b4d8e81f3b5a933eed327d2dcd9929f6f4d6d..12aa6ab94a0ff33efea614fc267c83c4e4af08c0 100644 (file)
@@ -56,7 +56,7 @@ class Translation(Interface):
 
         See __init__.
         """
-        self._fill_attribute(self._main_objects, main_objects)
+        self._fillAttribute(self._main_objects, main_objects)
         pass
 
     def setAxisObject(self, axis_object):
@@ -64,7 +64,7 @@ class Translation(Interface):
 
         See __init__.
         """
-        self._fill_attribute(self._axis_object, axis_object)
+        self._fillAttribute(self._axis_object, axis_object)
         pass
 
     def setDistance(self, distance):
@@ -72,5 +72,5 @@ class Translation(Interface):
 
         See __init__.
         """
-        self._fill_attribute(self._distance, distance)
+        self._fillAttribute(self._distance, distance)
         pass
index 9b436b710f632b382f2203de6e5d1d31a9c6db3c..0dd32f4851d213d2f83983134c8f8867a4150128 100644 (file)
@@ -52,7 +52,7 @@ class Parameter(Interface):
 
         See __init__.
         """
-        self._fill_attribute(self._name, name)
+        self._fillAttribute(self._name, name)
         pass
 
     def setExpression(self, expression):
@@ -60,5 +60,5 @@ class Parameter(Interface):
 
         See __init__.
         """
-        self._fill_attribute(self._expression, expression)
+        self._fillAttribute(self._expression, expression)
         pass
index 1fa83ee5715acdf3678cfd57e83543b126fb08e3..7f463a95b701bb35efe71e28e4f1fd655e8f634e 100644 (file)
@@ -38,16 +38,11 @@ class Interface():
     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 = [
@@ -60,16 +55,33 @@ class Interface():
                         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)