Commit 7c07e5f5 authored by sumpfralle's avatar sumpfralle

added functions for generating specific tasks (useful for batch operations)


git-svn-id: https://pycam.svn.sourceforge.net/svnroot/pycam/trunk@276 bbaffbd6-741e-11dd-a85d-61de82d9cad9
parent 8f9f2a91
......@@ -769,9 +769,22 @@ class ProjectGui:
# update the table values
self.update_tasklist_table(current_task_index)
elif action == "generate_all_toolpaths":
self.process_multiple_tasks()
elif action == "generate_one_toolpath":
self.process_one_task(current_task_index)
else:
pass
def process_one_task(self, task_index):
task = self.task_list[task_index]
self.generate_toolpath(task["tool"], task["process"])
def process_multiple_tasks(self, task_list=None):
if task_list is None:
task_list = self.task_list[:]
enabled_tasks = []
for index in range(len(self.task_list)):
task = self.task_list[index]
for index in range(len(task_list)):
task = task_list[index]
if task["enabled"]:
enabled_tasks.append(task)
progress_bar = self.gui.get_object("MultipleProgressBar")
......@@ -784,11 +797,6 @@ class ProjectGui:
# break out of the loop, if cancel was requested
break
progress_bar.hide()
elif action == "generate_one_toolpath":
task = self.task_list[current_task_index]
self.generate_toolpath(task["tool"], task["process"])
else:
pass
def disable_invalid_process_settings(self, widget=None, data=None):
# possible dependencies of the DropCutter
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment