Extruder-Turtle Custom GCode for 3D Printing

by ynchn in Workshop > 3D Printing

531 Views, 2 Favorites, 0 Comments

Extruder-Turtle Custom GCode for 3D Printing

IMG_3555.JPG
Screen Shot 2023-05-09 at 1.24.33 PM.png
Screen Shot 2023-05-09 at 1.28.52 PM.png

The inspiration for this project is slime mold, more scientifically called the Physarum polycephalum, and the patterns they form when they're searching for food. Maybe it's the mycelium from HBO's The Last of Us, or the fact that slime mold can grow and form networks eerily similar to the Tokyo Rail System - I just think fungi are neet.

For this 3D print project, I used the Extruder-Turtle Library to produce custom GCode, in order to trace the (roughly) simulation veins and branching of the slime mold. Later, I added a think layer of background as well.

Supplies

  • Rhino/Grasshopper
  • Extruder-Turtle Library
  • I used the turtle3D.py file by Melody Horn and Leah Buechley as the Library. This step would require importing the script in Rhino's Tools (Rhino > Menu Bar - Tools > Python Script > Tools - Options).
  • However, looking at the Extruder-Turtle Library website and the GitHub repository, there were a couple of functions that are not in my script, e.g. t.extrude(amount), that I'd like to try. So next time I will try to import from the repository directly and see what happens.
  • Ender-3 Pro 3D Printer

Create Veins and Branching With Extruder-Turtle

Screen Shot 2023-05-08 at 3.39.25 PM.png
Screen Shot 2023-05-09 at 1.00.55 PM.png
Screen Shot 2023-05-08 at 3.43.26 PM.png

I wrote a recursive function to draw the branching.

The Logo Interpreter has a sample tree function that draws similar branching.

Sketches like this fungi simluation & this fractal simulation in p5 were also inspirations.

I wanted to add some randomness to the branches, so they look a bit more "organic". Initially, I added random degrees between -15 and 15, to the branching angle. However, I didn't consider that since we need multiple layers to trace the design, the design needs to be a bit more deterministic. Generate different branching angle each function call in each layer resulted in pic#2 above. So I fixed the change to the branching angle, flipping its sign before each recursion call.

Printer Setup & Test Print

IMG_3546.JPG

Before printing, we need to make sure the print bed is level. For the Ender-3 Pro the manual adjustment was quite a tedious process. (Using bed leveling gcodes from All3DP can help with the process.)

Before printing the actual design, I printed the star using the Extruder Turtle's sample code. It printed fine without a hitch.

Print the Design

Screen Shot 2023-05-08 at 5.25.36 PM.png
IMG_3548.JPG
Screen Shot 2023-05-09 at 1.05.27 PM.png
IMG_3552.JPG

For the first print, the number of generations (for the recursive branching) was a bit too high. The finer details for the small branches were all smooshed together (at this point I haven't messed with the extrusion rate, it's a constant 0.05). I suppose if I decrease the extrusion rate for the nozzle it could be somewhat alleviated(?)

I was also lazy and didn't level the bed before this print, so the resulting print had a lot of shifting along the x-axis. It also kinda looks more like a cauliflower than anything.

For the next print, I decreased the generation to remove branches that are too small and close together, and made the design over larger as well.

The print looks good, though I'm not sure why some of the branches split into two paths. The design in Rhino and the simulated result didn't show the splitting at all. There wasn't any global shifting issue. Not really sure what's causing this, but I'm guessing it could be from a loose x-belt, or that the original tree tool path was just expecting smaller overall print and less travel.

Add the Membrane Surface

IMG_3553.JPG
Screen Shot 2023-05-09 at 1.06.51 PM.png
IMG_3557.JPG
IMG_3555.JPG

I also wanted to incorporate the translucent, membrane-like areas next to the veins of the fungi.

Sanago, a Korean manual 3D pen artist, draws swirls to create or fill surfaces. Therefore, I took inspiration from his techniques, and created a grid of overlapping circles in grasshopper as the membrane surface.

The first strip I printed had small and dense circles, and they merged together pretty compactly. It was okay, but I want the surface to be able to let more light through. (I also had 2 layers of these circles in my GCode, which made the surface too opaque and stiff.) Therefore, in the next print I made the circles larger. I cut out the excess areas. The membrane surface was able to let what's beneath the print show through.

Experiment With Changing Extrusion Rate

Screen Shot 2023-05-09 at 1.07.15 PM.png
IMG_3558.JPG
IMG_3559.JPG

Last but not least, I attempted to adjust the extrusion rate in my GCode. I modified the extrusion rate to depend on the distance between each nozzle position. My intention was to increase the extrusion rate for longer segments. But I think the difference between longer and shorter segments weren't drastic enough to see a lot of significant difference.

The overall filament extruded decreased. The membrane surface was made thinner, too. The mat on the print bed had a couple of spots that weren't flat or had blemishes. These areas cause some "holes" in the membrane, though it wasn't a big issue. On the upside, with the thinner membrane surface, I could just tear away the excess areas by hand. The jagged edges added some organic and roughness to the print design. I think the thinner material also allow more color and light to show through the surface.