Avisos
Vaciar todo

Got rid of ringing/ghosting almost completely  

Página 2 / 3
  RSS
Milos V.
(@milos-v)
Prominent Member
Re: Got rid of ringing/ghosting almost completely

Hi,
I tried to use your sript, but can not make it running. Can you help with the guideline?
I did install perl, added to system path and even associated the extension with (working in Windows).
If I run it directly from Windows, it works (just error about non initialized variable with filename apears).
If I add it to Slic3r, nothing happes. No change in g-code (just the filename of the script).

Thank you.

Milos.

Respondido : 30/09/2018 8:48 pm
Hans2004
(@hans2004)
Active Member
Topic starter answered:
Re: Got rid of ringing/ghosting almost completely

I tried to use your sript, but can not make it running. Can you help with the guideline?
I did install perl, added to system path and even associated the extension with (working in Windows).
If I run it directly from Windows, it works (just error about non initialized variable with filename apears).
If I add it to Slic3r, nothing happes. No change in g-code (just the filename of the script).

Hi Milos,

I am sorry for the late answer. I have been abroad for work for the last few days and it is hard to get a stable internet connection out here.
As to why it does not work in Windows... I am not sure because I have been using Linux exclusively for the last 15 years.

You should be able to start the script from a command line however and have it work on a gcode file you created with Slic3r. It should look something like this:

perl.exe deghost.pl Name_of_the_gcode_file.gcode

Then the script will create a new file called: Name_of_the_gcode_file.PMOD.gcode

I hope this helps.

Respondido : 04/10/2018 10:20 pm
Milos V.
(@milos-v)
Prominent Member
Re: Got rid of ringing/ghosting almost completely

Hi,
thank you for answer.
I still did not make it running. The command prompt window shows and disapears in a second.
Tried also the script itself from windows command prompt providing just gcode file name as parametr, but it did not work well. I stopped after an hour. File was 3 GB. Only contained:

; generated by Slic3r Prusa Edition 1.41.0+win64 on 2018-09-30 at 21:18:55
18-09-30 at 21:18:55
018-09-30 at 21:18:55

The last line repated undefinitelly.

It seems, it does not like Windows.
I will try to debug, but no will now. Having another issue with extruder, which is now a bit more urgent 🙂

Milos.

Respondido : 09/10/2018 9:55 pm
Hans2004
(@hans2004)
Active Member
Topic starter answered:
Re: Got rid of ringing/ghosting almost completely

Ah, wait. I see it now. You must click enable "Verbose G-Code". My script uses the comments in the g-code to check if a move is a perimeter move. Without verbose g-code it does not work.

Respondido : 18/10/2018 6:40 pm
AbeFM
(@abefm)
Miembro
Re: Got rid of ringing/ghosting almost completely

That's reasonable, I have it on and mine's worked great.

I maintain an informal list of San Diego, CA 3D printing enthusiasts. PM me for details. If you include a contact email and I can add you to the informal mailing list.

Respondido : 19/10/2018 1:26 am
robert.s109
(@robert-s109)
New Member
Re: Got rid of ringing/ghosting almost completely

It's possible to run your perl script against G-Code generated by Cura or by Simplify3d ?
tks

Respondido : 07/02/2019 11:10 am
robert.s109
(@robert-s109)
New Member
Re: Got rid of ringing/ghosting almost completely

I did not make it running on Slic3r Prusa Edition 1.41.2+win64. "Verbose G-Code" is enabled
The File Only contained:

generated by Slic3r Prusa Edition 1.41.2+win64 on 2019-02-08 at 09:57:57
4 on 2019-02-08 at 09:57:57
n64 on 2019-02-08 at 09:57:57

The last line repated undefinitelly.

whats wrong ? 🙄

Respondido : 08/02/2019 10:22 am
Drake
(@drake-2)
Active Member
Re: Got rid of ringing/ghosting almost completely

I'm testing it out for myself and am having issues as well.
Prusa Slic3r apparently runs the post processing script, but there are no m205 or m400 instructions in the file.
Much less a renamed file.
Have i missed any dependencies for this?
Also, this is something that if functional, would be awesome to have integrated into Prusa Slic3r.

