Optimized planner re-write. Significantly faster. Full arc support enabled by rotation matrix approach.

- Significant improvements in the planner. Removed or reordered
repetitive and expensive calculations by order of importance:
recalculating unchanged blocks, trig functions [sin(), cos(), tan()],
sqrt(), divides, and multiplications. Blocks long enough for nominal
speed to be guaranteed to be reached ignored by planner. Done by
introducing two uint8_t flags per block. Reduced computational overhead
by an order of magnitude.   - Arc motion generation completely
re-written and optimized. Now runs with acceleration planner. Removed
all but one trig function (atan2) from initialization. Streamlined
computations. Segment target locations generated by vector
transformation and small angle approximation. Arc path correction
implemented for accumulated error of approximation and single precision
calculation of Arduino. Bug fix in message passing.
This commit is contained in:
Sonny J
2011-09-06 19:39:14 -06:00
parent d75ad82e49
commit ffcc3470a3
10 changed files with 274 additions and 179 deletions

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
"""\
G-code preprocessor for grbl
G-code preprocessor for grbl (BETA!)
- Converts G02/03 arcs to G01 linear interpolations
- Removes comments, block delete characters, and line numbers
- Removes spaces and capitalizes commands
@ -16,6 +16,7 @@ TODO:
Based on GRBL 0.7b source code by Simen Svale Skogsrud
By: Sungeun (Sonny) Jeon
Version: 20100825
"""
import re