- updated the header of the postprocessos with 'laser' to show essential informations like some of them do not move on the Z axis
- make sure that the laser postprocessor that do move on the Z axis (like 'GRBL_laser_Z') accept negative values for the Z focus - fixed issue in highlighter such that the keywords that have an underscore included are highlighted - rearranged the default keywords - fixed the generatecncjob() method default parameters to reflect new data structure names - in Geometry object the default self.options dictionary is updated with keys that reflect new data structure
This commit is contained in:
@@ -58,34 +58,34 @@ class GeometryObject(FlatCAMObj, Geometry):
|
||||
"plot": True,
|
||||
"multicolored": False,
|
||||
|
||||
"cutz": -0.002,
|
||||
"vtipdia": 0.1,
|
||||
"vtipangle": 30,
|
||||
"travelz": 0.1,
|
||||
"feedrate": 5.0,
|
||||
"feedrate_z": 5.0,
|
||||
"feedrate_rapid": 5.0,
|
||||
"spindlespeed": 0,
|
||||
"dwell": True,
|
||||
"dwelltime": 1000,
|
||||
"multidepth": False,
|
||||
"depthperpass": 0.002,
|
||||
"extracut": False,
|
||||
"extracut_length": 0.1,
|
||||
"endz": 2.0,
|
||||
"endxy": '',
|
||||
"area_exclusion": False,
|
||||
"area_shape": "polygon",
|
||||
"area_strategy": "over",
|
||||
"area_overz": 1.0,
|
||||
"tools_mill_cutz": -0.002,
|
||||
"tools_mill_vtipdia": 0.1,
|
||||
"tools_mill_vtipangle": 30,
|
||||
"tools_mill_travelz": 0.1,
|
||||
"tools_mill_feedrate": 5.0,
|
||||
"tools_mill_feedrate_z": 5.0,
|
||||
"tools_mill_feedrate_rapid": 5.0,
|
||||
"tools_mill_spindlespeed": 0,
|
||||
"tools_mill_dwell": True,
|
||||
"tools_mill_dwelltime": 1000,
|
||||
"tools_mill_multidepth": False,
|
||||
"tools_mill_depthperpass": 0.002,
|
||||
"tools_mill_extracut": False,
|
||||
"tools_mill_extracut_length": 0.1,
|
||||
"tools_mill_endz": 2.0,
|
||||
"tools_mill_endxy": '',
|
||||
"tools_mill_area_exclusion": False,
|
||||
"tools_mill_area_shape": "polygon",
|
||||
"tools_mill_area_strategy": "over",
|
||||
"tools_mill_area_overz": 1.0,
|
||||
|
||||
"startz": None,
|
||||
"toolchange": False,
|
||||
"toolchangez": 1.0,
|
||||
"toolchangexy": "0.0, 0.0",
|
||||
"ppname_g": 'default',
|
||||
"z_pdepth": -0.02,
|
||||
"feedrate_probe": 3.0,
|
||||
"tools_mill_startz": None,
|
||||
"tools_mill_toolchange": False,
|
||||
"tools_mill_toolchangez": 1.0,
|
||||
"tools_mill_toolchangexy": "0.0, 0.0",
|
||||
"tools_mill_ppname_g": 'default',
|
||||
"tools_mill_z_pdepth": -0.02,
|
||||
"tools_mill_feedrate_probe": 3.0,
|
||||
})
|
||||
|
||||
if "tools_mill_tooldia" not in self.options:
|
||||
@@ -128,12 +128,12 @@ class GeometryObject(FlatCAMObj, Geometry):
|
||||
# flag to store if the V-Shape tool is selected in self.ui.geo_tools_table
|
||||
self.v_tool_type = None
|
||||
|
||||
# flag to store if the Geometry is type 'multi-geometry' meaning that each tool has it's own geometry
|
||||
# flag to store if the Geometry is type 'multi-geometry' meaning that each tool has its own geometry
|
||||
# the default value is False
|
||||
self.multigeo = False
|
||||
|
||||
# flag to store if the geometry is part of a special group of geometries that can't be processed by the default
|
||||
# engine of FlatCAM. Most likely are generated by some of tools and are special cases of geometries.
|
||||
# engine of FlatCAM. Most likely are generated by some tools and are special cases of geometries.
|
||||
self.special_group = None
|
||||
|
||||
# self.old_pp_state = self.app.defaults["tools_mill_multidepth"]
|
||||
@@ -1011,52 +1011,56 @@ class GeometryObject(FlatCAMObj, Geometry):
|
||||
:return: None
|
||||
"""
|
||||
|
||||
self.app.log.debug("FlatCAMGeometry.generatecncjob()")
|
||||
|
||||
tooldia = dia if dia else float(self.options["tools_mill_tooldia"])
|
||||
outname = outname if outname is not None else self.options["name"]
|
||||
|
||||
z_cut = z_cut if z_cut is not None else float(self.options["cutz"])
|
||||
z_move = z_move if z_move is not None else float(self.options["travelz"])
|
||||
z_cut = z_cut if z_cut is not None else float(self.options["tools_mill_cutz"])
|
||||
z_move = z_move if z_move is not None else float(self.options["tools_mill_travelz"])
|
||||
|
||||
feedrate = feedrate if feedrate is not None else float(self.options["feedrate"])
|
||||
feedrate_z = feedrate_z if feedrate_z is not None else float(self.options["feedrate_z"])
|
||||
feedrate_rapid = feedrate_rapid if feedrate_rapid is not None else float(self.options["feedrate_rapid"])
|
||||
feedrate = feedrate if feedrate is not None else float(self.options["tools_mill_feedrate"])
|
||||
feedrate_z = feedrate_z if feedrate_z is not None else float(self.options["tools_mill_feedrate_z"])
|
||||
feedrate_rapid = feedrate_rapid if feedrate_rapid is not None else float(self.options[
|
||||
"tools_mill_feedrate_rapid"])
|
||||
|
||||
multidepth = multidepth if multidepth is not None else self.options["multidepth"]
|
||||
depthperpass = dpp if dpp is not None else float(self.options["depthperpass"])
|
||||
multidepth = multidepth if multidepth is not None else self.options["tools_mill_multidepth"]
|
||||
depthperpass = dpp if dpp is not None else float(self.options["tools_mill_depthperpass"])
|
||||
|
||||
segx = segx if segx is not None else float(self.app.defaults['geometry_segx'])
|
||||
segy = segy if segy is not None else float(self.app.defaults['geometry_segy'])
|
||||
|
||||
extracut = extracut if extracut is not None else float(self.options["extracut"])
|
||||
extracut_length = extracut_length if extracut_length is not None else float(self.options["extracut_length"])
|
||||
extracut = extracut if extracut is not None else float(self.options["tools_mill_extracut"])
|
||||
extracut_length = extracut_length if extracut_length is not None else float(self.options[
|
||||
"tools_mill_extracut_length"])
|
||||
|
||||
startz = startz if startz is not None else self.options["startz"]
|
||||
endz = endz if endz is not None else float(self.options["endz"])
|
||||
startz = startz if startz is not None else self.options["tools_mill_startz"]
|
||||
endz = endz if endz is not None else float(self.options["tools_mill_endz"])
|
||||
|
||||
endxy = endxy if endxy else self.options["endxy"]
|
||||
endxy = endxy if endxy else self.options["tools_mill_endxy"]
|
||||
if isinstance(endxy, str):
|
||||
endxy = re.sub('[()\[\]]', '', endxy)
|
||||
if endxy and endxy != '':
|
||||
endxy = [float(eval(a)) for a in endxy.split(",")]
|
||||
|
||||
toolchangez = toolchangez if toolchangez else float(self.options["toolchangez"])
|
||||
toolchangez = toolchangez if toolchangez else float(self.options["tools_mill_toolchangez"])
|
||||
|
||||
toolchangexy = toolchangexy if toolchangexy else self.options["toolchangexy"]
|
||||
toolchangexy = toolchangexy if toolchangexy else self.options["tools_mill_toolchangexy"]
|
||||
if isinstance(toolchangexy, str):
|
||||
toolchangexy = re.sub('[()\[\]]', '', toolchangexy)
|
||||
if toolchangexy and toolchangexy != '':
|
||||
toolchangexy = [float(eval(a)) for a in toolchangexy.split(",")]
|
||||
|
||||
toolchange = toolchange if toolchange else self.options["toolchange"]
|
||||
toolchange = toolchange if toolchange else self.options["tools_mill_toolchange"]
|
||||
|
||||
offset = offset if offset else 0.0
|
||||
|
||||
# int or None.
|
||||
spindlespeed = spindlespeed if spindlespeed else self.options['spindlespeed']
|
||||
dwell = dwell if dwell else self.options["dwell"]
|
||||
dwelltime = dwelltime if dwelltime else float(self.options["dwelltime"])
|
||||
spindlespeed = spindlespeed if spindlespeed else self.options['tools_mill_spindlespeed']
|
||||
dwell = dwell if dwell else self.options["tools_mill_dwell"]
|
||||
dwelltime = dwelltime if dwelltime else float(self.options["tools_mill_dwelltime"])
|
||||
|
||||
ppname_g = pp if pp else self.options["ppname_g"]
|
||||
ppname_g = pp if pp else self.options["tools_mill_ppname_g"]
|
||||
|
||||
# Object initialization function for app.app_obj.new_object()
|
||||
# RUNNING ON SEPARATE THREAD!
|
||||
@@ -1065,6 +1069,7 @@ class GeometryObject(FlatCAMObj, Geometry):
|
||||
|
||||
# Propagate options
|
||||
job_obj.options["tooldia"] = tooldia
|
||||
job_obj.options["tools_mill_tooldia"] = tooldia
|
||||
|
||||
job_obj.coords_decimals = self.app.defaults["cncjob_coords_decimals"]
|
||||
job_obj.fr_decimals = self.app.defaults["cncjob_fr_decimals"]
|
||||
@@ -1075,8 +1080,8 @@ class GeometryObject(FlatCAMObj, Geometry):
|
||||
job_obj.segx = segx
|
||||
job_obj.segy = segy
|
||||
|
||||
job_obj.z_pdepth = float(self.options["z_pdepth"])
|
||||
job_obj.feedrate_probe = float(self.options["feedrate_probe"])
|
||||
job_obj.z_pdepth = float(self.options["tools_mill_z_pdepth"])
|
||||
job_obj.feedrate_probe = float(self.options["tools_mill_feedrate_probe"])
|
||||
|
||||
job_obj.options['xmin'] = self.options['xmin']
|
||||
job_obj.options['ymin'] = self.options['ymin']
|
||||
|
||||
Reference in New Issue
Block a user