Filter all TCs for suitability for a given op.

This commit is contained in:
markus
2020-11-13 14:43:18 -08:00
committed by Markus Lampert
parent 8fb1cd078b
commit beb4f2e011
3 changed files with 18 additions and 7 deletions

View File

@@ -324,7 +324,7 @@ class ObjectOp(object):
if 1 < len(job.Operations.Group):
obj.ToolController = PathUtil.toolControllerForOp(job.Operations.Group[-2])
else:
obj.ToolController = PathUtils.findToolController(obj)
obj.ToolController = PathUtils.findToolController(obj, self)
if not obj.ToolController:
return None
obj.OpToolDiameter = obj.ToolController.Tool.Diameter
@@ -585,3 +585,11 @@ class ObjectOp(object):
obj.Base = baselist
else:
PathLog.notice((translate("Path", "Base object %s.%s rejected by operation") + "\n") % (base.Label, sub))
def isToolSupported(self, obj, tool):
'''toolSupported(obj, tool) ... Returns true if the op supports the given tool.
This function can safely be overwritten by subclasses.'''
return True