Felipe Monteiro de Carvalho wrote:
On Wed, Apr 23, 2008 at 4:32 AM, Krishna <[EMAIL PROTECTED]> wrote:
Hmm... vague your mail is. What kinda interpretation? If all you want
is to slurp the text then it might be possible but then Postscript is
a full blown programming language and people (mostly) come up with
their own operators for showing text...
Ok, I think it's time to explain a little bit more in detail what I am
trying to do.
I am building a CNC Machine. It's like a 3D printer, it can cut into
wood and metal and build objects, or generate drawings (not with ink,
but through cutting) into existing objects.
The drawing will most likely come from CorelDraw. We are developing a
printer driver which will then use a ready made virtual printer which
is able to generate postscript as output, which will make our driver
very simple to build. I could read the CorelDraw files directly, but
I'd rather not be stuck to 1 drawing software, and CorelDraw may
change their files in the future, but postscript is likely to remain
stable.
So at this point I need to convert postscript into Machine commands,
i.e. move to start position, start drilling, move X, Y, move again,
etc ... end.
I don't need to parse everything from postscript, just the absolute
minimum to extract the vectorial drawing coordinates, start point and
end point.
I am a little impressed that everyone says postscript is so complex,
so I'm reevaluating which path to go, but I do have a competent
software developer available to whom send the task, so the amount of
work isn't that much a problem =P (as long as it is doable by 1 person
in a couple of months)
Interpreting postcript is doable, but postscript contains way more info
than you need.
If it is just moveto and lineto you need, you may want to consider using
a HPGL plotter driver. HPGL is a textual "language" used for plotters.
It consists mostly of commands like: get pen, move to, line to (and a
few others I forgot)
Marc
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal