We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProcessing DevelopmentLibraries,  Tool Development › Import Adobe EPS to Processing
Page Index Toggle Pages: 1
Import Adobe EPS to Processing? (Read 2643 times)
Import Adobe EPS to Processing?
Oct 25th, 2005, 10:00pm
 
Hi all, especially Marius.

I just came across this page: http://processing.unlekker.net/BubblaTest/index.html and wondered if you will even finish this lib or spread out the alpha? I am pretty interesting in this thing...
Re: Import Adobe EPS to Processing?
Reply #1 - Oct 27th, 2005, 2:35pm
 
Hi there,

I did complete the code for a project (at the Nobel Peace Center, no less), but I never turned it into a Processing library. I wrote it pre-BETA, so it would have been difficult back then anyway.

I'll have a look at it and see how hard it would be to complete.

Ben, if you're reading this: Are there any plans to standardize data structures for PostScript-style paths or Illustrator style DOMs?
Re: Import Adobe EPS to Processing?
Reply #2 - Oct 28th, 2005, 8:20am
 
There are a few initiatives at present to get a 2D vector file format importing into Processing. I think it's an essential addition. Michael Chang has been working on an SVG loader for the longest time and I think has the code working, but not as a library. Christian Riekoff has just completed the SVG exporter and may be looking into an importer. And there is Marius' code for Illustrator EPS. As a priority for people with little time, I think SVG makes the most sense because you can write these files from Illustrator and many other programs.
Re: Import Adobe EPS to Processing?
Reply #3 - Nov 18th, 2005, 1:39am
 
Hello,
I was also looking for the best way to import some vector files in Processing. At least, I want to draw some specific shape I make in Illustrator.
Recently, I developped something in AppleScript to make this possible. I use Applescript to extract every parameters from a path in Illustrator. Then, applescript create a function script, compatible with processing, and put it in the pasteboard. You just have to paste the function somewhere in your sketch and feed the parameters. Here is an example of the function automaticly produced :

void figureBezier (float PosX, float PosY, float echelleX, float echelleY) {
 pushMatrix();
 scale (echelleX, echelleY);
 PosX = PosX/echelleX;
 PosY = PosY/echelleY;
 translate(0,-height);
 beginShape();
 vertex(PosX+(-69), PosY+(height + (-116)));
 vertex(PosX+(-63), PosY+(height + (-46)));
 bezierVertex(PosX+(-63), PosY+(height + (-46)), PosX+(-122), PosY+(height + (-33)), PosX+(-106), PosY+(height + (4)));
 bezierVertex(PosX+(-90), PosY+(height + (40)), PosX+(-45), PosY+(height + (37)), PosX+(-45), PosY+(height + (37)));
 vertex(PosX+(-22), PosY+(height + (118)));
 bezierVertex(PosX+(-22), PosY+(height + (118)), PosX+(-24), PosY+(height + (26)), PosX+(7), PosY+(height + (0)));
 bezierVertex(PosX+(38), PosY+(height + (-25)), PosX+(109), PosY+(height + (61)), PosX+(109), PosY+(height + (61)));
 vertex(PosX+(51), PosY+(height + (-52)));
 bezierVertex(PosX+(51), PosY+(height + (-52)), PosX+(85), PosY+(height + (-105)), PosX+(63), PosY+(height + (-116)));
 bezierVertex(PosX+(40), PosY+(height + (-127)), PosX+(-7), PosY+(height + (-87)), PosX+(-7), PosY+(height + (-87)));
 vertex(PosX+(-7), PosY+(height + (-87)));
 vertex(PosX+(-69), PosY+(height + (-116)));
 endShape();
 popMatrix();
}

Here is the URL to download the AppleScript file.
http://www.computerarts.ca/_files/_temp/vector_illustrator.scpt.zip

Of course, it only works on Mac. But I know it is possible to use Visual Basic and Illustrator about the same way on PC. But this reflect my rudimentary knowledge in programming, because i know understand that it is possible to developpe a Pen tools in Processing that will have the same behavior of the one I was used in Illustrator.

Thanks to Reas and Fry for their fantastic work. I realy enjoyed Processing and try to teach it to my student the best way I can.

JF (french speaking person).
Re: Import Adobe EPS to Processing?
Reply #4 - Nov 26th, 2005, 8:41am
 
JF: merci merci merci beaucoup!!!

This is a great workaround! Too bad it only works with a single, non-compound path. I will definitely be using this to finally get some curved edges into my projects!

Thanks again,

C
Re: Import Adobe EPS to Processing?
Reply #5 - Nov 26th, 2005, 1:30pm
 
Did you noticed that? http://processing.org/discourse/yabb_beta/YaBB.cgi?board=os_libraries_tools;action=display;num=1132462337;start=0#4

You can write your curves in .svg-Format and load 'em in Processing.
Page Index Toggle Pages: 1