Skip to content

Vismach: Merge functions from twp-vismach.py - #4370

Open
Sigma1912 wants to merge 1 commit into
LinuxCNC:masterfrom
Sigma1912:Vismach_Add-functions
Open

Vismach: Merge functions from twp-vismach.py#4370
Sigma1912 wants to merge 1 commit into
LinuxCNC:masterfrom
Sigma1912:Vismach_Add-functions

Conversation

@Sigma1912

@Sigma1912 Sigma1912 commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

This merges the added functionality in 'twp_vismach.py' to the standard 'vismach.py'
Thus the two vismach models that used 'twp_vismach' can now use the standard 'vismach.py' and 'twp_vismach.py' can be removed.

The indenting in the existing vismach code is messy. I have kept most of it to make the changes more easy to follow.

Note that on some systems there is an error message that is related to the text overlay ('hud') object. This is preexisting, prints once and only if a text overlay has been added to the scene:

Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python3.11/tkinter/__init__.py", line 1948, in __call__
    return self.func(*args)
           ^^^^^^^^^^^^^^^^
  File "/home/user/git/linuxcnc-master/lib/python/rs274/OpenGLTk.py", line 374, in tkExpose
    self.tkRedraw()
  File "/home/user/git/linuxcnc-master/lib/python/rs274/OpenGLTk.py", line 351, in tkRedraw
    self.redraw()
  File "/home/user/git/linuxcnc-master/lib/python/vismach.py", line 869, in redraw
    self.hud.draw()
  File "/home/user/git/linuxcnc-master/lib/python/vismach.py", line 718, in draw
    glOrtho(0.0, self.app.winfo_width(), 0.0, ypos, -1.0, 1.0)
  File "/usr/lib/python3/dist-packages/OpenGL/platform/baseplatform.py", line 415, in __call__
    return self( *args, **named )
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/OpenGL/error.py", line 230, in glCheckError
    raise self._errorClass(
OpenGL.error.GLError: GLError(
	err = 1285,
	description = b'out of memory',
	baseOperation = glOrtho,
	cArguments = (0.0, 400, 0.0, 400.0, -1.0, 1.0)
)

The only in-tree vismach application that uses the current Hud feature seems to be /src/emc/usr_intf/axis/scripts/tracking-test.py. The functionality of this is unchanged other than the color of the hud display:

Current:
Screenshot from 2026-08-10 16-32-45

New:
Screenshot from 2026-08-10 16-33-10

@c-morley

Copy link
Copy Markdown
Collaborator

Is this something re should add to qt vismach too?

@Sigma1912

Copy link
Copy Markdown
Contributor Author

Not sure. Maybe we should find a way for qtvismach to use the functions in vismach.py.

Comment thread lib/python/vismach.py Outdated
Comment thread lib/python/vismach.py
Comment thread lib/python/vismach.py Outdated
Comment thread lib/python/vismach.py
Comment thread lib/python/vismach.py Outdated
Comment thread lib/python/vismach.py
Comment thread lib/python/vismach.py Outdated
@Sigma1912
Sigma1912 force-pushed the Vismach_Add-functions branch from b36c8f2 to 749758b Compare August 11, 2026 15:36
@Sigma1912

Sigma1912 commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

@grandixximo
Thanks so much for spending the time to review this!

@Sigma1912
Sigma1912 marked this pull request as draft August 11, 2026 17:12
@Sigma1912
Sigma1912 force-pushed the Vismach_Add-functions branch from 749758b to 478e2b6 Compare August 11, 2026 17:28
@Sigma1912
Sigma1912 marked this pull request as ready for review August 11, 2026 17:30
@grandixximo
grandixximo self-requested a review August 12, 2026 01:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants