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

Buggy fan speed interpolation #5409

Closed
lwbsbde opened this issue Mar 9, 2019 · 30 comments · Fixed by Ultimaker/CuraEngine#2111
Closed

Buggy fan speed interpolation #5409

lwbsbde opened this issue Mar 9, 2019 · 30 comments · Fixed by Ultimaker/CuraEngine#2111
Labels
Status: On Backlog The issue / feature has been reproduced and is deemed important enough to be fixed. Type: Bug The code does not produce the intended behavior.

Comments

@lwbsbde
Copy link

lwbsbde commented Mar 9, 2019

Hallo
I have Cura 3.6.0
And I have a problem with the fan speed.
My settings:
regular speed 30%
Max speed 100%
fan speed threshold 13s
minimum layer time 5s

the fan speed increases abruptly from 40 to over 70% without intermediate steps. from 70 to 100 with intermediate steps.

why no steps between 40 to 70 % ??

@lwbsbde lwbsbde closed this as completed Mar 9, 2019
@lwbsbde lwbsbde reopened this Mar 9, 2019
@rburema
Copy link
Member

rburema commented Mar 10, 2019

Hi @lwbsbde ,
Could you attach the project file for which this happens? (File > Save... then rename to zip to circumvent githubs' restrictions.)

@rburema rburema added the Status: Needs Info Needs more information before action can be taken. label Mar 10, 2019
@Ghostkeeper
Copy link
Collaborator

Possibly this is because the model abruptly goes from a large layer to a medium-sized layer?

@lwbsbde
Copy link
Author

lwbsbde commented Mar 11, 2019

I have slice an Easter egg Model with different settings.

  1. regular speed 30 , max 100, fan speed threshold 13s and minimum layer time 2s
  2. the same but minimum layer time 4s
  3. minimum layer time 8s

Layer longer than 13 s ,it is always 30 %
Layer shorter than 13 s , it is
Setting 1: at least 50% speed
Setting 2: at least 63% speed
Setting 3: at least 80% speed

If the minimum layer time 0s , then the speed is regulated correctly between 30-100 % .
If the minimum layer time 2s, then the speed is regulated between 50 - 100 %
If the minimum layer time 4s, then the speed is regulated between 63 - 100 %
If the minimum layer time 8s, then the speed is regulated between 80 - 100 %

The minimum layer time causes the speed jump

@lwbsbde
Copy link
Author

lwbsbde commented Mar 11, 2019

Possibly this is because the model abruptly goes from a large layer to a medium-sized layer?

No , the layer time changes slowly.

@lwbsbde
Copy link
Author

lwbsbde commented Mar 11, 2019

Hi @lwbsbde ,
Could you attach the project file for which this happens? (File > Save... then rename to zip to circumvent githubs' restrictions.)
PATTERN_-_KRAKEN.zip

that happens with all objects

@lwbsbde lwbsbde closed this as completed Mar 11, 2019
@lwbsbde lwbsbde reopened this Mar 11, 2019
@lwbsbde
Copy link
Author

lwbsbde commented Mar 11, 2019

With Cura 4.0.0 beta , I have the same problem

@Ghostkeeper
Copy link
Collaborator

It's a bit easier to see with just a tetrahedron. With your settings, I see the result that you're wondering about. It seems that when the preliminary estimate becomes less than Regular/Maximum Fan Speed Threshold, it makes a jump from 30% to 77.6%. And then interpolates between 77.6% and 100% depending on how close it comes to the minimum layer time.

I don't know why that happens though, because in the code it seems to interpolate normally between regular and maximum fan speed:

https://github.com/Ultimaker/CuraEngine/blob/99ee78237b8d356ccc6096a2575fa4d73e15d166/src/LayerPlan.cpp#L1280-L1284

@lwbsbde
Copy link
Author

lwbsbde commented Mar 13, 2019

It's a bit easier to see with just a tetrahedron. With your settings, I see the result that you're wondering about. It seems that when the preliminary estimate becomes less than Regular/Maximum Fan Speed Threshold, it makes a jump from 30% to 77.6%. And then interpolates between 77.6% and 100% depending on how close it comes to the minimum layer time.
I don't know why that happens though, because in the code it seems to interpolate normally between regular and maximum fan speed:
https://github.com/Ultimaker/CuraEngine/blob/99ee78237b8d356ccc6096a2575fa4d73e15d166/src/LayerPlan.cpp#L1280-L1284

1282 : what is "fan_speed_layer_time_settings.cool_min_layer_time_fan_speed_max" ?
is it the threshold time ?
I think "fan_speed_layer_time_settings.cool_min_layer_time_fan_speed_MIN" is better in the place !!
See line 1256

@lwbsbde
Copy link
Author

lwbsbde commented Mar 13, 2019

I mean the error lies in the calculation of the layer time difference

@lwbsbde
Copy link
Author

lwbsbde commented Mar 14, 2019

Star_big_0075_Spike_10x.stl.zip
A tetrahedron project file.
Layer 4-281 Fan speed 30 %

Layer 282 Fan speed jump to 63%

@Ghostkeeper
Copy link
Collaborator

1282 : what is "fan_speed_layer_time_settings.cool_min_layer_time_fan_speed_max" ?
is it the threshold time ?

Yes, that's the setting "Regular/Maximum Fan Speed Threshold" for the currently active extruder.

I think "fan_speed_layer_time_settings.cool_min_layer_time_fan_speed_MIN" is better in the place !!
See line 1256

cool_min_layer_time_fan_speed_MIN doesn't exist. The ASCII art is a bit unclear. In time, it's interpolating between cool_min_layer_time_fan_speed_max and cool_min_layer_time.

@lwbsbde
Copy link
Author

lwbsbde commented Mar 14, 2019

does it work with you when you slice an object with minimum Layer time?
does it only work for me not ?
in which cura file on my Computer is this formula ?

@Ghostkeeper
Copy link
Collaborator

Once it's below the minimum layer time it works fine for me. It's between that and the Regular/Maximum Fan Speed Threshold that it seems to make a mistake on my end.

These calculations are in CuraEngine.exe on your computer (if you're using Windows; otherwise just CuraEngine). You can't easily edit them unless you know how to compile CuraEngine.

@lwbsbde
Copy link
Author

lwbsbde commented Mar 15, 2019

I could not translate your answer clearly.
Can you confirm the mistake as he does me ?
Is it a bug in the Programm?
I have already reinstalled it several times. without success.

If Cura divides into line 1283 instead of layer_time_diff through cool_min_layer_time_fan_speed_max, I get a similarly wrong result. Maybe he does not subtract in line 1282 .

Can I preview the layer time and fan speed in the preview of cura? I would find that very useful.

@Ghostkeeper
Copy link
Collaborator

I'll keep it simple for your translation tool then 😋

Can you confirm the mistake as he does me ?

Yes.

Is it a bug in the Programm?

Yes.

Maybe he does not subtract in line 1282 .

Maybe. I don't know.

Can I preview the layer time and fan speed in the preview of cura?

No. You can preview the printing speed (feedrate). That should allow you to see the minimum layer time, but not the fan speed.

@Ghostkeeper Ghostkeeper added Type: Bug The code does not produce the intended behavior. Category: Engine and removed Status: Needs Info Needs more information before action can be taken. labels Mar 19, 2019
@userosos
Copy link

userosos commented Apr 28, 2019

Hi! This problem actual for Cura 4.0.
The pyramid for tests.

CalibrationPyramid.zip
Need scale to ~40 mm the sizes.
regular/maximum fan speed threshold - the parametr not work.

@rburema
Copy link
Member

rburema commented May 7, 2019

@devs: Do we have a ticket for this yet?

@Ghostkeeper
Copy link
Collaborator

@rburema Yes, CURA-6410.

@lwbsbde
Copy link
Author

lwbsbde commented May 27, 2019

did you find the error in the program?

@Ghostkeeper
Copy link
Collaborator

Not yet. It's slowly crawling towards the top of our todo list though.

@lwbsbde
Copy link
Author

lwbsbde commented Sep 27, 2019

did you now find it

@Ghostkeeper
Copy link
Collaborator

Not yet. It's still in our bug backlog.

@BarsMonster
Copy link

BarsMonster commented Jan 3, 2020

I also face this issue at the moment in 4.4.1

@clfaye
Copy link

clfaye commented Mar 2, 2020

I have this same issue printing a small pyramid:
regular fan speed = 20%
maximum fan speed = 32%
Regular/Maximum Speed Threshold = 1
Regular Fan Speed at Layer = 15
Minimum Layer time = 5

Cura ignores the regular fan speed. The fan speed increases from 0 to 32% at layer 15. Layer 15 takes 5 seconds, so the fans should only be at 20%

@lwbsbde
Copy link
Author

lwbsbde commented May 1, 2020

Hallo ...
could anyone kill the bug
PLEACE

@Ghostkeeper Ghostkeeper changed the title Fan speed Buggy fan speed interpolation Oct 14, 2020
@BarsMonster
Copy link

I also face this issue at the moment in 4.4.1

I still see this in 5.2.1

@BarsMonster
Copy link

LayerPlan.cpp function processFanSpeedAndMinimalLayerTime lines 1666-1670:
Layer time is compared to configured fan speed which is probably why this is happening.

    else if (fan_speed_layer_time_settings.cool_min_layer_time >= fan_speed_layer_time_settings.cool_min_layer_time_fan_speed_max)
    {
        fan_speed = fan_speed_layer_time_settings.cool_fan_speed_min;
    }
    else if (force_minimal_layer_time && totalLayerTime < fan_speed_layer_time_settings.cool_min_layer_time_fan_speed_max)

@rburema
Copy link
Member

rburema commented Jan 17, 2023

Still listed as a major priority bug. Thanks for diving into the code though! Usually that makes it easier.

@MariMakes MariMakes added the Status: On Backlog The issue / feature has been reproduced and is deemed important enough to be fixed. label May 16, 2023
@wawanbreton
Copy link
Contributor

Fixed in Ultimaker/CuraEngine#2111
Sorry for the quite long delay 😅

@MariMakes
Copy link
Contributor

👋 Quick update on our side.
This is resolved in the 5.8 release 🎉 , you can download the Beta version with the fix here: https://github.com/Ultimaker/Cura/releases/tag/5.8.0-beta.1

Thanks again, and please let us know if you run into any other issues 💪

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: On Backlog The issue / feature has been reproduced and is deemed important enough to be fixed. Type: Bug The code does not produce the intended behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants