This is a work in progress and some things may be broken or the README
does not completely match the actual project.
This is a passion project of mine, inspired by this video. The original idea is to recreate any image from a long (black) string, which is wrapped around nails in a round frame. This WIP project provides an algorithm that takes any image and returns how a string must be wrapped around points on a frame to recreate the picture. Note that this is only a very loose adaptation of the algorithm presented in the linked video.
But now for the fun part. This project uses a 3D printer to print the frame first and then the actual strings that compose the picture. This is achieved by producing a custom GCode that stretches filament across the frame to produce thin strings, similar to how the filament is extruded during its production. From some initial trials, this works surprisingly well.
Printinting_final.mp4
You'll need a recent python 3 installation (i developed and tested the project on python 3.11.x) and some basic libraries. Check out requirements.txt
.
For a quick start:
git clone https://github.com/CapDaniels/filament_art.git
cd filament_art
pip install -r requirements.txt
python main.py
Install.Final.mp4
The GUI should walk you through it. But the basic steps are:
- Start by running the script
- Select and configure your frame and your general settings.
- You run the sting solver algorithm
- You save the
.stl
model and the custom GCode. The script can now be closed. - You slice the model with the slicer of your choosing.
- You manually need to copy the GCode generated by the python script and place it at the end of the Gcode that prints your frame (or run them after each other as separate files and be careful with the axis homing. I can't tell you what to do ¯\(ツ)/¯. )
- You start the print and hope for the best.
Don't be scared if the first 2 or 3 stings fail. Some pressure needs to build up in the nozzle for a consistent stringing to work.
Settings.Final.mp4
The.Solver.Final.mp4
Export.Final.mp4
- add settings for fan speed and nozzle temperature (for now fixed at full speed and 200°C)
- refactor the GUI code of the solver
- fine-tune the line solver algorithm
- maybe adapt a Radon transformation to find lines faster (this gives me headaches already since you need to solve an analytical form of the line model)
- add support for other shapes
- add support to avoid strings over concave areas
- load paths from
svg
files or other formats
- better GUI
- add project saving in the form of a
json
file - add functionality to do the merging of the GCode files in the GUI
- (far future) package every release in an
exe
file, so that non-python people have it easier