- 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:
Marius Stanciu
2022-01-19 02:25:40 +02:00
committed by Marius
parent 04e6bf0872
commit cdf6872e5e
10 changed files with 138 additions and 112 deletions

View File

@@ -6037,22 +6037,23 @@ class CNCjob(Geometry):
self.app.inform.emit('[ERROR_NOTCL] %s' % _("Travel Z parameter is None or zero."))
return 'fail'
if self.z_move < 0:
self.app.inform.emit('[WARNING] %s' %
_("The Travel Z parameter has negative value. "
"It is the height value to travel between cuts.\n"
"The Z Travel parameter needs to have a positive value, assuming it is a typo "
"therefore the app will convert the value to positive."
"Check the resulting CNC code (Gcode etc)."))
self.z_move = -self.z_move
elif self.z_move == 0:
self.app.inform.emit(
'[WARNING] %s: %s' % (_("The Z Travel parameter is zero. This is dangerous, skipping file"),
self.options['name'])
)
return 'fail'
if 'laser' not in self.pp_geometry_name:
if self.z_move < 0:
self.app.inform.emit('[WARNING] %s' %
_("The Travel Z parameter has negative value. "
"It is the height value to travel between cuts.\n"
"The Z Travel parameter needs to have a positive value, assuming it is a typo "
"therefore the app will convert the value to positive."
"Check the resulting CNC code (Gcode etc)."))
self.z_move = -self.z_move
elif self.z_move == 0:
self.app.inform.emit(
'[WARNING] %s: %s' % (_("The Z Travel parameter is zero. This is dangerous, skipping file"),
self.options['name'])
)
return 'fail'
# made sure that depth_per_cut is no more then the z_cut
# made sure that depth_per_cut is no more than the z_cut (travelz)
try:
if abs(self.z_cut) < self.z_depthpercut:
self.z_depthpercut = abs(self.z_cut)