-
Notifications
You must be signed in to change notification settings - Fork 0
/
SNP-Z07-PostScript.ps
81 lines (65 loc) · 1.97 KB
/
SNP-Z07-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
78
79
80
81
%!PS-Adobe-2.0
%
% SNP-Z07 power supply series drill template
% Based on:
% http://www.skynetpower.com.tw/pdf/SNP-Z07Series.pdf
% https://snp-z07.industrial.net/~media/Skynet%20SNP-Z07-Poewer%20Supply-1750035685-119337.pdf
% https://www.ineltro.ch/media/downloads/SAAItem/48/48832/97d2b83f-af4e-4df0-9989-96f6725de742.pdf
% etc.
% 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 {3 inch} def
% Board width
/board_width {5 inch} def
/hole_width {115.6 mm } def
/hole_length {64.8 mm} def
% Left down hole position from corner
/LD_X {5 mm } def
/LD_Y {5 mm } def
% Right down hole position from corner
/RD_X {board_width 5 mm sub hole_width sub} def
/RD_Y {LD_Y} def
% Left up hole position from corner
/LU_X {LD_X} def
/LU_Y {board_length 5 mm sub hole_length sub} def
% Right up hole position from corner
/RU_X {RD_X} def
/RU_Y {LU_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