From 155f6e66dfd0acae99121857d6a6f66b9956ec14 Mon Sep 17 00:00:00 2001 From: Chris Breneman Date: Wed, 27 Nov 2019 16:04:38 -0500 Subject: [PATCH 1/2] Add dwell and dwelltime options to drillcncjob command to match cncjob command. Also add missing import to drillcncjob. --- tclCommands/TclCommandDrillcncjob.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tclCommands/TclCommandDrillcncjob.py b/tclCommands/TclCommandDrillcncjob.py index d50d0008..f1b18084 100644 --- a/tclCommands/TclCommandDrillcncjob.py +++ b/tclCommands/TclCommandDrillcncjob.py @@ -1,5 +1,6 @@ from ObjectCollection import * from tclCommands.TclCommand import TclCommandSignaled +import math class TclCommandDrillcncjob(TclCommandSignaled): @@ -27,6 +28,8 @@ class TclCommandDrillcncjob(TclCommandSignaled): ('toolchangez', float), ('toolchangexy', tuple), ('endz', float), + ('dwell', bool), + ('dwelltime', float), ('pp', str), ('outname', str), ('opt_type', str), @@ -53,6 +56,8 @@ class TclCommandDrillcncjob(TclCommandSignaled): ('toolchangez', 'Z distance for toolchange (example: 30.0).'), ('toolchangexy', 'X, Y coordonates for toolchange in format (x, y) (example: (2.0, 3.1) ).'), ('endz', 'Z distance at job end (example: 30.0).'), + ('dwell', 'True or False; use (or not) the dwell'), + ('dwelltime', 'Time to pause to allow the spindle to reach the full speed'), ('pp', 'This is the Excellon postprocessor name: case_sensitive, no_quotes'), ('outname', 'Name of the resulting Geometry object.'), ('opt_type', 'Name of move optimization type. B by default for Basic OR-Tools, M for Metaheuristic OR-Tools' @@ -177,6 +182,10 @@ class TclCommandDrillcncjob(TclCommandSignaled): job_obj.feedrate_rapid = args["feedrate_rapid"] \ if "feedrate_rapid" in args and args["feedrate_rapid"] else obj.options["feedrate_rapid"] + if args['dwell'] and args['dwelltime']: + job_obj.dwell = True + job_obj.dwelltime = float(args['dwelltime']) + job_obj.spindlespeed = args["spindlespeed"] if "spindlespeed" in args else None job_obj.pp_excellon_name = args["pp"] if "pp" in args and args["pp"] \ else obj.options["ppname_e"] From f2b9ba28a089c488bd1b9784b1960529b208c414 Mon Sep 17 00:00:00 2001 From: Chris Breneman Date: Mon, 2 Dec 2019 14:23:30 -0500 Subject: [PATCH 2/2] Remove math import --- tclCommands/TclCommandDrillcncjob.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tclCommands/TclCommandDrillcncjob.py b/tclCommands/TclCommandDrillcncjob.py index f1b18084..78884a42 100644 --- a/tclCommands/TclCommandDrillcncjob.py +++ b/tclCommands/TclCommandDrillcncjob.py @@ -1,6 +1,5 @@ from ObjectCollection import * from tclCommands.TclCommand import TclCommandSignaled -import math class TclCommandDrillcncjob(TclCommandSignaled):