Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENHANCEMENT REQUEST with code solution delivered as well] Random positioning of initial purge line #210

Open
m-cas opened this issue Aug 15, 2023 · 9 comments

Comments

@m-cas
Copy link

m-cas commented Aug 15, 2023

Is your feature request related to a problem? Please describe.
Having the purge line at the same place managed to damage on the long run my original mk3 pei sheet and I want to avoid this in my new MK4.

Describe the solution you'd like
Select randomly where to start the purge line so that no damage after repeated purging is happening.

Describe how it would work
The G-code for positioning the line randomly select an X component in the first half of the printing table instead of always starting at position X15.
Here is the working code I'd love to see making it into production.

;
; Extrude purge line
;
G92 E0 ; reset extruder position
G1 E{(filament_type[0] == "FLEX" ? 4 : 2)} F2400 ; deretraction after the initial one before nozzle cleaning

; Original Prusa code commented out
;G0 E7 X15 Z0.2 F500 ; purge
;G0 X25 E4 F500 ; purge
;G0 X35 E4 F650 ; purge
;G0 X45 E4 F800 ; purge
;G0 X{45 + 3} Z{0.05} F{8000} ; wipe, move close to the bed
;G0 X{45 + 3 * 2} Z0.2 F{8000} ; wipe, move quickly away from the bed

; Random start of purge line inside the first half of the plate
{
local rndpos = int(random(15, print_bed_max[0] / 2));
"M117 Purge begins at " + rndpos + "; share the new start\n";
"G0 E7 X" + rndpos + " Z0.2 F500 ; purge\n";
rndpos = rndpos + 10;
"G0 X" + rndpos + " E4 F500 ; purge\n";
rndpos = rndpos + 10;
"G0 X" + rndpos + " E4 F650 ; purge\n";
rndpos = rndpos + 10;
"G0 X" + rndpos + " E4 F800 ; purge\n";
"G0 X" + (rndpos+3) + " Z0.05 F8000 ; wipe, move close to the bed\n";
"G0 X" + (rndpos+6) + " Z0.2 F8000 ; wipe, move quickly away from the bed\n";
}

Describe alternatives you've considered
none, it works rather well.

Additional context
none. It works.

@m-cas m-cas changed the title Random positioning of initial purge line [ENHANCEMENT REQUEST with code solution delivered as well] Random positioning of initial purge line Sep 29, 2023
@rtyr
Copy link
Collaborator

rtyr commented Oct 4, 2023

Thanks for your suggestion. We will discuss this internally, but I think we will not change the default behavior for now. The main reasons we changed previous behavior (purging close to the object) were ease of removal by hand without touching the bed and purging outside of print area. This change also needed some updates in the firmware.

@rtyr rtyr transferred this issue from prusa3d/PrusaSlicer Oct 4, 2023
@m-cas
Copy link
Author

m-cas commented Oct 4, 2023

Thanks for the feedback. Have you looked at what I am changing exactly? From your comment it sounds a deeper thing than in reality! All stays the same, it is just a random X start position (instead of starting always at X15) along the same purge line as today to avoid repeated stress damage to the same point on the printing table.

I am running it on my MK4 without any FW change. It is only a slightly changed version of the custom pre-print G-code; I fail to see any reason for not adopting it, no complex code, no risks, no FW change needed?!?

@rtyr
Copy link
Collaborator

rtyr commented Oct 5, 2023

Have you looked at what I am changing exactly?

Yes, I understand it well enough.

no risks,

It's rarely the case in reality. For example, your change would make all new project files shared over Printables etc. incompatible with previous slicer versions. We also may change it completely anyway because of MMU3.

I personally don't have strong opinion about this. I think that current state is ok, it is printed outside of print area and users know where exactly it will be. It is also good position for easy and clean removal. From my experience, it is better to have consistent behavior instead of some random factor, which may confuse some users.

@m-cas
Copy link
Author

m-cas commented Oct 5, 2023

Could you please explain what would make it incompatible? No sarcasm, I am really interested.

And here I do not agree: it is NOT ok. Using the same spot over and over creates a trench in the plate. It took about 1 year for my old mk3 to develop the problem and I ended up with a pretty good plate but with a little trench where the purge line was repeatedly put.

I do not see what confusion it creates: you look where the purge line is and you take it away.

Hey you guys are the owner of this thing, if you want to keep it like this, be my guest :D I am just a user reporting a problem and giving a solution for once.

@rtyr
Copy link
Collaborator

rtyr commented Oct 5, 2023

Could you please explain what would make it incompatible?

Unsupported variables, you will get parsing error with <PS2.6.0.

@m-cas
Copy link
Author

m-cas commented Oct 5, 2023

is there a way to test for the slicer version in macro?

@harriettubgirl
Copy link

This is a great suggestion, I can definitely see my smooth sheet wearing out where the purge line is always laid. Please give this as an option!

@m-cas
Copy link
Author

m-cas commented Oct 18, 2023

@rtyr just a comment on breaking compatibility, and do not take this as polemic, just the opinion of someone that has been writing software for nearly 40 years. This is the normal state when you release new features; now that you have variables and macros you cannot say "do not use them 'cause they break compatibility with older releases". What is the point of releasing the new stuff then?

@m1bcodes
Copy link

I agree that this would be great feature.
The structured print sheet gets worn out and the purge line very hard to remove.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants