L3:Travel through Another Dimension

Part 1: Building A Slicer and Generating G Code

The grasshopper code and the slicer itself can be found at the github repo here.

Task 1: Building the Slicer

Contours of our Cylinder: Cylinder with contours highlighted

Adding the rectangular infill box: Rectangular infill ines in green around a red cylinder

We can see this operating at each layer: Rectangular infill lines at 4 layers of the cylinder

And finally with the trimmed infill lines fit to the cylinder shape: Infill lines trimmed to a circle shape

Task 2: Generating GCode

Writing the python code was fairly straightforward - it took a few tries to get the syntax correct for some of the math functions as well as strings.

I used the following tutorial resources to look up a few python syntax questions and distance functions:

The output gcode is here

Task 3: Validating GCode

The code has not passed all tests yet. I still need to fix the following before moving on to Part 2: 22/3/2024 @ 21:21:26 ⇒ Running 25 Tests On “output.gcode” …

The code is now successfully running - I need to adjust the calculation for v_out and ensure I had proper float validation checks.

Additionally, I had to update the code to move to the center of the build plate.

Part 2: Fabricating the Design

I fabricated the test cylinder both with my custom slicer/Gcode generator and the .stl provided on the course website with Prusa slicing.

The resulting cylinders look almost identical. I did notice that the print time was longer for the custom slicer/Gcode variation - it took 11 minutes to print while the class version took 5. Additionally, the printer extruded material while doing the initial move to the center of the build plate.

Side by Side (excess material can be seen on the print from the custom slicer: Side by Side Images Class Version Finished Print (Note print time of 5 minutes) Class Version With Prusa Slicer