- fixed a minor UI glitch in the CNCJob UI
- made sure that the `drillcncjob` and `cncjob` Tcl commands will use the `-las_power` parameter to set the laser power when using a preprocessor with `laser` in its name
This commit is contained in:
@@ -43,6 +43,7 @@ class TclCommandCncjob(TclCommandSignaled):
|
||||
('endxy', str),
|
||||
('spindlespeed', int),
|
||||
('dwelltime', float),
|
||||
('las_power', float),
|
||||
('las_min_pwr', float),
|
||||
('pp', str),
|
||||
('muted', str),
|
||||
@@ -77,7 +78,8 @@ class TclCommandCncjob(TclCommandSignaled):
|
||||
('dwelltime', 'Time to pause to allow the spindle to reach the full speed.\n'
|
||||
'If it is not used in command then it will not be included'),
|
||||
('outname', 'Name of the resulting Geometry object.'),
|
||||
('las_min_pwr', 'Used with "laser" preprocessors. States the laser power when not cutting'),
|
||||
('las_power', 'Used with "laser" preprocessors. Set the laser power when cutting'),
|
||||
('las_min_pwr', 'Used with "laser" preprocessors. Set the laser power when not cutting, travelling'),
|
||||
('pp', 'Name of the Geometry preprocessor. No quotes, case sensitive'),
|
||||
('muted', 'It will not put errors in the Shell. Can be True (1) or False (0)')
|
||||
]),
|
||||
@@ -187,7 +189,11 @@ class TclCommandCncjob(TclCommandSignaled):
|
||||
"in format (x, y) - no spaces allowed. But always two comma separated values.")
|
||||
|
||||
# Spindle speed
|
||||
args["spindlespeed"] = args["spindlespeed"] if "spindlespeed" in args and args["spindlespeed"] != 0 else None
|
||||
if 'laser' not in args["pp"]:
|
||||
args["spindlespeed"] = (args["spindlespeed"] if "spindlespeed" in args and
|
||||
args["spindlespeed"] != 0 else None)
|
||||
else:
|
||||
args["spindlespeed"] = args["las_power"] if "las_power" in args else 0.0
|
||||
|
||||
# Laser minimum power
|
||||
args["las_min_pwr"] = args["las_min_pwr"] if "las_min_pwr" in args else 0.0
|
||||
|
||||
@@ -42,6 +42,7 @@ class TclCommandDrillcncjob(TclCommandSignaled):
|
||||
('endz', float),
|
||||
('endxy', str),
|
||||
('dwelltime', float),
|
||||
('las_power', float),
|
||||
('las_min_pwr', float),
|
||||
('pp', str),
|
||||
('opt_type', str),
|
||||
@@ -77,7 +78,8 @@ class TclCommandDrillcncjob(TclCommandSignaled):
|
||||
'like: 0.3,1.0). WARNING: no spaces allowed in the value.'),
|
||||
('dwelltime', 'Time to pause to allow the spindle to reach the full speed.\n'
|
||||
'If it is not used in command then it will not be included'),
|
||||
('las_min_pwr', 'Used with "laser" preprocessors. States the laser power when not cutting'),
|
||||
('las_power', 'Used with "laser" preprocessors. Set the laser power when cutting'),
|
||||
('las_min_pwr', 'Used with "laser" preprocessors. Set the laser power when not cutting, travelling'),
|
||||
('pp', 'This is the Excellon preprocessor name: case_sensitive, no_quotes'),
|
||||
('opt_type', 'Name of move optimization type. B by default for Basic OR-Tools, M for Metaheuristic OR-Tools'
|
||||
'T from Travelling Salesman Algorithm. B and M works only for 64bit version of FlatCAM and '
|
||||
@@ -287,6 +289,7 @@ class TclCommandDrillcncjob(TclCommandSignaled):
|
||||
pp_excellon_name = args["pp"] if "pp" in args and args["pp"] else self.app.defaults["tools_drill_ppname_e"]
|
||||
job_obj.pp_excellon_name = pp_excellon_name
|
||||
job_obj.options['ppname_e'] = pp_excellon_name
|
||||
|
||||
# multidepth
|
||||
if 'dpp' in args:
|
||||
job_obj.multidepth = True
|
||||
@@ -308,8 +311,16 @@ class TclCommandDrillcncjob(TclCommandSignaled):
|
||||
job_obj.feedrate_rapid = float(args["feedrate_rapid"]) \
|
||||
if "feedrate_rapid" in args and args["feedrate_rapid"] else \
|
||||
self.app.defaults["tools_drill_feedrate_rapid"]
|
||||
# SpindleSpped
|
||||
job_obj.spindlespeed = float(args["spindlespeed"]) if "spindlespeed" in args else None
|
||||
|
||||
# SpindleSpped / Laser Power
|
||||
if 'laser' not in pp_excellon_name:
|
||||
job_obj.spindlespeed = float(args["spindlespeed"]) if "spindlespeed" in args else None
|
||||
else:
|
||||
job_obj.spindlespeed = float(args["las_power"]) if "las_power" in args else 0.0
|
||||
|
||||
# laser minimum power
|
||||
job_obj.laser_min_power = float(args["las_min_pwr"]) if "las_min_pwr" in args else 0.0
|
||||
|
||||
# spindle direction
|
||||
job_obj.spindledir = self.app.defaults["tools_drill_spindledir"]
|
||||
# dwell and dwelltime
|
||||
@@ -323,9 +334,6 @@ class TclCommandDrillcncjob(TclCommandSignaled):
|
||||
job_obj.dwell = self.app.defaults["tools_drill_dwell"]
|
||||
job_obj.dwelltime = self.app.defaults["tools_drill_dwelltime"]
|
||||
|
||||
# laser minimum power
|
||||
job_obj.laser_min_power = float(args["las_min_pwr"]) if "las_min_pwr" in args else 0.0
|
||||
|
||||
job_obj.coords_decimals = int(self.app.defaults["cncjob_coords_decimals"])
|
||||
job_obj.fr_decimals = int(self.app.defaults["cncjob_fr_decimals"])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user