On 16.03.18 08:40, KatolaZ wrote:
> On Thu, Mar 15, 2018 at 06:41:50PM -0600, Nelson H. F. Beebe wrote:
> > In PostScript, I don't readily find any built-in operators that could
> > give a result that differs on every run, so you probably have to
>
> [cut]
>
> Yes, that's the problem. And that, AFAIK, you don't have a way to read
> anything outside of the current file in PS. I hope I could be proven
> wrong, since I'd really love a rw.ps ;)
Hi KatolaZ, there's:
file string readline substring bool
--------
which reads a line (terminated by a newline) from file and stores the
characters into string. bool is false if EOF was encountered before the
newline.
and:
file string readhexstring substring bool
-------------
which reads hexadecimal (A-F) characters, interpreting character pairs
as 8 bit integers (0-255).
and:
file string readstring substring bool
----------
which reads characters from file into string until it has been filled or
EOF is encountered.
They're all described in Adobe's "Postscript Language Reference, third
edition" My copy's 19 years old now, so there may be something more
recent.
Though I've drawn up the 8 drawings of my house plans in a bit over 800
lines of manual postscript: plan, elevations, sections, and site plan,
I've not had to resort to the above commands. (Well, sorta manual
postscript - building a bunch of functions to draw windows, doors, smoke
detectors, and wall sections with a rotation spec, etc., made the work
ever less manual. (The local government planning department is happy
with the drawings, but I still need a building surveyor to sign off on
the design. I'll need the money saved on architects for the extra stuff
the fire authority wants.)
When a row of 14 solar panels can be drawn on the roof with one line:
14 { 1650 500 box 70 0 rmoveto } repeat stroke % PV panels (one row)
it's not bad at all. (The narrow width is due to roof angle.)
Erik
_______________________________________________
Dng mailing list
[email protected]
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng