MaslowCNC / Firmware

Maslow Firmware
GNU General Public License v3.0
263 stars 134 forks source link

Replace G2/G3 line with equivalent G1 line #430

Closed blurfl closed 6 years ago

blurfl commented 6 years ago

The problem here is floating point precision, but it can be identified by looking at the height of the chord described by the G2/G3 command. Problematic commands have a chord that resolves to 0.01mm or less. This code trapps that situation and calls G1 instead using the endpoint. This turns an arc with less than 0.01mm of bow into a straight line. This is discussed in issue #426, and applies to the issue addressed in PR#428, replacing the code from that PR.

BarbourSmith commented 6 years ago

You are on 🔥 Way to take what was looking like an issue that would fall by the wayside as not frequent enough and tackle it completely!

blurfl commented 6 years ago

"But wait, there's more..." Do look at the most recent comment in Issue #426 ...

BarbourSmith commented 6 years ago

Hahha there always is! Do you want to add more changes in a new pull request or should I have left this one open?

blurfl commented 6 years ago

The flyspeck I mentioned is in both GC and the firmware. I guess we could treat it as a separate issue. I'll open one, which place to choose?

BarbourSmith commented 6 years ago

We could open issues in both places if we wanted, that way if we fix it in one place but not the other we would be able to note it

blurfl commented 6 years ago

Ok, I'll do that.