Respondido : 09/02/2019 1:05 am
Robin
(@robin-4)
Estimable Member
Re: Got rid of ringing/ghosting almost completely

Not sure if this relates to any of this but i changed a print and to a higher layer height to see what difference to print time was and see if it effected the print quality. What i noticed was no ghosting. all i did was change the layer height on a 0.2mm height setting to 0.3mm
Anyone know why the ghosting marks disappeared?

Respondido : 10/02/2019 12:00 am
Patrick McNamara
(@patrick-mcnamara)
Estimable Member
Re: Got rid of ringing/ghosting almost completely


Not sure if this relates to any of this but i changed a print and to a higher layer height to see what difference to print time was and see if it effected the print quality. What i noticed was no ghosting. all i did was change the layer height on a 0.2mm height setting to 0.3mm
Anyone know why the ghosting marks disappeared?

Since there are volumetric limits for the filament, moving from a 0.2mm layer to a 0.3mm layer is going to mean around 2x the amount of filament per unit area. For a completely round extrusion, it would be 2.25x. The means that to keep the flow of filament through the hot end at the same level, the printer moves the print head ~2x slower. Slowing down the print speed reduces ringing.

Respondido : 10/02/2019 6:09 am
toaf
 toaf
(@toaf)
Noble Member
Re: Got rid of ringing/ghosting almost completely



Not sure if this relates to any of this but i changed a print and to a higher layer height to see what difference to print time was and see if it effected the print quality. What i noticed was no ghosting. all i did was change the layer height on a 0.2mm height setting to 0.3mm
Anyone know why the ghosting marks disappeared?

Since there are volumetric limits for the filament, moving from a 0.2mm layer to a 0.3mm layer is going to mean around 2x the amount of filament per unit area. For a completely round extrusion, it would be 2.25x. The means that to keep the flow of filament through the hot end at the same level, the printer moves the print head ~2x slower. Slowing down the print speed reduces ringing.

always with the maths…. 😀

I have a Prusa,therefore I research.

Respondido : 10/02/2019 6:11 am
--
 --
(@)
Illustrious Member
Re: Got rid of ringing/ghosting almost completely

Off the cuff, but not actually doing the experiment; simply changing the layer height from 0.2 to 0.3 should do nothing to the print speed - and the slicer will simply ask the extruder for more material.

Only when the preset volumetric flow limit is reached will the slicer actually slow the print speed; but that's 15 cubic mm per second on my Slic3r PE install. Printing at the default 45 mm/s at 0.15mm, perimeters are using 2.6 mm^3/s. At 0.3mm, perimeters are only using 4.8 mm^3/s. No where near the slow down point.

Respondido : 10/02/2019 7:46 am
Patrick McNamara
(@patrick-mcnamara)
Estimable Member
Re: Got rid of ringing/ghosting almost completely


Off the cuff, but not actually doing the experiment; simply changing the layer height from 0.2 to 0.3 should do nothing to the print speed - and the slicer will simply ask the extruder for more material.

Only when the preset volumetric flow limit is reached will the slicer actually slow the print speed; but that's 15 cubic mm per second on my Slic3r PE install. Printing at the default 45 mm/s at 0.15mm, perimeters are using 2.6 mm^3/s. At 0.3mm, perimeters are only using 4.8 mm^3/s. No where near the slow down point.

Hmmm. Correct your are. The stock speed settings are such that volumetric limits shouldn't come into play, at least for perimeters. Might come into play for infill, but that shouldn't really impact visible print quality. Beats me, need more caffeine...

--SS

Respondido : 10/02/2019 4:27 pm
--
 --
(@)
Illustrious Member
Re: Got rid of ringing/ghosting almost completely

William, yeah - the two available Volumetric Flow max settings SHOULD come into play for infill, but they don't. Slic3r PE seems to - in some ways - ignore the max extrusion rate - or miscalculate. You need to do some extra tweaking to really limit extrusion rates. The only successful method I have found is to limit infill to well under 100 mm/s move speeds. Even 75 mm/s infill has left under-extruded gaps in material (good PLA - calculated vf under 8 mm^3/s).

By my tests, the Mk3 can barely print at a maximum 7.5 mm^3/s. With anything short of a 60W Volcano type nozzle, not sure the Mk3 can print at 100 mm/s in any situation; and the ability to print at 200 mm/s is certainly wasted under most circumstances. I haven't tried the copper heat exchanger yet - but perhaps that can improve print speeds a little; but the copper nozzle had little effect over brass.

But this has little to do with the issue of jerks making the belts ring with fast moves. What seems odd to me is that I get the same ringing on small micro-moves (sub millimeter) as I do on larger steps. At some level this seems counter intuitive ... but maybe it is expected.

Respondido : 10/02/2019 10:13 pm
Enverex
(@enverex)
Active Member
Re: Got rid of ringing/ghosting almost completely

This looks like a really interesting idea, but not having much luck running it. Doesn't run against Python 2 or 3 although it appears to just not be Python 3 compatible (Python 2 is end of life so I really wouldn't recommend writing anything else in it).

Python 2 runs but bails out with:
python2 ./ghostRemove.pl ../3MF-Models/3DBenchy_0.15mm_PET_MK3-Python.gcode
../3MF-Models/3DBenchy_0.15mm_PET_MK3-Python.gcode
Traceback (most recent call last):
File "./ghostRemove.pl", line 39, in <module>
y2=float(command[2].lstrip("Y"))
ValueError: could not convert string to float: E9.0

Respondido : 21/02/2019 6:10 pm
vintagepc
(@vintagepc)
Miembro
Re: Got rid of ringing/ghosting almost completely

I actually tried this script today (Mk3) on some square lack enclosure parts with 90 degree bends. Funnily enough, I got an exact duplicate ghost exactly midway down the part that mirrored the profile of the edge before it. It's on both sides of the print, so not just a seam.

Respondido : 25/02/2019 3:40 am
darkprognosis
(@darkprognosis)
New Member
RE: Got rid of ringing/ghosting almost completely
Posted by: @hans-d3

I have written a simple python script that gets rid of ringing in prints. It works by parsing the gcode file and looking for perimeter movements that change direction of more than 60 degrees with respect to a previous movement. If that is the case, it will reduce the x and y jerk values of the printer to a low value by inserting a "M205 X2 Y2" command into the gcode file just before where the move starts, and restoring to a higher jerk value just before the first point where a smaller angle move has to be done.

Why does this work better than just having a low jerk value for the whole print: Because printing with very low jerk values messes up curvatures. It generates a wavy pattern all around curvatures.

It would be great to have such a feature built into Slic3r. I have tried to run the script as a post processing script in Slic3r prusa edition (1.38), but it refuses to run python scripts for some reason. Even when I run the script from a bash file and then use the bash file as a post processing script from Slic3r, the script does not run. A bash file that does not call a python script runs fine from Slic3r though.

If you want to try the script your self, it is simple:
- In print settings->output options, select Verbose G-Code. (The script needs this in order to detect perimeter moves)
- Now just call the script with the filename of your gcode file as the first and only argument. The script will then output a file with a .MOD.gcode extension that you can then load into your printer software. Your printer will now print with nearly all ghosting gone.

Below is a copy of the script. Sorry for bad coding standards. I am not a professional programmer and python is not my first programming language.

#!/usr/bin/python

from math import *
import sys

print sys.argv[1]

x0=0
y0=0
x1=0
y1=0
x2=0
y2=0
modFlag=0
angle=0
dvr=0
prevLine=""
prev2Line=""
lenfV=0
lentV=0
lastMod="NOANGLE"

