]> git.draconx.ca Git - slotifier.git/commit
Fix radius/diameter confusion in overlap search.
authorNick Bowler <nbowler@draconx.ca>
Wed, 14 Apr 2021 00:32:16 +0000 (20:32 -0400)
committerNick Bowler <nbowler@draconx.ca>
Wed, 14 Apr 2021 00:32:16 +0000 (20:32 -0400)
commit5c9f3276505a9cbe000842401cbf7dd132b48ccb
tree01ee38d97fcee2ac54ea3273a199b1f0ee91c7fc
parent4e70965948424923dcf71edd99c08cc83c9daedb
Fix radius/diameter confusion in overlap search.

Drill sizes are specified as hole diameter, but the nearest neighbour
search is performed by distance.

The overlap relation is documented as "when the centre of one hole is
inside the other hole" which implies that we should be searching on
hole radius.  Presently the diameter is used, which is twice as far
as expected.

For holes that are the same size this is a minor technicality: such
holes that are apart by less than the hole diameter do "overlap" in
the drilled portion.  But when a small hole is near a large hole they
can be obviously disjoint yet slotifier can erroneously merge them.

Adjust the search to half the diameter, plus some slop (5 tenths)
so that holes exactly on the boundary are counted as overlapping.
NEWS
src/slotifier.c
tests/simple.at