From 5167649b9a36a84ea452187e2015167bc5b7859c Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 26 Oct 2025 15:36:15 -0500 Subject: [PATCH] Updated Marlin shapers --- InputShaping.py | 26 +++++++++++++++++++++----- README.md | 8 ++++---- 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/InputShaping.py b/InputShaping.py index fdfdf6d..069e397 100644 --- a/InputShaping.py +++ b/InputShaping.py @@ -21,7 +21,10 @@ def getSettingDataString(self): "type": "enum", "options": { "is": "M593 (ZV Input Shaping)", - "ftm": "M493 (Fixed-Time Motion)" + "ftm": "M493 (Fixed-Time Motion)", + "oldis": "Beta M593 (ZV Input Shaping)", + "oldftm": "Beta M493 (Fixed-Time Motion)", + "voldftm": "Alpha M493 (Fixed-Time Motion)" }, "default_value": "is" }, @@ -55,13 +58,26 @@ def execute(self, data): elif line.startswith(';LAYER:'): layer = float(line.strip(';LAYER:')) hz = 0 if layer < 2 else start_hz + (end_hz-start_hz) * (layer - 2) / (max_layer-3) - if gc == 'ftm': - if layer == 0: - lines[j] += '\n;TYPE:INPUTSHAPING\nM493 S11 D0 ;Enable ZVD Input Shaping' + if layer == 0: + params = "" + if gc == 'voldftm': + params = "S11" + else if gc == 'oldftm': + params = "S1 X11 Y11" + else if gc == 'ftm': + params = "S1 XY C11" + if params: + lines[j] += '\n;TYPE:INPUTSHAPING\nM493 %s D0 ;Enable ZVD Input Shaping' % params + + if gc in ('oldftm','voldftm'): lines[j] += '\n;TYPE:INPUTSHAPING\nM493 A%f ;(Hz) X Input Shaping Test' % hz lines[j] += '\nM493 B%f ;(Hz) Y Input Shaping Test' % hz - if gc == 'is': + else if gc == 'ftm': + lines[j] += '\n;TYPE:INPUTSHAPING\nM493 XY A%f ;(Hz) XY Input Shaping Test' % hz + else if gc == 'oldis': lines[j] += '\n;TYPE:INPUTSHAPING\nM593 F%f ;(Hz) Input Shaping Test' % hz + else if gc == 'is': + lines[j] += '\n;TYPE:INPUTSHAPING\nM593 XY F%f ;(Hz) Input Shaping Test' % hz data[i] = '\n'.join(lines) return data diff --git a/README.md b/README.md index 0b9b216..7e44e43 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # cura-ringing-tower-script -Cura implementation of custom layer change G-code macro used in slicing *ringing tower STL* for M593 (https://marlinfw.org/docs/gcode/M593.html) or M493 (https://marlinfw.org/docs/gcode/M493.html) based input shaping. +Cura implementation of custom layer change G-code macro used in slicing [Ringing Tower STL](//marlinfw.org/assets/stl/ringing_tower.stl) for [M593](//marlinfw.org/docs/gcode/M593.html) or [M493](//marlinfw.org/docs/gcode/M493.html) based input shaping. Use the script with Post Processing Plugin on Cura Marketplace. -Copy .py file into your cura directory as follows: -* (windows) C:\Users\\*username*\AppData\Roaming\cura\\*version*\scripts -* (mac) /Users/*username*/Library/Application Support/cura/*version*/scripts +Copy the `InputShaping.py` file into your cura directory as follows: +* (Windows) `C:\Users\{USERNAME}\AppData\Roaming\cura\{VERSION}\scripts` +* (Mac) `/Users/{USERNAME}/Library/Application Support/cura/{VERSION}/scripts` # Available settings 1. Motion planning type (M593 or M493)