Skip to content

Commit 8df60c0

Browse files
committed
qtplasmac: fix gcode filter spotting coordinates when overburn is active
1 parent d94aa29 commit 8df60c0

3 files changed

Lines changed: 16 additions & 5 deletions

File tree

share/qtvcp/screens/qtplasmac/qtplasmac_handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VERSION = '237.305'
1+
VERSION = '237.306'
22
LCNCVER = '2.9'
33
DOCSVER = LCNCVER
44

share/qtvcp/screens/qtplasmac/versions.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ <h2>QtPlasmaC Version History - LinuxCNC 2.9</h2>
2626
</table>
2727
<br>
2828
<!--- ****** ADD NEXT VERSION BELOW THIS LINE ****** --->
29+
<br><b><u>237.305 2024 Feb 25</u></b>
30+
<ul style="margin:0;">
31+
<li>fix gcode filter spotting coordinates when overburn is active</li>
32+
</ul>
33+
2934
<br><b><u>237.305 2024 Feb 24</u></b>
3035
<ul style="margin:0;">
3136
<li>allow Z DRO to display torch height in manual cut</li>

src/emc/usr_intf/qtplasmac/qtplasmac_gcode.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
'''
33
plasmac_gcode.py
44
5-
Copyright (C) 2019, 2020, 2021, 2022, 2023 Phillip A Carter
6-
Copyright (C) 2020, 2021, 2022, 2023 Gregory D Carl
5+
Copyright (C) 2019 - 2024 Phillip A Carter
6+
Copyright (C) 2020 - 2024 Gregory D Carl
77
88
This program is free software; you can redistribute it and/or modify it
99
under the terms of the GNU General Public License as published by the
@@ -235,7 +235,7 @@ def process_file(self):
235235
code = self.parse_code(both[0])
236236
cmnt = both[1]
237237
if code:
238-
line = f'{code} {tag}{cmnt}'
238+
line = f'{code}{tag}{cmnt}'
239239
else:
240240
line = f'{tag}{cmnt}'
241241
# code only - parse the code
@@ -279,7 +279,7 @@ def parse_code(self, data):
279279
data = data[1:]
280280
data = tmp
281281
# if incremental distance mode fix overburn coordinates
282-
if data[:3] in ['G00', 'G01'] and self.distMode == 91 and (self.oBurnX or self.oBurnY):
282+
if data[:3] in ['G00', 'G01'] and self.distMode == 91 and (self.oBurnX or self.oBurnY) and not self.spotting:
283283
data = self.fix_overburn_incremental_coordinates(data)
284284
# set path blending
285285
if 'G64' in data:
@@ -313,6 +313,9 @@ def parse_code(self, data):
313313
# is this a scribe
314314
if data.startswith('M03 $1 S'):
315315
self.set_scribing()
316+
# is this a spot
317+
if data.startswith('M03 $2 S') and not self.pierceOnly:
318+
self.spotting = True
316319
# test for pierce only mode
317320
elif data.replace(' ','').startswith('#<pierce-only>=1') or self.cutType == 1:
318321
self.set_pierce_mode()
@@ -734,6 +737,9 @@ def spindle_off(self, data):
734737
self.lineNum += 1
735738
data = f'{data}\nM65 P3 (enable torch)'
736739
self.torchEnable = True
740+
# if not pierce mode reset spotting flag
741+
if not self.pierceOnly:
742+
self.spotting = False
737743
return data
738744

739745
def program_end(self, data):

0 commit comments

Comments
 (0)