- fixed issue in the Laser postprocessor where the laser was turned on as soon as the GCode started creating an unwanted cut up until the job start
This commit is contained in:
parent
727cee7aec
commit
cc3622d4c5
@ -17,7 +17,8 @@ CAD program, and create G-Code for Isolation routing.
|
|||||||
- some GUI optimizations
|
- some GUI optimizations
|
||||||
- more GUI optimizations related to being part of the Advanced category or not
|
- more GUI optimizations related to being part of the Advanced category or not
|
||||||
- added possibility to change the positive SVG exported file color in Tool Film
|
- added possibility to change the positive SVG exported file color in Tool Film
|
||||||
- fixed some issues recently introduced in the TclCommands CNCJob, DrillCNCJob adn write_gcode; changed some parameters names
|
- fixed some issues recently introduced in the TclCommands CNCJob, DrillCNCJob and write_gcode; changed some parameters names
|
||||||
|
- fixed issue in the Laser postprocessor where the laser was turned on as soon as the GCode started creating an unwanted cut up until the job start
|
||||||
|
|
||||||
15.09.2019
|
15.09.2019
|
||||||
|
|
||||||
|
54
camlib.py
54
camlib.py
@ -5685,10 +5685,11 @@ class CNCjob(Geometry):
|
|||||||
must_visit.remove(nearest)
|
must_visit.remove(nearest)
|
||||||
return path
|
return path
|
||||||
|
|
||||||
def generate_from_excellon_by_tool(self, exobj, tools="all", drillz = 3.0,
|
def generate_from_excellon_by_tool(
|
||||||
toolchange=False, toolchangez=0.1, toolchangexy='',
|
self, exobj, tools="all", drillz = 3.0,
|
||||||
endz=2.0, startz=None,
|
toolchange=False, toolchangez=0.1, toolchangexy='',
|
||||||
excellon_optimization_type='B'):
|
endz=2.0, startz=None,
|
||||||
|
excellon_optimization_type='B'):
|
||||||
"""
|
"""
|
||||||
Creates gcode for this object from an Excellon object
|
Creates gcode for this object from an Excellon object
|
||||||
for the specified tools.
|
for the specified tools.
|
||||||
@ -6482,11 +6483,18 @@ class CNCjob(Geometry):
|
|||||||
# self.gcode += self.doformat(p.toolchange_code)
|
# self.gcode += self.doformat(p.toolchange_code)
|
||||||
self.gcode += self.doformat(p.toolchange_code)
|
self.gcode += self.doformat(p.toolchange_code)
|
||||||
|
|
||||||
self.gcode += self.doformat(p.spindle_code) # Spindle start
|
if 'laser' not in self.pp_geometry_name:
|
||||||
|
self.gcode += self.doformat(p.spindle_code) # Spindle start
|
||||||
|
else:
|
||||||
|
# for laser this will disable the laser
|
||||||
|
self.gcode += self.doformat(p.lift_code, x=self.oldx, y=self.oldy) # Move (up) to travel height
|
||||||
|
|
||||||
if self.dwell is True:
|
if self.dwell is True:
|
||||||
self.gcode += self.doformat(p.dwell_code) # Dwell time
|
self.gcode += self.doformat(p.dwell_code) # Dwell time
|
||||||
else:
|
else:
|
||||||
self.gcode += self.doformat(p.spindle_code) # Spindle start
|
if 'laser' not in self.pp_geometry_name:
|
||||||
|
self.gcode += self.doformat(p.spindle_code) # Spindle start
|
||||||
|
|
||||||
if self.dwell is True:
|
if self.dwell is True:
|
||||||
self.gcode += self.doformat(p.dwell_code) # Dwell time
|
self.gcode += self.doformat(p.dwell_code) # Dwell time
|
||||||
|
|
||||||
@ -6589,15 +6597,16 @@ class CNCjob(Geometry):
|
|||||||
)
|
)
|
||||||
return self.gcode
|
return self.gcode
|
||||||
|
|
||||||
def generate_from_geometry_2(self, geometry, append=True,
|
def generate_from_geometry_2(
|
||||||
tooldia=None, offset=0.0, tolerance=0,
|
self, geometry, append=True,
|
||||||
z_cut=1.0, z_move=2.0,
|
tooldia=None, offset=0.0, tolerance=0,
|
||||||
feedrate=2.0, feedrate_z=2.0, feedrate_rapid=30,
|
z_cut=1.0, z_move=2.0,
|
||||||
spindlespeed=None, spindledir='CW', dwell=False, dwelltime=1.0,
|
feedrate=2.0, feedrate_z=2.0, feedrate_rapid=30,
|
||||||
multidepth=False, depthpercut=None,
|
spindlespeed=None, spindledir='CW', dwell=False, dwelltime=1.0,
|
||||||
toolchange=False, toolchangez=1.0, toolchangexy="0.0, 0.0",
|
multidepth=False, depthpercut=None,
|
||||||
extracut=False, startz=None, endz=2.0,
|
toolchange=False, toolchangez=1.0, toolchangexy="0.0, 0.0",
|
||||||
pp_geometry_name=None, tool_no=1):
|
extracut=False, startz=None, endz=2.0,
|
||||||
|
pp_geometry_name=None, tool_no=1):
|
||||||
"""
|
"""
|
||||||
Second algorithm to generate from Geometry.
|
Second algorithm to generate from Geometry.
|
||||||
|
|
||||||
@ -6825,13 +6834,18 @@ class CNCjob(Geometry):
|
|||||||
# self.gcode += self.doformat(p.toolchange_code)
|
# self.gcode += self.doformat(p.toolchange_code)
|
||||||
self.gcode += self.doformat(p.toolchange_code)
|
self.gcode += self.doformat(p.toolchange_code)
|
||||||
|
|
||||||
self.gcode += self.doformat(p.spindle_code) # Spindle start
|
if 'laser' not in self.pp_geometry_name:
|
||||||
|
self.gcode += self.doformat(p.spindle_code) # Spindle start
|
||||||
|
else:
|
||||||
|
# for laser this will disable the laser
|
||||||
|
self.gcode += self.doformat(p.lift_code, x=self.oldx, y=self.oldy) # Move (up) to travel height
|
||||||
|
|
||||||
if self.dwell is True:
|
if self.dwell is True:
|
||||||
self.gcode += self.doformat(p.dwell_code) # Dwell time
|
self.gcode += self.doformat(p.dwell_code) # Dwell time
|
||||||
|
|
||||||
else:
|
else:
|
||||||
self.gcode += self.doformat(p.spindle_code) # Spindle start
|
if 'laser' not in self.pp_geometry_name:
|
||||||
|
self.gcode += self.doformat(p.spindle_code) # Spindle start
|
||||||
|
|
||||||
if self.dwell is True:
|
if self.dwell is True:
|
||||||
self.gcode += self.doformat(p.dwell_code) # Dwell time
|
self.gcode += self.doformat(p.dwell_code) # Dwell time
|
||||||
|
|
||||||
@ -7247,7 +7261,7 @@ class CNCjob(Geometry):
|
|||||||
|
|
||||||
match_lsr_pos = re.search(r"^(M0[3|5])", gline)
|
match_lsr_pos = re.search(r"^(M0[3|5])", gline)
|
||||||
if match_lsr_pos:
|
if match_lsr_pos:
|
||||||
if match_lsr_pos.group(1) == 'M05':
|
if 'M05' in match_lsr_pos.group(1):
|
||||||
# the value does not matter, only that it is positive so the gcode_parse() know it is > 0,
|
# the value does not matter, only that it is positive so the gcode_parse() know it is > 0,
|
||||||
# therefore the move is of kind T (travel)
|
# therefore the move is of kind T (travel)
|
||||||
command['Z'] = 1
|
command['Z'] = 1
|
||||||
@ -7316,7 +7330,7 @@ class CNCjob(Geometry):
|
|||||||
pass
|
pass
|
||||||
elif 'hpgl' in self.pp_excellon_name or 'hpgl' in self.pp_geometry_name:
|
elif 'hpgl' in self.pp_excellon_name or 'hpgl' in self.pp_geometry_name:
|
||||||
pass
|
pass
|
||||||
elif 'grbl_laser' in self.pp_excellon_name or 'grbl_laser' in self.pp_geometry_name:
|
elif 'laser' in self.pp_excellon_name or 'laser' in self.pp_geometry_name:
|
||||||
pass
|
pass
|
||||||
elif ('X' in gobj or 'Y' in gobj) and gobj['Z'] != current['Z']:
|
elif ('X' in gobj or 'Y' in gobj) and gobj['Z'] != current['Z']:
|
||||||
if self.pp_geometry_name == 'line_xyz' or self.pp_excellon_name == 'line_xyz':
|
if self.pp_geometry_name == 'line_xyz' or self.pp_excellon_name == 'line_xyz':
|
||||||
|
Loading…
Reference in New Issue
Block a user