Draft: clean up code, PEP8, and docstrings in PathArray
Test the inputs to the `make_path_array` function
and return `None` if there is a problem.
Now the make function accepts as input a `"String"` which must be
the `Label` of an object in the document, so it is easier to create
arrays quickly from the Python console.
Add the new parameters to the make function, `align_mode`,
`tan_vector`, `force_vertical`, and `vertical_vector`.
These properties were added to the proxy object in ff323ebdb5.
Add message deprecating the older call `makePathArray`.
Adjust the GuiCommand accordingly. Now it uses the commit
mechanism of the parent `Modifier` class so that the executed
functions are recorded in the Python console.
Clean up the `PathArray` class as well.
This commit is contained in:
@@ -468,11 +468,13 @@ class DraftModification(unittest.TestCase):
|
||||
|
||||
number = 4
|
||||
translation = Vector(0, 1, 0)
|
||||
subelements = "Edge1"
|
||||
align = False
|
||||
_msg(" Path Array")
|
||||
_msg(" number={}, translation={}".format(number, translation))
|
||||
_msg(" align={}".format(align))
|
||||
obj = Draft.make_path_array(poly, wire, number, translation, align)
|
||||
_msg(" subelements={}, align={}".format(subelements, align))
|
||||
obj = Draft.make_path_array(poly, wire, number,
|
||||
translation, subelements, align)
|
||||
self.assertTrue(obj, "'{}' failed".format(operation))
|
||||
|
||||
def test_point_array(self):
|
||||
|
||||
Reference in New Issue
Block a user