I'm looking for a simple 3D Library to render GCode Files into a C++/Qt5.15.2 software project running on Windows.

A GCode file contains the instructions for a 3D-Printer to print a 3D Model (where to move, how much material to extrude, which layer is being printed, etc.). After parsing the GCode file, I get a list of lines representing the displacement of the nozzle and want to display in 3D this basic list of lines. Like in this example from https://gcode.ws/ : GCode render by gcode.ws

This project is developed with Three.js and the 3D render is done in a 200-lines file.

I'm looking for a similar library in C++, easy to use and sufficient, where I can just say "draw me this line". I only have lines to render, nothing else. To get an example I looked at the code of SuperSlicer which seems to use GLEW and is way more complex. I also looked into VTK, which seems to offer way too much for what I want to do, and Qt3D which is a OpenGL look-alike (correct me if I'm wrong on that point please). Do you know any free library that would allow to do that please ?

The files I need to display can have up to 3.000.000 lines of code.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.