I've wanted to be able to print or draw images on surfaces like boxes, books, glass and such, so i designed this pen holder for my prusa mk3.
It prints without supports, 0.2 layer height, 20% infill (basic fast settings for PLA on Slic3r PE)
It clips on the extruder fan, can be removed easily and don't crash on the Z axis rods when the printer is homing.
To secure the pen, you can use two m3 screw and bolt, from the spare parts bag if you built your printer from kit (idk if there are spare parts on the premade one).
To allow the tip of the pen to make contact with the surface, with some Z tolerance, put a rubber band as shown on the picture.
I also provide my Slic3r PE settings in the .ini file.
The point of using Slic3r for this instead of other tools (like PATH to GCODE in Inkscape) is to make advantage of the infill algorythms the slicer provides, depending of the thickness of the pen.
CAUTION! the GCODE for bed mesh leveling is supposed to be deleted from the setting, but be sure to double check! You don't want a pen grinding on your heatbed.
ALWAYS manually set the Z hop in printer settings, depending on how far from the bed you do want to print, and how long is the pen
ALSO if you want to print on a volume (book, box...) make sure you disable the auto home, and set the XYZ manually with any software tool (I use Octoprint for that). And do not forget to secure the target surface on the bed so it does not move while the printer draws.