Find's Treasure Forums

Welcome to Find's Treasure Forums, Guests!

You are viewing this forums as a guest which limits you to read only status.

Only registered members may post stories, questions, classifieds, reply to other posts, contact other members using built in messaging and use many other features found on these forums.

Why not register and join us today? It's free! (We don't share your email addresses with anyone.) We keep email addresses of our users to protect them and others from bad people posting things they shouldn't.

Click here to register!



Need Support Help?

Cannot log in?, click here to have new password emailed to you

Postscript code for PCB coils

A

Anonymous

Guest
If anyone wants to try one for themselves :-
%! PCB Coil program Nick Fisher 5/7/2002
% default unit for postscript is a point: 1/72 of an inch
% these functions let you use inch and mm for dimensions
% you must add "mm" or "inch" after the number though
% see for example radius definition
/inch { 72 mul } def
/mm { 2.8346 mul } def
% coil specs
/trackwidth 1 def
/turns 30 def
/spacing 2 def
/radius 100 mm def
/centrex radius 22 add def
/centrey radius 22 add def
/centrey1 centrey spacing 2 div add def
% fills to save etching too much copper
0 setgray
0 0 moveto
0 centrey 2 mul lineto
centrex 2 mul centrey 2 mul lineto
centrex 2 mul 0 lineto
closepath
fill
1 setgray
centrex centrey centrex 0 360 arc
fill
0 setgray
centrex centrey radius turns spacing mul 22 add sub 0 360 arc
fill
trackwidth setlinewidth
% pads
centrex centrey radius spacing 2 div add sub trackwidth 0 360 arc
stroke
centrex centrey radius spacing turns 1.5 add mul sub sub trackwidth 0 360 arc
stroke
%the coil
0 1 turns
{
/turn exch def
centrex centrey radius turn spacing mul sub 270 90 arc
centrex centrey1 radius turn 0.5 add spacing mul sub 90 270 arc
}
for
stroke
showpage
% the end
 
Top