G-PARS3 Beta Available on GitHub.com

Cyrus Cuenca
Sleep Code Repeat
Published in
5 min readJun 30, 2016

If you’ve been keeping up with my YouTube channel, you may’ve seen videos of my LEGO 3D printers.

Back in July of 2015, Marc-Andre-Bazergui posted a video on his YouTube channel, of a 3D printer he made with a 3Doodler. He dubbed the printer, the EV3Doodler, and proceeded to make multiple versions, and post them across Instructables, Facebook, and YouTube. I was one of the many people who followed his project, and one day I looked into how computers convert 3D models into data 3D printers can read.

After a bit of research, I discovered that 3D printers use a coordinate system called g-code to print objects.

Basically, you first get a 3D model. You can either make your own with a CAD program, or download one. You then “slice” the model, which is when an application slices your model into thin layers, and calculates the path your print head would need to move to make that layer. After slicing, you can generate g-code. Your 3D printer then read the g-code with a g-code parser, and builds up the model.

After a bit of experimenting, I discovered that no g-code parsers would work on an EV3 brick.

I looked at a sample of g-code and realised how simple the system was. It was basically, one command, followed by a few parameters on each line. Semicolons marked comments, which could either be at the end of a command line, or on its own line.

I had been working with ROBOTC for my “Are you a LEGO Maker?” contest robot, and I thought it was possible to make a simple g-code parser with the language. This is when I decided I wanted to make my own g-code parser so I could build a LEGO 3D printer capable of making 3D models.

I found a wiki on reprap.org which explained each of the hundreds of current standard g-code commands. After combing through the commands, I found that a program would only need to read a few of those commands to build up a model.

I knew I would need help with the parser, so I asked Xander Soldaat for if he could help me out when I needed advice. We worked on the program via Facebook Messenger and e-mail, until he suggested I host the project on GitHub.com. After a few months more of work, I had a working
g-code parser.

I loaded it on my latest printer, and brought it to Maker Faire Bay Area 2016. I had my own booth, where I showed off the printer, along with one of bazmarc’s printers.

I got quite a lot of attention, and got an email list of people interested in building a LEGO 3D printer. I also got interviewed for Danish national TV, and by the 3D Printing Nerd.

I called my parser G-PARS3 and now the beta version is available on GitHub.

Here’s a link to a YouTube video of a very early version of G-PARS3:
https://www.youtube.com/watch?v=36_p1c6M734

The program isn’t fully stable, or complete at the moment, but if you’re eager you can load it on your EV3.

(Please note that if you don’t buy the license, and use your trial, you may not be able to download new versions of G-PARS3 to your EV3 brick.)

To set up G-PARS3:

  1. Download the trial version of ROBOTC for LEGO MINDSTORMS and follow the installation procedure.

2. Go to github.com/cyruscuenca/g-pars3 and download the repository in .zip format

3. Extract the file to your Desktop and open 3Dprinter2.c with ROBOTC.

4. Follow the configuration instructions in README.md
(Can be found in the g-pars3-master folder, or on the GitHub repository.)

5. Slice and generate g-code with Slic3r

Export the gcode as “gcode.rtf”

6. Use the file management utility in the ROBOTC application to download the g-code file to the rc-data folder.

7. Download the program to the robot, and click run.

I will continue to develop this program with the help of Xander, and will take suggestions in the comments. If you have any questions or concerns, please email me at:

cyrushcuenca@gmail.com

--

--