- if Start Z parameter is set in Edit -> Preferences now there is no extra lift GCode because it is replaced by the startz GCode (except for laser preprocessors)

This commit is contained in:
Marius Stanciu
2022-02-15 22:19:48 +02:00
committed by Marius
parent a1a999b635
commit ac81f4f9f4
2 changed files with 18 additions and 22 deletions

View File

@@ -13,6 +13,7 @@ CHANGELOG for FlatCAM beta
- added ability to copy the coordinates of the exclusion area with the context menu actions in the Exclusion areas table found in the Milling/Drilling plugins - added ability to copy the coordinates of the exclusion area with the context menu actions in the Exclusion areas table found in the Milling/Drilling plugins
- in Tcl command `add_polygon` added ability to use `-p_coords` optional parameter where the value of this argument should be a list of tuple coordinates - in Tcl command `add_polygon` added ability to use `-p_coords` optional parameter where the value of this argument should be a list of tuple coordinates
- minor fixes in the Milling Plugin - minor fixes in the Milling Plugin
- if `Start Z` parameter is set in Edit -> Preferences now there is no extra lift GCode because it is replaced by the startz GCode (except for `laser` preprocessors)
13.02.2022 13.02.2022

View File

@@ -3451,12 +3451,11 @@ class CNCjob(Geometry):
# t_gcode += start_gcode # t_gcode += start_gcode
# do the ToolChange event # do the ToolChange event
t_gcode += self.doformat(p.z_feedrate_code)
if toolchange: if toolchange:
t_gcode += self.doformat(p.z_feedrate_code)
t_gcode += self.doformat(p.toolchange_code, toolchangexy=(temp_locx, temp_locy)) t_gcode += self.doformat(p.toolchange_code, toolchangexy=(temp_locx, temp_locy))
t_gcode += self.doformat(p.z_feedrate_code) t_gcode += self.doformat(p.z_feedrate_code)
else: else:
t_gcode += self.doformat(p.z_feedrate_code)
t_gcode += self.doformat(p.lift_code) t_gcode += self.doformat(p.lift_code)
# Spindle start # Spindle start
@@ -3925,40 +3924,36 @@ class CNCjob(Geometry):
# Measurements # Measurements
total_travel = 0.0 total_travel = 0.0
total_cut = 0.0 total_cut = 0.0
# Start GCode # Start GCode
start_gcode = '' start_gcode = ''
if is_first: if is_first:
start_gcode = self.doformat(p.start_code) start_gcode = self.doformat(p.start_code)
# t_gcode += start_gcode # t_gcode += start_gcode
# Toolchange code # ToolChange code
t_gcode += self.doformat(p.feedrate_code) # sets the feed rate t_gcode += self.doformat(p.feedrate_code) # sets the feed rate
if toolchange: if toolchange:
t_gcode += self.doformat(p.toolchange_code) t_gcode += self.doformat(p.toolchange_code)
if 'laser' not in self.pp_geometry_name.lower():
t_gcode += self.doformat(p.spindle_code) # Spindle start
else:
# for laser this will disable the laser
t_gcode += self.doformat(p.lift_code, x=self.oldx, y=self.oldy) # Move (up) to travel height
if self.dwell:
t_gcode += self.doformat(p.dwell_code) # Dwell time
else: else:
t_gcode += self.doformat(p.lift_code, x=0, y=0) # Move (up) to travel height if self.startz is None or 'laser' in self.pp_geometry_name.lower():
t_gcode += self.doformat(p.lift_code, x=0, y=0) # Move (up) to travel height
t_gcode += self.doformat(p.startz_code, x=0, y=0) t_gcode += self.doformat(p.startz_code, x=0, y=0)
if 'laser' not in self.pp_geometry_name.lower(): # Spindle start
t_gcode += self.doformat(p.spindle_code) # Spindle start if 'laser' not in self.pp_geometry_name.lower():
else: t_gcode += self.doformat(p.spindle_code)
# for laser this will disable the laser else:
t_gcode += self.doformat(p.lift_code, x=self.oldx, y=self.oldy) # Move (up) to travel height # for laser this will disable the laser
t_gcode += self.doformat(p.lift_code, x=self.oldx, y=self.oldy) # Move (up) to travel height
# Dwell time
if self.dwell:
t_gcode += self.doformat(p.dwell_code)
if self.dwell is True: # Feed rate set
t_gcode += self.doformat(p.dwell_code) # Dwell time t_gcode += self.doformat(p.feedrate_code)
t_gcode += self.doformat(p.feedrate_code) # sets the feed rate
# ## Iterate over geometry paths getting the nearest each time. # Iterate over geometry paths getting the nearest each time.
path_count = 0 path_count = 0
# variables to display the percentage of work done # variables to display the percentage of work done