filePath=sys.argv[1]
outputPath=filePath.rstrip("gcode")+"MOD.gcode"
fw=open(outputPath,"w")
with open(filePath) as fp:
line=fp.readline()
while line:
splitLine=line.split(";")
if len(splitLine)>1:
comment = splitLine[1].strip()
command=splitLine[0].strip()
command=command.split(" ")
if ("perimeter" in comment) or ("move to first" in comment) or ("move inwards" in comment):
modFlag=1
if command[0]=="G1":
if "X" in command[1] and len(command)>2:
x2=float(command[1].lstrip("X"))
y2=float(command[2].lstrip("Y"))
if (x0!=0):
fVx=x1-x0
fVy=y1-y0
tVx=x2-x1
tVy=y2-y1
lenfV=sqrt(fVx*fVx+fVy*fVy)
lentV=sqrt(tVx*tVx+tVy*tVy)
if lenfV!=0 and lentV!=0:
dvr=(fVx*tVx+fVy*tVy)/(sqrt(fVx*fVx+fVy*fVy)*sqrt(tVx*tVx+tVy*tVy))
if abs(1-dvr)<0.00000001: dvr=1 #This is to prevent a python roundoff error where the dvr value becomes greater than 1
#print command, comment, dvr
angle=degrees(acos(dvr))
x0=x1
y0=y1
x1=x2
y1=y2
if modFlag==1 and angle>45:
if lastMod!="ANGLE": fw.write("M205 X2 Y2\n")
lastMod="ANGLE"
print angle
elif lastMod=="ANGLE":
lastMod="NOANGLE"
fw.write("M205 X20 Y20\n")
fw.write(line)
#print comment, command, angle
prev2Line=prevLine
prevLine=line
modFlag=0
line=fp.readline()
angle=0
print outputPath

I know what you are doing here but Python demands formatting (unlike other languages) and I would like to see this work.  Care to upload the code so we can download it or put up a formatted version via the code block?

Thanks.

Respondido : 19/09/2019 8:14 am
darkprognosis
(@darkprognosis)
New Member
RE: Got rid of ringing/ghosting almost completely

Nevermind I rewrote it in C++ as I despise Python and Perl is just slow.

Respondido : 20/09/2019 2:46 pm
ACE
 ACE
(@ace-2)
Trusted Member
RE: Got rid of ringing/ghosting almost completely

Could you share yours please?

Respondido : 20/09/2019 8:46 pm
Steve_AU
(@steve_au)
Trusted Member
RE: Got rid of ringing/ghosting almost completely

With formatting, I think I've got it right but I haven't tested it (as in printed the output). Its a python2 script.

from math import *
import sys

print sys.argv[1]

x0 = 0
y0 = 0
x1 = 0
y1 = 0
x2 = 0
y2 = 0
modFlag = 0
angle = 0
dvr = 0
prevLine = ""
prev2Line = ""
lenfV = 0
lentV = 0
lastMod = "NOANGLE"

filePath = sys.argv[1]
outputPath = filePath.rstrip("gcode") + "MOD.gcode"
fw = open(outputPath,"w")
with open(filePath) as fp:
line=fp.readline()
while line:
splitLine=line.split(";")
if len(splitLine) > 1:
comment = splitLine[1].strip()
command = splitLine[0].strip()
command = command.split(" ")
if ("perimeter" in comment) or ("move to first" in comment) or ("move inwards" in comment):
modFlag=1
if command[0] == "G1":
if "X" in command[1] and len(command)>2:
x2 = float(command[1].lstrip("X"))
y2 = float(command[2].lstrip("Y"))
if (x0 != 0):
fVx = x1 - x0
fVy = y1 - y0
tVx = x2 - x1
tVy = y2 - y1
lenfV = sqrt(fVx * fVx + fVy * fVy)
lentV = sqrt(tVx * tVx + tVy * tVy)
if lenfV != 0 and lentV != 0:
dvr = (fVx * tVx + fVy * tVy) / (sqrt(fVx * fVx + fVy * fVy) * sqrt(tVx * tVx + tVy * tVy))
if abs(1 - abs(dvr)) < 0.00000001:
dvr = 1 #This is to prevent a python roundoff error where the dvr value becomes greater than 1

#print command, comment, dvr
angle = degrees(acos(dvr))
x0 = x1
y0 = y1
x1 = x2
y1 = y2

if modFlag == 1 and angle > 45:
if lastMod != "ANGLE":
fw.write("M400\n")
fw.write("M205 X2 Y2\n")
lastMod="ANGLE"
print angle
elif lastMod == "ANGLE":
lastMod = "NOANGLE"
fw.write("M400\n")
fw.write("M205 X20 Y20\n")

fw.write(line)
prev2Line = prevLine
prevLine = line
modFlag = 0
line = fp.readline()
angle = 0

print outputPath
Respondido : 28/09/2019 1:04 pm
Página 2 / 3
Compartir: