On the programming side, Andrea is working on the communication with the motors. I'll be working on the step before that which is figure out in what position the machine has to move. My software tool is vvvv. The process will be : I calcolate the cordinates from an image or vector file and then export a text file.
The idea is to abstract the coding as mush as possible. So I'll send Andreas preset words e.g. "pick;w" "place;10,20"
Here's the workflow I made
PICK & PLACE workflow 1. pick(white or black) - go to white or black : (x,y) - go down (servo) - suck (z) - go up (servo) 2. place(x,y) - go to draw point (x,y) - go down (servo) - blow (z) - go up (servo) LDD workflow 1.go(x,y) - go to first draw position (x,y) 2.draw [(x1,y1),(x2,y2),....] - go down (servo) - pump (z)... - draw (x1,y1),(x2,y2),.... 3.pause - go up (servo) - pump back (z)
1.1
1.2
1.3
1.4
Syntax :
pick;color place; x,y
2.1 for a closed form, there is no problem. I can easily get x,y positions of each points and export them directly.
2.2 beautiful things happen when it is not a continuous closed lines.. I'll need to modify the coordinates before export them. The problem is how ! Then I notice that in "getPath" node, it also outputs "path type" and seems like here's the secret
Path Type meaning 0 = I'm the first 1 = there's someone before me 129 = I close a shapealso some references here
2.3 it took me quite some hours to figure out how to get and insert the right values..
2.4 but the outcome is satisfying ! :)
2.5 now the whole process is complete
2.6 one problem remains is when I import a circle. By default there are too many points to form a circle
then I discovered that our fantastic vvvv has already an option to solve this. it's "max flatten error" value. So I incremented it from 0.25 to 6.00
Syntax :
go;x,y draw;x,y draw;x,y ... pause;
Distance
3.1 Fill color there is a request from Ernesto which is a really good idea: implement the "fill" options.
3.2 Get connected I want to make it accessible from the internet.. Wouldn't it be nice if there is an onine interface where you can upload your image and connect to our printer ?
Download files zip folder contains patches, media, exported csv. to be used with vvvv_45beta34.2_x86
- space is important. You should indent your code with four spaces. - Whitespace seperates statements - The # sign is for comments - for multi-line comments, you can include the whole block in a set of triple quotation marks - Exponentiation use ** 2 to the power to 3 (2^3) - modulo returns the remainder from a division. So, if you type 3 % 2, it will return 1 - Strings need to be within quotes. - use backlash \ to solve problem with apostrophe - Each character in a string is assigned a number. This number is called the index. use [] to access the index - String methods : len() gets length of a string. len(string). lower()to get rid of all the capitalization. "String".upper( - Methods that use dot notation only work with strings. On the other hand, len() and str() can work on other data types.