QGCoder / qgcoder

An interactive G-code editing GUI.
GNU General Public License v2.0
19 stars 4 forks source link

Add collaborators #5

Closed koppi closed 2 years ago

koppi commented 8 years ago

Hi @ArcEye , would you like to join the development of github.com/koppi/gcoder?

Here's a quick video demo: https://www.youtube.com/watch?v=9D3hMXP5-QM

ArcEye commented 8 years ago

Hi @koppi An interesting project, not had time to do more than run video and scan a little code for now.

What are your aims for the project?

What do you think I can contribute?

I am a bit busy at present with MK stuff, but something written in Qt with a functioning plotter / preview is certainly interesting to me.

regards

koppi commented 8 years ago

I quickly hacked this together, it took two days or so to write.

@ArcEye thank's for giving it a try. Right now the gcoder code is a subset of code from this repo https://github.com/KASUYASU/cutsim (mainly g2m/*) + the libqglviewer based view.cpp.

I like to have a Qt based replacement for AXIS in the long run, but also a fast gcode previewer, which can be built and run without the controller aspect (i.e. without -llinuxcncini -llinuxcnchal -lnml -llinuxcnc -lposemath but with it's only dependency to /usr/bin/rs274ngc ) but also previews quick and runs smooth with huge > 100 MB gcode files.

Maybe we can add the controller aspect to gcoder, I saw https://github.com/ArcEye/qtMDI and your post on the ml about wanting to have an AXIS qt based replacement for Machinekit.

ArcEye commented 8 years ago

Ok, I've installed the necessary libs and built it.

Found hf2gcode, built that and installed it

When launched gcoder emits radius 2.97841e+271 cannot find tooltable and displays the generated gcode but no GL plot

mainwin.cpp appears to hardcode paths that would only apply on your computer

        emit setRS274("/usr/bin/rs274");
        emit setToolTable("/opt/machinekit/configs/sim/sim_mm_test.tbl");
        emit setGcodeFile("/tmp/gcode.ngc");

reset those to ones that apply on mine and now get interpreter errors from the nf2gcode header output

Tried -m --no-pre --no-post but hf2gcode still chucks out 15 lines of uncommented stuff that stops the interpreter dead Don't know if your version is different?

INFO:read 28 bytes from -
Text from stream   : yes
Used hershey font  : scriptc
G-code Output      : -
Base Unit          : mm
Scale              : 0.500000
Feed rate          : 200.000000 mm/min
X-Axis offset      : 0.000000 mm
Y-Axis offset      : 0.000000 mm
Pen-Up   Z value   : 1.000000 mm
Pen-Down Z value   : -1.000000 mm
Y interline        : 15.000000 mm
Multiline align    : left
Minimalistic gcode : no
Precision          : 3

Finally edited the hf2gcode.c file to print a ';' preceding all those lines and voila it works!

Looks promising as a previewer, interested to see a large engraving file or similar in it. and here it is.............

selection_008

Well done, has real potential :+1:

Andy1978 commented 8 years ago

use -q (quiet) to supress the info output

Andy1978 commented 8 years ago

I've removed the --quiet option which is now default. You can enable the additional infos with --verbose which are (comments) and should be ingnored by gcode parsers

ArcEye commented 8 years ago

Seems I have collaborated already. Just realised where I had seen the gcode editor and highlighter code in editor.cpp and high.cpp before :wink:

I have now managed to edit a 11MB slicer file so that rs274 will accept it and that displays in about 10 secs.

selection_009

Display isn't anything great, don't know what the end object is supposed to be, was a test file I used with QtMDI. Just shows it will cope with the size (410K lines of code).

I am not sure if there is a way to use the stock rs274 binary in the long term. The kind of people who will want previews that Axis cannot provide, are going to have their code littered with user M codes etc. that rs274 cannot deal with. That might require direct alteration of the code to ignore them.

ArcEye commented 8 years ago

Seems I have collaborated already. Just realised where I had seen the gcode editor and highlighter code in editor.cpp and high.cpp before :wink:

As you like the gcode editor, to aid future GUI production, I have made it a Designer Widget. https://github.com/ArcEye/QGCodeEditor

koppi commented 8 years ago

@ArcEye I just added you as a collaborator to https://github.com/koppi/gcoder . You can now push into the repo.

ArcEye commented 8 years ago

OK, thanks. Best check everything works with the plugin and I will keep my fork as it is for now. I was intending PR'ing a separate branch rather than to master, but of course could not create the branch to PR to at that time.