GCode + Turtle Experimentations

by IasPat in Workshop > 3D Printing

518 Views, 0 Favorites, 0 Comments

GCode + Turtle Experimentations

PXL_20220501_010736882_3.jpg

This instructable provides an insight on how you can exploit the possibilities of GCode and Extruder-Turtle library to generate your own GCode for 3D printing.

Supplies

PLA, 3D printer. A Creality Ender 3 Pro has been used for this instructable.

Download Extruder-turtle Library

https://github.com/Hand-and-Machine/extruder-turtle


Follow the instructions to set up Grasshopper.

Start by Generating Your Own Shapes in Rhino and Grasshopper

Screenshot 2022-04-30 165010.png
Screenshot 2022-04-30 165423.png

Start by generating some paradigms as presented in the websites below.


https://www.calormen.com/jslogo/#general%202:28


https://handandmachine.org/projects/extruder_turtle/index.html

Paradigm Generation

PXL_20220425_233324939.MP.jpg
PXL_20220425_233408553.jpg
PXL_20220425_233305389.jpg
PXL_20220425_233310220.jpg

This example is using the Python component and includes the star definition from the Turtle code.


def star (t, size):

  for i in range (0,5):

    t.Forward(size)

    t.Right(1.44*size)


for i in range (0,layers):

  star(t,100)

  t.TiltUp(90)

  t.Forward(layerHeight)

  t.TiltDown(90)

   

Modulate the Code

PXL_20220427_042012286.jpg
PXL_20220427_041930399.jpg
PXL_20220427_031602195.jpg

After printing an example you can try modulating the code to produce more complex geometries. Expect inconsistencies during printing. GCode might include errors (extrusion, height, etc.). In that case, stop the printer, modify your code and start from scratch. If your structure is ready to collapse like in my last image, it is usually the layer heigh.

Final Result

PXL_20220501_005957273.jpg
PXL_20220501_010101000.jpg
PXL_20220501_010118917.jpg