Draft: move circular, ortho, and polar make functions

Previously they were in `draftobjects`, but since they
don't define new objects, just create objects,
they are moved to `draftmake`.

Also ajust the `CMakeLists.txt` and the corresponding Gui Commands
which use these make functions.

These functions internally use the `Draft.makeArray` function.
We will put comments as reminders so that when this function
is moved to its own module, we can update the derived functions.
This commit is contained in:
vocx-fc
2020-05-13 21:30:20 -05:00
committed by Yorik van Havre
parent 021b07b7bc
commit 681b33dab8
8 changed files with 46 additions and 23 deletions

View File

@@ -278,7 +278,7 @@ class TaskPanelCircularArray:
# of this class, the GuiCommand.
# This is needed to schedule geometry manipulation
# that would crash Coin3D if done in the event callback.
_cmd = "draftobjects.circulararray.make_circular_array"
_cmd = "DD.make_circular_array"
_cmd += "("
_cmd += "App.ActiveDocument." + sel_obj.Name + ", "
_cmd += "r_distance=" + str(self.r_distance) + ", "
@@ -290,8 +290,11 @@ class TaskPanelCircularArray:
_cmd += "use_link=" + str(self.use_link)
_cmd += ")"
_cmd_list = ["Gui.addModule('Draft')",
"Gui.addModule('draftobjects.circulararray')",
Gui.addModule('Draft')
Gui.addModule('draftmake.make_circulararray')
_cmd_list = ["# DD = Draft # in the future",
"DD = draftmake.make_circulararray",
"obj = " + _cmd,
"obj.Fuse = " + str(self.fuse),
"Draft.autogroup(obj)",