aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/gcode_arcs.py
Commit message (Collapse)AuthorAgeFilesLines
* Run black on all first party python codeTomasz Kramkowski2025-08-061-32/+47
|
* gcode_arc: merge coords gen & G1 emitTimofey Titovets2024-08-121-28/+28
| | | | | | | Chopping lines from arc can take significant time. Merge cycles to make the event loop progress and optimize performance. Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
* gcode_arc: refactor simplifyTimofey Titovets2024-08-121-20/+22
| | | | Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
* gcode_arcs: Allow either one of I, J, K to be default-zero on G2/G3 (#5939)maze2022-12-141-1/+1
| | | Signed-off-by: Wijnand Modderman-Lenstra <maze@pyth0n.org>
* gcode_arcs: No need to import gcode module to access Coord()Kevin O'Connor2022-12-111-6/+8
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode_arcs: support XY, XZ and YZ planesAndrew Mirsky2022-12-111-28/+73
| | | | | | | add G17, G18 and G19 commands to select arc planes enhance G2/G3 to support arc moves in XY, XZ and YZ planes Signed-off-by: Andrew Mirsky <andrew@mirsky.net>
* gcode_arcs: detect CW / CCW move with renamed G2/G3 command (#5096)Nick Douma2022-01-221-2/+7
| | | | | The G2 / G3 command might be renamed using `gcode_macro` + `rename_existing`. This change allow detecting clockwise / anti-clockwise moves when the command gets renamed. Signed-off-by: Nick Douma <n.douma@nekoconeko.nl>
* gcode_move: Move GCodeMove class from gcode.py to new extras moduleKevin O'Connor2020-08-201-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode: Split G0/G1 command handling to new gcode_move classKevin O'Connor2020-08-201-3/+4
| | | | | | | | Split up the main GCodeParser class into GCodeDispatch and GCodeMove classes. The GCodeMove class is now available using the "gcode_move" printer object name. This split simplifies the gcode.py code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode_arcs: increment absolute e coord for each arc segment (#3162)Toby Harper2020-08-071-0/+2
| | | | | | | Arc travel was working but extrusion in absolute mode seemed not to be happening at all. This was because the E coord being sent with each G1 segment of the arc was not incrementing, effectively the same value was being sent over and over so the total extrusion for the whole arc was the amount for just one segment which is an extremely tiny amount. My change increments e_base by e_per_move for each subsequent coord when in absolute extrude mode which results in the correct absolute E value being sent for each segment. Signed-off-by: Toby Harper <toby@fuith.org>
* gcode_arcs: Add back in support for E moves in absolute extrude modeKevin O'Connor2020-06-041-4/+7
| | | | | | | | | | | | This reverts commit 43fa41c1af648ea626040e17f0eebda39dcdb2cb. The above commit disabled absolute extrude moves because it was unclear if the code would work properly when an M221 extrude factor or G92 offset was in use. However, since the calculation is done relative to the raw E position and is sent as a raw E position to gcode.cmd_G1() these modes should not matter. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode: Make it clear that gcode.get_status() can be called without eventtimeKevin O'Connor2020-05-261-1/+1
| | | | | | | Make it clear that gcode.get_status() to be called without an eventtime by defaulting eventtime=None. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode_arcs: Use new GCodeCommand wrappersKevin O'Connor2020-05-051-13/+13
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode: Create new wrapper class for gcode command parametersKevin O'Connor2020-05-051-1/+2
| | | | | | | | Instead of passing a dictionary to the command handlers, create a wrapper class and pass that class to the command handlers. This can simplify the command handler code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode_arcs: Disable E moves in absolute extrude modeKevin O'Connor2020-04-231-7/+4
| | | | | | | | Commit 402110f6 didn't actually fix absolute extrude mode. For now, report an error if an extrude move is requested in absolute extrude mode. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode_arcs: Minor cleanup of planArc()Kevin O'Connor2020-04-221-42/+27
| | | | | | | | Fix linear_travel optimization. Use "2*pi" instead of "radians(360)". Always emit at least one segment and always end at the final target coordinates. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode_arcs: Fix Z moves and E movesKevin O'Connor2020-04-221-10/+16
| | | | | | | | Fix Z moves so that the movement is spaced out among the arc movements. Fix extrude moves when in absolute extrude mode. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode_arcs: Simplify parameter parsingKevin O'Connor2020-04-221-84/+37
| | | | | | | | | | Use the normal gcode.get_float() mechanism for extracting parameters from the g-code command. Don't register descriptions for the G2/G3 commands as the convention is to only use descriptions for "extended g-code commands". Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode_arcs: use correct current position from gcodeDaniel Kucera2019-12-181-1/+1
| | | | Signed-off-by: Daniel Kucera <github@danman.eu>
* gcode_arcs: Use is operator for Null comparison (#1989)Piotr Usewicz2019-09-231-1/+1
| | | Signed-off-by: Piotr Usewicz <piotr@layer22.com>
* gcode_arcs: Remove unused variables (#1988)Piotr Usewicz2019-09-231-4/+0
| | | Signed-off-by: Piotr Usewicz <piotr@layer22.com>
* gcode_arcs: use z-height defined in f2/3 code, if presentachmed202019-09-181-4/+3
| | | Signed-off-by: Aleksej Vasiljkovic <achmed21@gmail.com>
* gcode_arcs: Add support for G2/G3 commandsAleksej Vasiljkovic2019-09-131-0/+186
R Still missing, also might be somewhat dirty since code is converted into G1 commands. Signed-off-by: Aleksej Vasiljkovic <achmed21@gmail.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>