Activity shown for CNC Job generation via context manager.
This commit is contained in:
@@ -1014,8 +1014,12 @@ class FlatCAMGeometry(FlatCAMObj, Geometry):
|
|||||||
self.app.inform.emit("Done.")
|
self.app.inform.emit("Done.")
|
||||||
|
|
||||||
def job_thread(app_obj):
|
def job_thread(app_obj):
|
||||||
name = self.options["name"] + "_paint"
|
try:
|
||||||
app_obj.new_object("geometry", name, gen_paintarea)
|
name = self.options["name"] + "_paint"
|
||||||
|
app_obj.new_object("geometry", name, gen_paintarea)
|
||||||
|
except Exception as e:
|
||||||
|
proc.done()
|
||||||
|
raise e
|
||||||
proc.done()
|
proc.done()
|
||||||
|
|
||||||
self.app.inform.emit("Polygon Paint started ...")
|
self.app.inform.emit("Polygon Paint started ...")
|
||||||
@@ -1058,9 +1062,10 @@ class FlatCAMGeometry(FlatCAMObj, Geometry):
|
|||||||
|
|
||||||
# To be run in separate thread
|
# To be run in separate thread
|
||||||
def job_thread(app_obj):
|
def job_thread(app_obj):
|
||||||
app_obj.new_object("cncjob", outname, job_init)
|
with self.app.proc_container.new("Generating CNC Job."):
|
||||||
app_obj.inform.emit("CNCjob created: %s" % outname)
|
app_obj.new_object("cncjob", outname, job_init)
|
||||||
app_obj.progress.emit(100)
|
app_obj.inform.emit("CNCjob created: %s" % outname)
|
||||||
|
app_obj.progress.emit(100)
|
||||||
|
|
||||||
# Send to worker
|
# Send to worker
|
||||||
self.app.worker_task.emit({'fcn': job_thread, 'params': [self.app]})
|
self.app.worker_task.emit({'fcn': job_thread, 'params': [self.app]})
|
||||||
|
|||||||
@@ -30,4 +30,6 @@ class Worker(QtCore.QObject):
|
|||||||
|
|
||||||
if 'worker_name' not in task and self.name is None:
|
if 'worker_name' not in task and self.name is None:
|
||||||
task['fcn'](*task['params'])
|
task['fcn'](*task['params'])
|
||||||
return
|
return
|
||||||
|
|
||||||
|
FlatCAMApp.App.log.debug("Task ignored.")
|
||||||
@@ -331,6 +331,7 @@ class Geometry(object):
|
|||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
log.debug("camlib.clear_polygon()")
|
||||||
assert type(polygon) == Polygon
|
assert type(polygon) == Polygon
|
||||||
|
|
||||||
## The toolpaths
|
## The toolpaths
|
||||||
@@ -401,6 +402,8 @@ class Geometry(object):
|
|||||||
:return: List of toolpaths covering polygon.
|
:return: List of toolpaths covering polygon.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
log.debug("camlib.clear_polygon2()")
|
||||||
|
|
||||||
# Current buffer radius
|
# Current buffer radius
|
||||||
radius = tooldia / 2 * (1 - overlap)
|
radius = tooldia / 2 * (1 - overlap)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user