- finished implementing the new feature that add a new parameter laser minimum power for the Drillin, Milling Plugins and for the cncjob and drillcncjob Tcl commands:
- modified all the preprocessors that are for `laser` to use the new parameter: `laser minimum power`
This commit is contained in:
@@ -43,6 +43,7 @@ class TclCommandCncjob(TclCommandSignaled):
|
||||
('endxy', str),
|
||||
('spindlespeed', int),
|
||||
('dwelltime', float),
|
||||
('las_min_pwr', float),
|
||||
('pp', str),
|
||||
('muted', str),
|
||||
('outname', str)
|
||||
@@ -76,6 +77,7 @@ 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'),
|
||||
('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)')
|
||||
]),
|
||||
@@ -184,8 +186,12 @@ class TclCommandCncjob(TclCommandSignaled):
|
||||
self.raise_tcl_error("The entered value for 'endxy' needs to have the format x,y or "
|
||||
"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
|
||||
|
||||
# Laser minimum power
|
||||
args["las_min_pwr"] = args["las_min_pwr"] if "las_min_pwr" in args else 0.0
|
||||
|
||||
if 'dwelltime' in args:
|
||||
args["dwell"] = True
|
||||
if args['dwelltime'] is None:
|
||||
@@ -268,6 +274,7 @@ class TclCommandCncjob(TclCommandSignaled):
|
||||
local_tools_dict[tool_uid]['data']['tools_mill_spindlespeed'] = args["spindlespeed"]
|
||||
local_tools_dict[tool_uid]['data']['tools_mill_dwell'] = args["dwell"]
|
||||
local_tools_dict[tool_uid]['data']['tools_mill_dwelltime'] = args["dwelltime"]
|
||||
local_tools_dict[tool_uid]['data']['tools_mill_min_power'] = args["las_min_pwr"]
|
||||
local_tools_dict[tool_uid]['data']['tools_mill_ppname_g'] = args["pp"]
|
||||
|
||||
self.app.milling_tool.mtool_gen_cncjob(
|
||||
|
||||
@@ -42,6 +42,7 @@ class TclCommandDrillcncjob(TclCommandSignaled):
|
||||
('endz', float),
|
||||
('endxy', str),
|
||||
('dwelltime', float),
|
||||
('las_min_pwr', float),
|
||||
('pp', str),
|
||||
('opt_type', str),
|
||||
('diatol', float),
|
||||
@@ -76,6 +77,7 @@ 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'),
|
||||
('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 '
|
||||
@@ -320,6 +322,9 @@ 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