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

Critical bugfix: re-add spiral z hop on layer changes when timelapse is disabled #4611

Closed
wants to merge 1 commit into from

Conversation

ziehmon
Copy link

@ziehmon ziehmon commented Aug 9, 2024

Update 2024-08-13

The new PR is ready which entirely fixes the problem without a workaround. Please see #4631. I will close this one sooner or later of coordination with the maintainers.

Update 2024-08-12

I want to apologize for the tone of my latest update. It was not my intention to threat or accuse contributors. I sat in front of my computer for way too long this day.

It seems I was able to track down the original cause and fix it cleanly without workarounds. I will open a new PR for this, since this would serve as just another workaround.

Update 2024-08-10

This issue is larger then expected. My PR will just mitigate a fundamental bug in change_layer in GCode.cpp. The spiral mode shouldn't even occur in timelapse_gcode but rather inside the gcode parser. It will always use normal lift, no matter how I manipulate the settings.

It seems you were absolutely aware of this, because you added the spiral lift as a workaround in the timelapse code. If you'd implemented this correct, this would cause double Z hops. A bit disappointing guys. Sort this out, I am seriously considering doing a RMA. I'll leave this PR as it is so you can understand the issue.

Scope

Bambu Lab A1 series (Mini/regular)

Abstract

On layer changes, the Bambu Lab A1 is supposed to use a spiral z hop to mitigate stringing as documented in https://wiki.bambulab.com/en/software/bambu-studio/parameter/retraction#auto.

The gcode for timelapse handling has a bug since its initial release in 2023 that will only execute the spiral Z hop when timelapse is activated and hence use a normal straight Z hop instead. This is causing stringing on prints with short layer time.

This PR moves the spiral gcode before the timelapse condition is trigged. It will still support the additional instructions inside the timelapse handling conditional.

Details

Look at this gcode section from time_lapse_gcode. It also viewable in Bambu Studio ("Printer Settings" -> "Machine gcode"):

{if !spiral_mode && print_sequence != "by object"}
; don't support timelapse gcode in spiral_mode and by object sequence for I3 structure printer
M622.1 S1 ; for prev firware, default turned on
M1002 judge_flag timelapse_record_flag
M622 J1
    [...]
    G17
    G2 Z{layer_z + 0.4} I0.86 J0.86 P1 F20000 ; spiral lift a little
    [...]
M623
[...]
G1 Z7.8 F42000

You can see the Z raise ( G1 Z) after the conditional closing (M623) without any spiral, which is a normal type Z hop. The proper spiral (G17 & G2 Z) is inside the conditional (M622).

Reproduce

Proof

  • .3mf project and the corresponding .gcode as .zip archive
  • Slow-motion video video displaying the missing spiral in Z hop (timestamp: 00:18m)

@ziehmon ziehmon changed the title Critical bugfix: add spiral z hop on layer changes when timelapse is disabled. Critical bugfix: re-add spiral z hop on layer changes when timelapse is disabled Aug 9, 2024
@ziehmon
Copy link
Author

ziehmon commented Aug 9, 2024

Oh and Bambu Lab, if you want people to contribute and help fixing bugs, PUBLISH THE CUSTOM GCODE DOCS.

on layer changes, the Bambu Lab A1 series is supposed to use a spiral z hop to mitigate stringing as documented in https://wiki.bambulab.com/en/software/bambu-studio/parameter/retraction#auto.

The GCODE for timelapse handling has a bug since its initial release that will only execute the spiral Z hop when timelapse is activated and use a normal straight Z hop instead.

This commit moves the spiral GCODE before the timelapse condition is trigged. It while still support the additional instructions inside the timelapse handling conditional.
@ziehmon
Copy link
Author

ziehmon commented Aug 9, 2024

Update: its verified that this is bug is happening on A1 mini too. I need to check the gcode compability but I guess I could supply a fix too.

@ziehmon
Copy link
Author

ziehmon commented Aug 10, 2024

@vaaronna
Copy link

@ziehmon, this is good work, and I understand you may not have much experience in contributing to other projects, but your approach could use some fine tuning. There isn't any need to use reddit as a cudgel to try to attract attention to your fix on github, berate the designers, tag all of the contributors or threaten to return your printer. Dial it back a bit, actually dial it back a lot.

@ziehmon
Copy link
Author

ziehmon commented Aug 12, 2024

@vaaronna fair enough. I apologize for my latest update. It was a really hard feeling to realize even this PR that was a lot of work will not fix the issue. It is super frustrating to look at various "FIXME", "TODO" and "do not use this function" comments when looking at code that was committed and is causing this issue but it shall not serve as justification for my tone. I did not want to berate nor threat the designers. For transparency reasons, I will not edit the original comment but put a note to it.

I am working on fixing the actual cause for the workaround to lift Z via timelapse_gcode and I think I'll open another PR for it and close this one in the near future.

@QingZhangBambu
Copy link
Collaborator

OK,i will ask concerned staff to review it.

@QingZhangBambu
Copy link
Collaborator

and you guys do a good job. 👍

@ziehmon
Copy link
Author

ziehmon commented Aug 14, 2024

OK,i will ask concerned staff to review it.

Thanks! May I kindly ask the assigned reviewers @XunZhangBambu and @tangketan to review the new PR #4631 instead of this one?

The new one actually fixes the problem and is not another workaround. There is a detailed description to the changes. I hope you did not already invest to much time and came up with the same solution.

If its okay for you, I would like to close this one, but I will wait for your confirmation.

@ziehmon
Copy link
Author

ziehmon commented Aug 15, 2024

Reviewers were reassigned, thanks, will be continued in #4631.

@ziehmon ziehmon closed this Aug 15, 2024
@ziehmon ziehmon deleted the fix-missing-spiral-zhop branch September 20, 2024 08:48
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

Successfully merging this pull request may close these issues.

3 participants