Andy Thornhill – Final Project

For my final project, I wanted to print out the track map that I ride dirtbikes on every weekend. I also get other data from my watch outside of just GPS coordinates, so I wanted to make prints that used those different stats as well. While my code has no problem applying to other rides that I have done, I used data from these two rides(both are links to the activity): Lee’s Trail and Hard Trail.


This project had a few distinct challenges for me. The first was parsing data from the .GPX file that is exported from my watch. Luckily, .GPX data is parsed the same as XML data, but there are some major differences that made this task difficult. Latitude and Longitude coordinates can be obtained with a simple get(‘lat’) and get(‘lon’), but for some reason to get elevation I have to use a really odd string thats at the beginning of the .GPX file, it made even less sense when I finally got heart rate and temp to read.

Speeds are not actually recorded by the watch, so I had to calculate those manually. I had 2 methods of calculating the speeds, since times recorded by the watch are rounded off, using distance/time does not really work here. I had to assume that the way points were calculated at a constant rate, so the speed I modeled and printed is actually representative of distance traveled. The speeds vary greatly across the track, and when modeling each point based on the distance travelled from the last point, it is very spiky. I decided another good representation of speed is to take the distance travelled across multiple points, and use the same height for each point that was used. This resulted in the speed having a much more rounded look.

The next major challenge I had to deal with was offsetting the elevated curve. Unfortunately the curve I am working with is absolutely horrendous (at least it never intersects with itself, although it gets dangerously close). The offset curve block in grasshopper would mess up all of the curves, and it wouldn’t even complete the offset, stopping about halfway down the curve. Offset surface would at least complete the curve, but it was as messed up as the offset curve function. There isn’t a perfect solution to this problem, but there is one that gets really close. Converting the loft into a mesh, then offsetting the mesh both inwards and outwards keeps the offset from getting too janky, it also smooths out both sides, which I like.


Printing:
Once these two problems were resolved I was able to start printing the elevated track. For the most part, printing was pretty straight forward, the only thing I had to do was utilize a brim for most prints. I also printed some smaller sections of the HardTrail, and those required a raft. Luckily, my sister has access to a Prusa 3 MK4 printer at her work, and she let me use those to print out the Hardtrail, one print was sliced normally, while the other was in vase mode, which made the print go a lot faster, but the walls ended up much thinner. The difference between the Prusa and my Creality ender 3 was very noticeable, the prusa prints ended up being incredibly smooth with no strings, which were appearing a lot on my printer. It was neat to see the difference money could buy with these 3d printers.

Above: Prusa print with regular slicing methods.
Below: Ender 3 prints, Lee’s Trail with elevation, heart rate, then speed

Future Work:
For the future, I do intend to use this program to print other tracks that I hike and ride.
I can also take this program further to overlay the track onto the local terrain, so you can get a full view of the surrounding area, but also see the track sticking out.
I would also like to refine my printer settings, the brims and rafts were tedious to remove, and I’d like to find a better way to print without the track lifting off of the plate.

Reflection:
This was by far my favorite project in this class, mostly because I got to bring together my passions for dirtbikes and computers. I definitely learned quite a bit throughout this project about python, parsing GPX files, and different methods of offsetting. I think the prints turned out super cool, and I’m excited to print more.

Overall, I really enjoyed this class. I’m not a person who typically finds much of an interest in artsy things, but this class allowed me to explore that side of me that I never really got to experience before. Thank you!

Presentation:
https://docs.google.com/presentation/d/1nfG_M25XZMyah8USBUtkWuA75Kx4nXqVcTjZ84y5BUU/edit?usp=sharing