🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #8866

Re: Postscript idiot needed help (and got it)

#8866
From: Jeff Bevis
Date: Sun, 04 Feb 1990 01:47
55 lines
3006 bytes
In article <17807@rpp386.cactus.org>, woody@rpp386.cactus.org (Woodrow Baker) writes:
>In article <9001290016.AA23487@en.ecn.purdue.edu>, bevis@EE.ECN.PURDUE.EDU (Jeff Bevis) writes:
>> I need to create postscript files for use in generating PC board artwork.
>> Unfortunately, I don't know postscript (yet), and the local libraries' books
>> are out... Soo... I hope some kind soul out there might help me.  I need
>
>Don Lancaster, 602-428-4073 has a rather complete schematic drawing package
>already coded up in Postscript.  I think the price is fairly reasonable, and
>can save you an imense amount of work.
>I have never been sucessful getting 'r' to work from within readnews
>Cheers
>Woody

Thanks to you, and everyone else who replied... I have seen Lancaster's stuff
and it seems OK.  However, I decided to go with the brute-force method of
getting things done.  I bought the famed "red and blue" books and started
writing my own layout software for the Amiga computer.  I've already got the
program up and running thanks to the Amiga's graphic-oriented programming
environment...  The postscript stuff looks to be pretty do-able, but I
haven't yet gotten the knack of passing arguments to procedures.  Example:
I want to creat a 'donut' pad on the pcb image;  I call the 'donut'
procedure by placing the x,y of the donut on the stack, followed by the
outer radius (black filled circle) and then the inner radius (white filled
circle, concentric with first)....

	x y rout rin donut

You see, I need to know the (x,y) coord twice;  first for the large black
circle, and second for the inner white one (the hole). 

How should I construct the donut procedure to avoid having to save all the
arguments in variables?  Is that my only hope?  Here's more code:

/black {0 setgray} def
/white {1 setgray} def

/donut
 { /rad1 exch def	% puke-O 
   /rad2 exch def	% save all the arguments
   /yval exch def	% in variables
   /xval exch def	

   black xval yval rad2 0 360 arc fill	% draw black circle
   white xval yval rad1 0 360 arc fill	% then white one on top
 } def

First of all, is this legitimate?  Will it work?  (haven't tried yet...)
How would the guru's out there optimize/improve it? 

Thanks again.  With help, I may actually be learning this. :-)


-------------------------------------------------------------------------------
Jeff Bevis		     Purdue Univeristy School of Electrical Engineering
bevis@en.ecn.purdue.edu	  	   	       Give me Amiga or nothing at all. 
Technical Details
Message-ID: <9002040147.AA16999@en.ecn.purdue.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!decwrl!ucbvax!EE.ECN.PURDUE.EDU!bevis
References: <17807@rpp386.cactus.org>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!decwrl!ucbvax!EE.ECN.PURDUE.EDU!bevis
From: bevis@EE.ECN.PURDUE.EDU (Jeff Bevis)
Newsgroups: comp.lang.postscript
Subject: Re: Postscript idiot needed help (and got it)
Message-ID: <9002040147.AA16999@en.ecn.purdue.edu>
Date: 4 Feb 90 01:47:36 GMT
References: <17807@rpp386.cactus.org>
Sender: daemon@ucbvax.BERKELEY.EDU
Organization: Purdue University Engineering Computer Network
Lines: 55