May 26, 2019 at 10:27 am #101697
I’ve been working on plotter capabilities lately, and I’m ready to reveal my secret project:
While the finished product is in no way “better” than other rendering techniques, I find this approach really amusing because the entire purpose of ASCII art is to render graphics when only characters are available. On a plotter, of course graphics are native and characters require an extra step, so this is dumb… for fun.
For this I created a toolpath font by generating raster characters of the fixed-pitch “OCR-B” font, then performed centerline tracing using Autotrace (as a plugin for Inkscape). These would serve as my pen paths. The auto-generated paths are not that great so I heavily edited the paths manually to my liking.
I then wrote a program that parsed out the Bezier paths from the SVG file and split it into a few Bezier paths for each character. I can then generate g-code for any character at any size at any location by scaling and offsetting the coordinates and emitting G5 commands for Bezier curves. Marlin’s Bezier support is turned off by default so I had to turn on G5 in the firmware. Marlin’s implementation for G5 worked on the first try.
Now that I can generate arbitrary text, I had to select an image and render as characters. This is simply creating ASCII art. I ended up doing this conversion myself because I wanted an accurate brightness model for the particular font I was using, and because it’s not that hard.
The drawing itself it took about 4:40, and my phone died partway through filming.
All in all, it’s been a lot of work to render an image as text as pen strokes. But that was the point from the beginning.
Attachments:May 26, 2019 at 11:20 am #101706
Over The Top! Excellent.May 26, 2019 at 3:27 pm #101724
Just think, if it could write backwards, it could go twice as fast!May 26, 2019 at 4:22 pm #101726
Oh look! A pupper! So cute!
That is really cool. Well done. Building the machine, tuning and calibration. Then fixing the stuttering issue. Not to mention all the software side to get it to gcode that I don’t know how you did… anyway that was a lot of work for pupper. Well done indeed.July 12, 2019 at 4:44 pm #105975July 12, 2019 at 4:49 pm #105977
How large is the page you’re drawing on?July 12, 2019 at 4:54 pm #105978
i’ve spent fuckin 8 hours trying to F******figure this F******shit out becuase i want my F******dog in F******letters and well….F******I CANT F******FIGURE IT OUT NO MATTER F******WHAT I DO, I GET A F******DUMB F******WAVEY A** F******BLUR IN A BUNCH OF F******STUPID F******LETTERS. my mpcnc works great, but i just cant figure out how to insert ascii into fucking inkscape without text formatting and making it look like shit.
woo glad to ge tthat off my chest. angel-ascii
Is your dog’s name Bruno?July 12, 2019 at 5:08 pm #105979
I was going to upload some g-code for you but it’s rather big. But you can try this:
- Go here: https://vector76.github.io/gcode_tpgen/
- For Mode, select the “Text” radiobutton (last one)
- In the text box at the bottom of the form, copy-paste your text (don’t worry if it wraps lines, it knows where the true line endings are)
- Enter your page size for X extent and Y extent. For a 10″ (in X) by 7.5″ (in Y) drawing that fits comfortably on a US Letter size page, try X Extent of 254 and Y Extent of 191. It will stretch the text to fit these dimensions.
- Most of the other defaults for feed rates should be reasonable.
- Click generate, and it should let you download a gcode file.
To use the generated gcode file you must compile your firmware with G5 splines enabled!
If you have trouble I can try to answer specific questions.July 12, 2019 at 5:18 pm #105980
Actually, I think you have too much text for a page-size drawing. The characters will end up about 1mm in size, which probably won’t produce the output you want.
Generate your text again using a smaller image or somehow so you have maybe about 100 columns of text. Then follow the steps above.
When you generate the g-code, it will report the output pitch line-to-line and character-to-character, so you can judge if your pen is likely to make decent characters.July 12, 2019 at 6:05 pm #105982
LoL i really need someone to stop me from posting when I’ve been drinking. This is sometimes the dragon wins, im just in my garage. just ignore me.
You must be logged in to reply to this topic.