linuxcnc c++ axis gui works!

More
23 Nov 2023 21:13 #286375 by Grotius
Hi,

I made a c++ lcnc controller, that looks a bit like the original axis gui.
This gui is more reactive then any Python coded program interface can be.

Users now can easely modify this gui into any exotic machine program using c++ and
a editor like qt.

It uses a method like the lcnc sai interpreter to load cad data.
It uses the lcnc nml interface.

Original lcnc axis gui:
 

lcnc axis c++ gui:
 

Video:


Github:
github.com/grotius-cnc/linuxcnc/tree/mas...s/qt_lcnc_controller
Attachments:
The following user(s) said Thank You: opw, tommylight, tivoi, rodw, Alexandrion, Unlogic

Please Log in or Create an account to join the conversation.

More
24 Nov 2023 11:53 - 24 Nov 2023 12:05 #286393 by mungkie
How does the code make preview backplot (3d line segments from gcode) ??

Is there way to reduce resolution so there are fewer line segments in view (reduce memory used)

I cannot see how gcode preview is made in initialize there seems nothing but toolcone/axes/etc..

github.com/grotius-cnc/linuxcnc/blob/mas...opencascade.cpp#L262

How is gcode backplot made and setup?

I think I see in github.com/grotius-cnc/linuxcnc/blob/191.../mainwindow.cpp#L162

it gets data from runInterpreter() and then loops  for(uint i=0; i<cadvec.size(); i++) so maybe if I change i++ to i=i+line_reduction it could reduce memory usage?

I will give it a try later but if you have any more usefiul comment to help before I try please comment.
Last edit: 24 Nov 2023 12:05 by mungkie.

Please Log in or Create an account to join the conversation.

More
24 Nov 2023 13:20 #286400 by tommylight
Search for "gremlin", i think that is the name of the backplot part of LinuxCNC.
The following user(s) said Thank You: Grotius

Please Log in or Create an account to join the conversation.

More
24 Nov 2023 15:56 #286409 by Grotius
Hi,

Is there way to reduce resolution so there are fewer line segments in view (reduce memory used)
Yes i can code that. But why do you need it?

How is gcode backplot made and setup?
Its uses the lcnc interpreter to read a gcode file, this spits out gcode data. Then we catch this data and
drop it into opencascade cad viewer. But you can also drop it in opengl, if you have some coded.
This can also show your machine body if coded.


I will give it a try later but if you have any more usefiul comment to help before I try please comment.
Just try to run it, cq1, step by step.


 
The following user(s) said Thank You: tivoi

Please Log in or Create an account to join the conversation.

More
27 Nov 2023 22:45 #286641 by mungkie
Sorry I just realise this use roughly same method as gremlin/axis from the lib/glcannon.py and interprets the gcode with its own method rather than get data from trajectory planner and show simulation of the real paths made by machine.

Please Log in or Create an account to join the conversation.

More
29 Mar 2024 14:53 #297114 by vmihalca
There was another linuxcnc UI made in java that I used as an inspiration for my project made in kotlin. I also relied on the external interpreter, but I am not confortable with the fact that I might draw something else than the internal interpreter is doing. While I've worked a bit on the VTK rendering code used by QtPyVcp, I noticed that in the interpreting process it goes from c++ to python then back to c++.
Would it be that hard to decouple this from python so that we could use the internal interpreter as a source of data rather than the external interpreter?
This way we could have UI built in any other language without being so tightly coupled to python.
The guy that worked on the java linuxcnc controller, said that the SAI has has the measurement units hardcoded so that might be buggy.

I don't know linuxcnc into that much depth, but I am convinced that you do. so I was wondering how much of an effort would be to decouple these so that we could use any other programming language that can interact with the NML buffer.

I also had a version that is exposing all the functionality that NML offers through GRPC. That also decouples the linuxcnc from python.
I would really love to push my code as an alternative to python. After almost 20 years of coding object oriented, python makes my eyes bleed.

Please Log in or Create an account to join the conversation.

Time to create page: 0.140 seconds
Powered by Kunena Forum