Introduction: Data Based Extrusion

For this project, I made a data physicalization representing FBI statistic on hate crimes using variable extrusion rates on a 3D printed object with G-code created in Grasshopper.

Supplies

Software: Rhino/Grasshopper. Hardware: Ender 3 Pro 3D Printer

Step 1: Identify Goal

A couple weeks ago I created a 3D printed parametric lamp. The first attempt at printing failed due to a clogged nozzle, leading to these under-extrusion artifacts. I found the string-y effect very compelling and wanted to pursue it further. Given the task of writing custom G-code, I realized this would be a good time to explore a variable extrusion rate. I needed something to drive the varying extrusion, so I decided I would make this into a data physicalization where the object becomes a timeline represented in extrusion failures.

Step 2: Collect and Format Data

For my dataset I used the FBI's Crime Data Explorer (available at https://cde.ucr.cjis.gov/LATEST/webapp/#/pages/explorer/crime/hate-crime). I manually pulled the number of recorded hate crimes in the last 20 years of public study (2002-2022) and put them into a Google Sheets file. I then exported that as a csv file, ready to go into Grasshopper.

Step 3: Parse Data

Normally 3D printers have a constant extrusion rate set for the entire print, calculated by the slicer. But with G-code, there is the ability to specify an extrusion amount for each movement. In order to turn my data into extrusion amounts, I first had to define my parameter, Under-Extrude Factor, a number between 0-1. When the height of the object (the object being a vertical timeline where the oldest year starts at the bottom and the most recent is at the top) corresponds to the year with the lowest recorded attacks, the extrusion rate would remain unchanged (multiplied by 1), whereas at the year corresponding to the highest the extrusion rate would be multiplied by the Under-Extrude Factor, with the most extreme option of Under-Extrude Factor = 0 causing a complete stop in extrusion.

While I had 20 years in my dataset, there would be a lot more commands than that. I decided that I wanted the extrusion amounts to flow nicely together, so I interpolated the list of 20 into a list with a value for every move, linearly interpolating to fill in the gaps between the evenly spaced years.

Step 4: Modify Base Code

The core of the slicer was created by Mert Toka in 2022. I extended his program by implementing my data parsing, then taking that list and multiplying each element by its corresponding element in the processed data. I also made the design a rectangular prism instead of a cylinder as I was curious how the sharp corners would effect the under-extrusion artifacts.

Step 5: Print

I was pleased to see that my G-code worked and produced a successful print. The first time I printed I actually had the data factor reversed, so the under extrusion was in the wrong areas, but it created cool looking gashes in the print. The second time it worked correctly, but the under-extrusion was hard to see, so for my final print I took the under-extrusion factor from 0.5 to 0.33 to make the effect more pronounced. I also made the rectangle narrower and taller as I had more confidence in its ability. In the end, while you can see the effect when you look closely, from most distances it looks like a pretty normal rectangle. I'd like to continue to work on making the effect more extreme and ways of using 3D printing side-effects in data physicalization.