-
Notifications
You must be signed in to change notification settings - Fork 0
/
Parallella-PostScript.ps
77 lines (61 loc) · 1.66 KB
/
Parallella-PostScript.ps
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
%!PS-Adobe-2.0
%
% Parallella drill template
% Based on:
% http://www.parallella.org/docs/parallella_manual.pdf
%
% Can be converted from PS to PDF with https://ps2pdf.com/convert.cgi
%
% By udi Finkelstein
%
% General constants
/inch {72 mul} def
/mm {72 mul 25.4 div} def
% crosshair size in inch
/chs { 0.2 } def
% drill size in inch
/chc { 0.138 } def
% draw crosshair
/crosshair {gsave translate newpath 0 0 chc 2 div inch 0 360 arc chs inch 2 div neg 0 moveto chs inch 0 rlineto stroke 0 chs inch 2 div neg moveto 0 chs inch rlineto stroke grestore} def
% draw a rectangle
/rect {newpath 0 0 moveto dup 0 exch rlineto exch dup 0 rlineto exch dup neg 0 exch rlineto exch neg 0 rlineto closepath stroke} def
%
% pcDuino3nano constants. Taken from the DXF file above, slightly larger than the board dimensions in the spec.
%
% Board length
/board_length {2.150 inch} def
% Board width
/board_width {3.4 inch} def
% Left down hole position from corner
/LD_X {0.125 inch} def
/LD_Y {0.125 inch} def
% Right down hole position from corner
/RD_X {LD_X} def
/RD_Y {LD_Y} def
% Left up hole position from corner
/LU_X {LD_X} def
/LU_Y {LD_Y} def
% Right up hole position from corner
/RU_X {RD_X} def
/RU_Y {RD_Y} def
%
% Print setup
%
% Set color to black
0 setgray
% Change line width here if needed
% 10 setlinewidth
% Change here the X/Y proportions if your printer can't accurately do 1:1 prints
1 1 scale
% location on page
1 inch 1 inch translate
%
% Start of print
%
% Disk drive rectangle
board_width board_length rect
% Draw 4 holes
LD_X LD_Y crosshair
board_width RD_X sub RD_Y crosshair
LU_X board_length LU_Y sub crosshair
board_width RU_X sub board_length RU_Y sub crosshair