It was deemed that scipy is too heavy a requirement for FreeCAD just for
this little feature. Fortunately it was possible to extract the k-d tree
module from scipy with just minor modifications - it is quite
self-contained.
Now, only numpy is required.
- "Cancel" now restores the original values as it should.
- The various mutually exclusive uses of UseStartDepth, UseFinalDepth
and ThroughDepth are now reflected in the GUI by grayed-out components
The safe Z value was calculated with respect to the current hole, but
the tool should better be always retracted to the safe Z value with
respect to the first hole of a series of holes.
Another fix concerns the detection of holes-within-holes, previously it
was assumed that there the centers must align perfectly, this seems to
be the case only up to some numerical precision. Fixed by just allowing
any hole that is wholly contained in the first hole, even it is not
centered.
These were previously only applied for the first and last operation,
respectively. Now whole operations can be skipped if they are completely
outside the specified range.