linuxcnc c++ axis gui works!

More
2 years 11 months ago #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:
 

Attachment not found



lcnc axis c++ gui:
 

Attachment not found



Video:


Github:
github.com/grotius-cnc/linuxcnc/tree/mas...s/qt_lcnc_controller

Please Log in to join the conversation.

More
2 years 11 months ago #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.

Please Log in to join the conversation.

More
2 years 11 months ago #286400 by tommylight
Search for "gremlin", i think that is the name of the backplot part of LinuxCNC.

Please Log in to join the conversation.

More
2 years 11 months ago #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.


 

Please Log in to join the conversation.

More
2 years 11 months ago #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 to join the conversation.

More
2 years 7 months ago #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 to join the conversation.

More
1 year 4 months ago #329988 by unknown
Ok we get you don't get Python, they are just libraries, not dependencies, the same as you need libs for C & C++ and other things.

WTF you're dragging up a thread that's over 12 months old and repeating your opinions regarding Python & Java & not adding adding that is of relevance, every time you post it has nothing of importance or relevance.

Yeah I get the irony, but (insert vulgar speech here) you're such a (insert vulgar speech here) waste of space.

Please Log in to join the conversation.

Time to create page: 0.092 seconds
Powered by Kunena Forum