From 2053f786e642cba8d3c315445ec85c0dbbd3e80f Mon Sep 17 00:00:00 2001 From: RomSunZ Date: Mon, 26 Jan 2026 15:01:38 +0700 Subject: [PATCH 1/9] Fix disappearing tool marker Tool marker disappears if its diameter less then some value but not equal zero (for example if diameter from tool table is used as wear corrector) --- lib/python/rs274/glcanon.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/python/rs274/glcanon.py b/lib/python/rs274/glcanon.py index 27b8bd078ef..97197ef1adb 100644 --- a/lib/python/rs274/glcanon.py +++ b/lib/python/rs274/glcanon.py @@ -518,6 +518,7 @@ def __init__(self, s=None, lp=None, g=None): self.foam_z_height = 0 self.hide_icons = False self.disable_cone_scaling = False + self.view_tool_min_dia = 0.0 try: system_memory_bytes = os.sysconf('SC_PAGE_SIZE') * os.sysconf('SC_PHYS_PAGES') @@ -567,6 +568,9 @@ def __init__(self, s=None, lp=None, g=None): self.max_file_size = int(temp) * 1024 * 1024 self.disable_cone_scaling = bool(self.inifile.find("DISPLAY", "DISABLE_CONE_SCALING")) + tool_min_dia = (self.inifile.find("DISPLAY", "GCODE_VIEW_TOOL_MIN_DIA") or None) + if tool_min_dia is not None: + self.view_tool_min_dia = float(tool_min_dia) except: # Probably started in an editor so no INI @@ -1496,7 +1500,7 @@ def redraw(self): glBlendFunc(GL_ONE, GL_CONSTANT_ALPHA) current_tool = self.get_current_tool() - if current_tool is None or current_tool.diameter == 0: + if current_tool is None or current_tool.diameter < self.view_tool_min_dia: if self.canon and not self.disable_cone_scaling: g = self.canon From 44baeee4199f78234384d8e1cb535544405a005b Mon Sep 17 00:00:00 2001 From: RomSunZ Date: Mon, 26 Jan 2026 15:16:32 +0700 Subject: [PATCH 2/9] Update axis.ini Prevent tool mark disappearing with small tool diameter in g-code preview widget --- configs/sim/axis/axis.ini | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configs/sim/axis/axis.ini b/configs/sim/axis/axis.ini index 5b37c2d10a9..405acec29f7 100644 --- a/configs/sim/axis/axis.ini +++ b/configs/sim/axis/axis.ini @@ -51,6 +51,9 @@ INTRO_TIME = 5 #EDITOR = geany TOOL_EDITOR = tooledit +#Prevent tool mark disappearing with small tool diameter in g-code preview widget +GCODE_VIEW_TOOL_MIN_DIA = 0 + INCREMENTS = 1 in, 0.1 in, 10 mil, 1 mil, 1mm, .1mm, 1/8000 in [FILTER] From a8e8c9c5d93cb170c56d6eabdd9862ba91a861e6 Mon Sep 17 00:00:00 2001 From: RomSunZ Date: Mon, 26 Jan 2026 15:17:31 +0700 Subject: [PATCH 3/9] Update axis.ini Prevent tool mark disappearing with small tool diameter in g-code preview widget --- configs/sim/axis/axis.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/sim/axis/axis.ini b/configs/sim/axis/axis.ini index 405acec29f7..149a8134d03 100644 --- a/configs/sim/axis/axis.ini +++ b/configs/sim/axis/axis.ini @@ -52,7 +52,7 @@ INTRO_TIME = 5 TOOL_EDITOR = tooledit #Prevent tool mark disappearing with small tool diameter in g-code preview widget -GCODE_VIEW_TOOL_MIN_DIA = 0 +GCODE_VIEW_TOOL_MIN_DIA = 0.08 INCREMENTS = 1 in, 0.1 in, 10 mil, 1 mil, 1mm, .1mm, 1/8000 in From 0a79f71256c4c57858c8a58a2edcb4073ce00c2c Mon Sep 17 00:00:00 2001 From: RomSunZ Date: Mon, 26 Jan 2026 15:18:53 +0700 Subject: [PATCH 4/9] Update axis_mm.ini Prevent tool mark disappearing with small tool diameter in g-code preview widget --- configs/sim/axis/axis_mm.ini | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configs/sim/axis/axis_mm.ini b/configs/sim/axis/axis_mm.ini index e1e2e306b2c..83e13be75f4 100644 --- a/configs/sim/axis/axis_mm.ini +++ b/configs/sim/axis/axis_mm.ini @@ -45,6 +45,9 @@ INTRO_TIME = 5 #EDITOR = geany +#Prevent tool mark disappearing with small tool diameter in g-code preview widget +GCODE_VIEW_TOOL_MIN_DIA = 0.08 + INCREMENTS = 1 mm, .01 in, .1mm, 1 mil, .1 mil, 1/8000 in [FILTER] PROGRAM_EXTENSION = .png,.gif,.jpg Grayscale Depth Image From e7ae2c9902d8fb273501bbac156f37920bdf20c2 Mon Sep 17 00:00:00 2001 From: RomSunZ Date: Mon, 26 Jan 2026 15:19:12 +0700 Subject: [PATCH 5/9] Update axis_mm.ini Prevent tool mark disappearing with small tool diameter in g-code preview widget --- configs/sim/axis/axis_mm.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/sim/axis/axis_mm.ini b/configs/sim/axis/axis_mm.ini index 83e13be75f4..872ad034f4f 100644 --- a/configs/sim/axis/axis_mm.ini +++ b/configs/sim/axis/axis_mm.ini @@ -46,7 +46,7 @@ INTRO_TIME = 5 #EDITOR = geany #Prevent tool mark disappearing with small tool diameter in g-code preview widget -GCODE_VIEW_TOOL_MIN_DIA = 0.08 +GCODE_VIEW_TOOL_MIN_DIA = 2.0 INCREMENTS = 1 mm, .01 in, .1mm, 1 mil, .1 mil, 1/8000 in [FILTER] From a4768ca4877941ef88762f2f69a9c0b678868cbd Mon Sep 17 00:00:00 2001 From: RomSunZ Date: Mon, 26 Jan 2026 15:20:27 +0700 Subject: [PATCH 6/9] Update gmoccapy.ini Prevent tool mark disappearing with small tool diameter in g-code preview widget --- configs/sim/gmoccapy/gmoccapy.ini | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configs/sim/gmoccapy/gmoccapy.ini b/configs/sim/gmoccapy/gmoccapy.ini index 9aa8a90074e..199960f1d14 100644 --- a/configs/sim/gmoccapy/gmoccapy.ini +++ b/configs/sim/gmoccapy/gmoccapy.ini @@ -45,6 +45,9 @@ PROGRAM_PREFIX = ../../nc_files/ INTRO_GRAPHIC = linuxcnc.gif INTRO_TIME = 5 +#Prevent tool mark disappearing with small tool diameter in g-code preview widget +GCODE_VIEW_TOOL_MIN_DIA = 2.0 + # list of selectable jog increments INCREMENTS = 1.000 mm, 0.100 mm, 0.010 mm, 0.001 mm, 1.2345 inch From b5620516616416cbcf7b9210a340fd1e2e34880d Mon Sep 17 00:00:00 2001 From: RomSunZ Date: Mon, 26 Jan 2026 15:21:27 +0700 Subject: [PATCH 7/9] Update qtdragon_hd_xyz.ini Prevent tool mark disappearing with small tool diameter in g-code preview widget --- configs/sim/qtdragon_hd/qtdragon_hd_xyz/qtdragon_hd_xyz.ini | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configs/sim/qtdragon_hd/qtdragon_hd_xyz/qtdragon_hd_xyz.ini b/configs/sim/qtdragon_hd/qtdragon_hd_xyz/qtdragon_hd_xyz.ini index f869d28af0f..4f69e58083a 100644 --- a/configs/sim/qtdragon_hd/qtdragon_hd_xyz/qtdragon_hd_xyz.ini +++ b/configs/sim/qtdragon_hd/qtdragon_hd_xyz/qtdragon_hd_xyz.ini @@ -40,6 +40,9 @@ MIN_LINEAR_VELOCITY = 0 MAX_LINEAR_VELOCITY = 60.00 DEFAULT_LINEAR_VELOCITY = 50.0 +#Prevent tool mark disappearing with small tool diameter in g-code preview widget +GCODE_VIEW_TOOL_MIN_DIA = 2.0 + # incremental jog step length options INCREMENTS = 10 mm, 1.0 mm, 0.10 mm, 0.01 mm, 1.0 inch, 0.1 inch, 0.01 inch From 22e5f1135e4185a7565e8fac386fa60515c7df92 Mon Sep 17 00:00:00 2001 From: RomSunZ Date: Mon, 26 Jan 2026 15:22:03 +0700 Subject: [PATCH 8/9] Update qtdragon_hd_vertical.ini Prevent tool mark disappearing with small tool diameter in g-code preview widget --- .../sim/qtdragon_hd/qtdragon_hd_xyz/qtdragon_hd_vertical.ini | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configs/sim/qtdragon_hd/qtdragon_hd_xyz/qtdragon_hd_vertical.ini b/configs/sim/qtdragon_hd/qtdragon_hd_xyz/qtdragon_hd_vertical.ini index e4a6b145d51..3b6d774ecb6 100644 --- a/configs/sim/qtdragon_hd/qtdragon_hd_xyz/qtdragon_hd_vertical.ini +++ b/configs/sim/qtdragon_hd/qtdragon_hd_xyz/qtdragon_hd_vertical.ini @@ -40,6 +40,9 @@ MIN_LINEAR_VELOCITY = 0 MAX_LINEAR_VELOCITY = 60.00 DEFAULT_LINEAR_VELOCITY = 50.0 +#Prevent tool mark disappearing with small tool diameter in g-code preview widget +GCODE_VIEW_TOOL_MIN_DIA = 2.0 + # incremental jog step length options INCREMENTS = 10 mm, 1.0 mm, 0.10 mm, 0.01 mm, 1.0 inch, 0.1 inch, 0.01 inch From b3d014c796a88f8032437b9725240eee476f2ac6 Mon Sep 17 00:00:00 2001 From: RomSunZ Date: Mon, 26 Jan 2026 15:22:29 +0700 Subject: [PATCH 9/9] Update qtdragon_hd_vertical_xyza.ini Prevent tool mark disappearing with small tool diameter in g-code preview widget --- .../qtdragon_hd/qtdragon_hd_xyz/qtdragon_hd_vertical_xyza.ini | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configs/sim/qtdragon_hd/qtdragon_hd_xyz/qtdragon_hd_vertical_xyza.ini b/configs/sim/qtdragon_hd/qtdragon_hd_xyz/qtdragon_hd_vertical_xyza.ini index b3c57943ff7..34f61b4466b 100644 --- a/configs/sim/qtdragon_hd/qtdragon_hd_xyz/qtdragon_hd_vertical_xyza.ini +++ b/configs/sim/qtdragon_hd/qtdragon_hd_xyz/qtdragon_hd_vertical_xyza.ini @@ -44,6 +44,9 @@ DEFAULT_ANGULAR_VELOCITY = 10 MIN_ANGULAR_VELOCITY = 1 MAX_ANGULAR_VELOCITY = 360 +#Prevent tool mark disappearing with small tool diameter in g-code preview widget +GCODE_VIEW_TOOL_MIN_DIA = 2.0 + # incremental jog step length options INCREMENTS = 10 mm, 1.0 mm, 0.10 mm, 0.01 mm, 1.0 inch, 0.1 inch, 0.01 inch