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.
Page Index Toggle Pages: 1
about vector (Read 1030 times)
about vector
May 17th, 2008, 2:26am
 
Hi everybody, I was wondering if anyone have some ideas to import, read and use x/y/z positions of a vector file ?

Re: about vector
Reply #1 - May 17th, 2008, 4:32am
 
what source material would that be that hosts your 3d vectors an .obj file then you can check the objLoader library.
Re: about vector
Reply #2 - May 17th, 2008, 1:14pm
 
I can provide models in dwg, obj, stl, 3ds, sat, so yes I will try the objloader library, thanks. But can I really read each points of the model and use them with the objloader library?

The first step for me would be doing this in 2D: importing a vector file (ai, dwg, dxf or whatever) and READING each point(x/y) of the drawing to re-use these informations to make some transformations on the drawing, or to make a calculator who can transform the geometrical informations (x/y) into motors informations (with arduino for example).

So my question is can I read the coordinates of a vector drawing already done with another software (autocad, solidworks, illustrator..)?
Re: about vector
Reply #3 - May 21st, 2008, 10:21pm
 
Answer is in sojamo's useful link.

Quote:
This library contains a class for loading/rendering a .OBJ file (OBJModel) and a class for accessing each vertex (Vertex) which can be primarily used to addressing vertexes in the model file and transform it.
Re: about vector
Reply #4 - May 21st, 2008, 10:39pm
 
Vertexes in OBJ formats is like this: (ASCII Format)
Code:

o object_name_example
v 525 200 -375
v 525 200 -475
v 625 200 -475
v 625 200 -375
v 525 200 -575
v 625 200 -575

The OBJLoader is working very well. If you only need paths or 2D shapes (no Curves, no Solids, no complex Textures) , OBJ format should be basic enough to help you to do this.
Page Index Toggle Pages: 1