Great, thanks for confirming that my company has a shitty system *lol*
At home, it seems to work too without issues, just the usual error80
b.t.w.: I like your modded print platform background
How to port a postprocessor to new cura
- Amedee
- Reactions:
- Posts: 599
- Joined: February 15th, 2016, 11:10 am
- Location: Brussels, Belgium
- 3D Printer(s): UMO / UMO+
- Contact:
Re: How to port a postprocessor to new cura
Yeah, I did that while experimenting the inheritance in the machine definitionsdrayson wrote:b.t.w.: I like your modded print platform background
- Amedee
- Reactions:
- Posts: 599
- Joined: February 15th, 2016, 11:10 am
- Location: Brussels, Belgium
- 3D Printer(s): UMO / UMO+
- Contact:
Re: How to port a postprocessor to new cura
Is there a commit tag which correspond to the 2.1.1 release, and if yes where?nallath wrote:Reporting it is always a good idea. If you have issues, report them on github. I'm the only Cura dev that reads this forum (and i'm very prone to forget things)
I am a bit lost in the sources...
I wanted to make a pull request for TWeakAtZ, but I can't find the version which is in 2.1.1 (5.0)
https://github.com/Ultimaker/Cura refers to https://github.com/nallath/PostProcessingPlugin, but latest version there for the script is 4.9.94...
Re: How to port a postprocessor to new cura
https://github.com/nallath/PostProcessi ... n/tree/2.1 <- This is the linked branch for the 2.1 release.
- Amedee
- Reactions:
- Posts: 599
- Joined: February 15th, 2016, 11:10 am
- Location: Brussels, Belgium
- 3D Printer(s): UMO / UMO+
- Contact:
Re: How to port a postprocessor to new cura
But in that one, TweakAtZ.py is "4.9.94", and in the one I got with Cura 2.1.1 it is "5.0"!
Diff between 2.1 and 2.1.1 on my system:
So there is a more recent version 'somewhere'...
Diff between 2.1 and 2.1.1 on my system:
Code: Select all
$ diff -u Cura-2.1.0.app/Contents/Resources/cura/plugins/PostProcessingPlugin/scripts/TweakAtZ.py Cura.app/Contents/Resources/cura/plugins/PostProcessingPlugin/scripts/TweakAtZ.py
--- Cura-2.1.0.app/Contents/Resources/cura/plugins/PostProcessingPlugin/scripts/TweakAtZ.py 2016-04-13 01:35:12.000000000 +0200
+++ Cura.app/Contents/Resources/cura/plugins/PostProcessingPlugin/scripts/TweakAtZ.py 2016-05-19 15:47:08.000000000 +0200
@@ -28,6 +28,7 @@
##V4.9.92: Modifications for Cura 15.10
##V4.9.93: Minor bugfixes (input settings) / documentation
##V4.9.94: Bugfix Combobox-selection; remove logger
+##V5.0: Bugfix for fall back after one layer and doubled G0 commands when using print speed tweak, Initial version for Cura 2.x
## Uses -
## M220 S<factor in percent> - set speed factor override percentage
@@ -43,7 +44,7 @@
import re
class TweakAtZ(Script):
- version = "4.9.94"
+ version = "5.0"
def __init__(self):
super().__init__()
@@ -386,7 +387,7 @@
if ";Generated with Cura_SteamEngine" in line:
TWinstances += 1
modified_gcode += ";TweakAtZ instances: %d\n" % TWinstances
- if not ("M84" in line or "M25" in line or ("G1" in line and TweakPrintSpeed and state==3) or
+ if not ("M84" in line or "M25" in line or ("G1" in line and TweakPrintSpeed and (state==3 or state==4)) or
";TweakAtZ instances:" in line):
modified_gcode += line + "\n"
IsUM2 = ("FLAVOR:UltiGCode" in line) or IsUM2 #Flavor is UltiGCode!
@@ -441,9 +442,9 @@
y = self.getValue(line, "Y", None)
e = self.getValue(line, "E", None)
f = self.getValue(line, "F", None)
- if TweakPrintSpeed and state==3:
+ if 'G1' in line and TweakPrintSpeed and (state==3 or state==4):
# check for pure print movement in target range:
- if "G1" in line and x != None and y != None and f != None and e != None and newZ==z:
+ if x != None and y != None and f != None and e != None and newZ==z:
modified_gcode += "G1 F%d X%1.3f Y%1.3f E%1.5f\n" % (int(f/100.0*float(printspeed)),self.getValue(line,"X"),
self.getValue(line,"Y"),self.getValue(line,"E"))
else: #G1 command but not a print movement
@@ -508,4 +509,4 @@
modified_gcode += TweakStrings[key] % float(old[key])
data[index] = modified_gcode
index += 1
- return data
\ No newline at end of file
+ return data
- Amedee
- Reactions:
- Posts: 599
- Joined: February 15th, 2016, 11:10 am
- Location: Brussels, Belgium
- 3D Printer(s): UMO / UMO+
- Contact:
Re: How to port a postprocessor to new cura
I eventually found it there --> https://github.com/Dim3nsioneer/Cura-Plugins
Not sure how you manage your releases, but you should probably remove that script from your repo and point at it as a contrib script.
(And there is 5.0.1 which fixes my issues...)
Not sure how you manage your releases, but you should probably remove that script from your repo and point at it as a contrib script.
(And there is 5.0.1 which fixes my issues...)
Re: How to port a postprocessor to new cura
Yeah that's probably a better idea. Not sure if our script right now handles that correctly, but we should look into it.