ThisIsNotRocketScience / GerberTools

Tools to load/edit/create/panelizer sets of gerber files
MIT License
720 stars 139 forks source link

Bugfix for bad "pacman" arc generation on breaktabs #116

Closed icegoaliepaul closed 3 years ago

icegoaliepaul commented 3 years ago

pacman

When generating the unit vector between the two arcs on breaktab generation if the arc centers share the same location then no line segment exists between them and a unit vector of (0.00,0.00) is generated. This results in bad end angles and therefore bad arcs. The fix for this is to use the line segment between start and end points instead in this special case.

This bug is mostly seen on horizontal breaktabs on rectangular boards spaced at 2mm (double the drillradius default of 1) but is suppressed in many cases due to floating point rounding errors giving slightly different centers.