]> git.draconx.ca Git - slotifier.git/blob - README.md
Trivial manual fixes.
[slotifier.git] / README.md
1 Slotifier is a simple program which takes an Excellon drill file input,
2 searches for overlapping drill hits, and generates a new drill file with
3 those hits converted to a single slot (G85 entry in the drill file).
4
5 This is useful when using a design tool which does not generate such slots
6 directly, but you require this format for fabrication.  By incorporating
7 slotifier into your workflow, you can design using overlapping drill hits
8 and convert them into "real" slots before fabrication.
9
10 The types of slots that can be produced with this tool are limited: they must
11 be straight lines and must have the same thickness throughout.  Slotifier uses
12 a simple heuristic to convert holes to slots, and might behave unexpectedly if
13 drill hits overlap in complex ways, see below.
14
15 # Prerequisites
16
17 Slotifier is written in C, so a working C compiler is required.
18
19 The [libgerbv library][gerbv-homepage] is used to process the Excellon drill
20 file format.  It must be a sufficiently recent version with support for G85
21 slots: the first version to support such slots is included with gerbv 2.7.
22
23 Furthermore, slotifier requires the [CNearTree library][neartree-homepage]
24 in order to compute the overlap relation between holes.
25
26 Optionally, in order to support localized program messages the [GNU libintl
27 library][gettext-homepage] (included with the GNU C library) is required.
28
29 [gerbv-homepage]: http://gerbv.geda-project.org/
30 [neartree-homepage]: http://neartree.sourceforge.net/
31 [gettext-homepage]: https://www.gnu.org/software/gettext/
32
33 # Theory of operation
34
35 Slotifier works by locating groups of drill hits which are considered
36 mergeable.  Two holes are considered to _overlap_ if and only if the centre of
37 either hole is positioned within the other hole, and the transitive closure of
38 this overlap relation gives the _mergeable_ relation.  Thus, holes A and B
39 are mergeable if there is some sequence of overlapping holes, starting from
40 A, which leads to B.
41
42 The mergeable property is an equivalence relation on the holes, so the holes
43 can be partitioned into equivalence classes.  Every such class with more than
44 one hole in it is then converted into a slot as follows:
45
46 * Two holes are chosen from the class such that the straight-line distance
47   between their centres is maximized.  These two centres are used as the
48   endpoints of the slot.
49
50 * The tool with the greatest diameter from all the holes in the class is used
51   as the tool for the slot.
52
53 In either case, it is unspecified which option is chosen when there is more
54 than one maximum.
55
56 For best results, the designer should ensure that mergeable holes form an
57 approximate straight line and use the same tools.
58
59 # Contributing
60
61 Please send suggestions, bug reports, patches or any other
62 correspondence regarding slotifier by electronic mail to
63 [Nick Bowler \<nbowler@draconx.ca\>][email].
64
65 [email]: mailto:nbowler@draconx.ca
66
67 # License
68
69 Slotifier is free software: you can redistribute it and/or modify it under
70 the terms of the GNU General Public License as published by the Free Software
71 Foundation, either version 3 of the License or (at your option) any later
72 version.
73
74 {::comment}
75 Copyright © 2019, 2021 Nick Bowler
76 {:/comment}