r/rust•
404response

Are there any Rust projects for 3D Printing?

Hey everyone, I have been learning Rust on and off for the past couple of weeks and I have just recently gotten a 3D Printer. Now I am wondering whether there are any Rust projects concerning 3D Printing which I could contribute to.

Also: Thank you for being such a helpful and friendly community, my journey through Rust has been amazing so far.

Posted Oct 29, 2019, 12:36 AM UTC

169
bzar0•

I did sloper a while back to produce printable 3D models from images that show the image in grayscale when viewed from the front with light coming from above+behind at a 45° angle. Has made for some nice gifts to people. It's pretty much feature-complete at this point though, but just as an example.

EDIT: White filament recommended.

7
jschievink•

Whoa, that's awesome!

1
404responseOP•

Wow, this is a really cool project. I'll take a look at the code and try to understand it.

1
bzar0•

The code is quite ugly tbh, I was in a bit of a rush making it and have since just mostly used it.

1
iggy_koopa•

I'm working on a sand drawing project. It uses gcode for the drawings, so would be relatively easy to convert to printer firmware if you add a z axis. https://github.com/etrombly/sandbox

I also was working on a library to write a slicer a while back, but didn't get too far with it. https://github.com/etrombly/printer_geo

1
404responseOP•

I'd be super interested in writer a slicer but I would have no idea where to start

1
iggy_koopa•

You can take a look at what I started. So far you can load an STL, then cut it into 2d planes. The next step I was going to work on was a path planner to figure out the tool path to print with. I think I'd need to keep track of the normals too to figure out what shapes are the interior, I just ignore them for now.

1
404responseOP•

I'll have a look. Do you know of any good resources on how slicers work and path planing in particular?

One very simple idea I had was to cut the shape into 0.4mm sized squares and then connect them with straight lines. For any missing parts inbetween the extruder would just retract. This would result in 100% infill and no actual wall but might be a starting point.

1
iggy_koopa•

I was planning on making a projection of diagonal lines, then finding where they intersect the shapes. I'd remove the line segments that were outside of the printable areas. Then starting at the bottom corner of each shape connect the line to the nearest one, go to the other end of the line and connect it until you get to the last line. Should be a pretty easy way to get a linear fill pattern. Didn't put any thought into any other infills for now.

For reference I'd check out one of the existing open source slicers. They'll probably be in C or python, but the concepts will be the same.

1