The Citrine Citadel


Slotifier

Slotifier is a simple program which takes an Excellon drill file input, searches for overlapping drill hits, and generates a new drill file with those hits converted to a single slot (G85 entry in the drill file).

This is useful when using a design tool which does not generate such slots directly, but you require this format for fabrication. By incorporating slotifier into your workflow, you can design using overlapping drill hits and convert them into “real” slots before fabrication.

The types of slots that can be produced with this tool are limited: they must be straight lines and must have the same thickness throughout. Slotifier uses a simple heuristic to convert holes to slots, and might behave unexpectedly if drill hits overlap in complex ways, see below.

Obtaining Slotifier

All released files are available from the slotifier archive directory. The latest development sources may be browsed online or cloned directly using git, e.g.,

git clone https://git.draconx.ca/slotifier.git

The most recent release is version 1.2, released on 2021-04-26. Source code for this version is available in slotifier-1.2.tar.gz (signature). Noteworthy changes in this release:

Use the signature file to verify that the corresponding source bundle is intact. After downloading both files, if GnuPG is installed, the signature can be verified with a command like:

gpg --verify slotifier-1.2.tar.gz.sig slotifier-1.2.tar.gz

If the verification fails because you don’t have the required public key, that key can be imported with a command such as:

gpg --keyserver keys.draconx.ca --recv-keys 5B45D3D185B8E1F6

Then run the verify command again. Alternatively, you can download the public keyring manually and import it using gpg --import.

Prerequisites

Slotifier is written in C, so a working C compiler is required.

The libgerbv library is used to process the Excellon drill file format. It must be a sufficiently recent version with support for G85 slots: the first version to support such slots is included with gerbv 2.7.

Furthermore, slotifier requires the CNearTree library in order to compute the overlap relation between holes.

Optionally, in order to support localized program messages the GNU libintl library (included with the GNU C library) is required.

Theory of operation

Slotifier works by locating groups of drill hits which are considered mergeable. Two holes are considered to overlap if and only if the centre of either hole is positioned within the other hole, and the transitive closure of this overlap relation gives the mergeable relation. Thus, holes A and B are mergeable if there is some sequence of overlapping holes, starting from A, which leads to B.

The mergeable property is an equivalence relation on the holes, so the holes can be partitioned into equivalence classes. Every such class with more than one hole in it is then converted into a slot as follows:

In either case, it is unspecified which option is chosen when there is more than one maximum.

For best results, the designer should ensure that mergeable holes form an approximate straight line and use the same tools.

Contributing

Please send suggestions, bug reports, patches or any other correspondence regarding slotifier by electronic mail to Nick Bowler <nbowler@draconx.ca>.

License

Slotifier is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License or (at your option) any later version.