Since the HAED pattern symbols are just text (using a font made up of symbols), I can easily copy and paste right out of the PDF into a text file, and analyze that with my traveling salesman program. It's easy enough to copy each page one by one, but since I'm doing rows across pages for this one, I didn't want to take the time to copy the pages row by row into a text file.
So I wrote a quick PowerShell program to grab the rows from each page, and stick them together so that
1 1 1 |
2 2 2 |
3 3 3 |
1 2 3 |
1 2 3 |
1 2 3 |
Here's an example output from the traveling salesman program btw (this is the current colour I'm working on up above):
It separates out all the stitches by colour, then plots a (close enough) optimal route through them.
I really need to get around to making the start and end stitch a different colour. Not that it's hard or time consuming, I just have to remember to do it when I'm at the computer and have time.
No comments:
Post a Comment