-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Update AddCoolingProfile.py #20093
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
Update AddCoolingProfile.py #20093
Conversation
Add control for a Build Volume fan. Update AddCoolingProfile.py Oops. Left in a debugging line.
46e7fcb
to
e91a636
Compare
Code could use a bit more cleaning up imo, some of the if statements for example could be simplified. You could also do the init() and define self.curaApp and use that instead of |
Made changes per request.
Changes made. A little history...This was the first script I'd written. I took it on because I needed it for PETG, and because it had been a feature request here since 2017 and no one else had bothered. I'm quite pleased that there has never been a bug report regarding it (knock-on-wood). |
Changed variable name "curaApp" to "global_stack". Update AddCoolingProfile.py Add except for 'Build Volume Fan' for previous versions.
c713768
to
fba94ae
Compare
Re-worked the Build Volume fan code to include a printers Auxiliary fan if there is one.
Some minor comments, looks good overall. Added some space after the # in a commit. |
Update per requested changes. Comments are consistent with "# ". global_stack, extruder_list, extruder_count are assigned to "self".
The last commit should do the job. All of your suggestions were implemented. |
Take one more look. I had missed a couple of change requests. |
Mainly looked at the changes introduced by the PR, but going through the entire code with a finer comb:
|
We run into my ignorance here. I have no idea what an "attribute error" is. At one point Remco asked that I try to simplify sections of the code. That's when I split off the four separate 'main' functions. Yes, I may have missed variables that became obsolete during those changes. I'm not in the mood for going back over it again but I will at some point. It's a bastard to debug and right now it works fine even though the code remains pretty ugly. I've been working on ChangeAtZ and PauseAtHeight. I figured I'd submit them after 5.10 stable is out. Once I get that far I'll return to this script and work on it some more. |
I went over it since you made the request, take your time and see what you think could be added. It's best to work on things when you're motivated. Some General rambling to clarify.
AttributeError: 'Car' object has no attribute 'brannd'
AttributeError: 'Person' object has no attribute 'age'
AttributeError: 'Animal' object has no attribute 'run'
AttributeError: 'int' object has no attribute 'append' |
Another effort. |
I had changed some of the "except" lines to indicate the error to trap. I was wrong in regards to line 782. It had looked like it would be an IndexError (and it still might throw one) but it kicked out on a ValueError. I have reverted back to the simple "except:" which did work. |
166da77
to
b9d5626
Compare
Update AddCoolingProfile.py Un-trapped ValueError in line 782. It might also be an IndexError. I left it open. Update AddCoolingProfile.py Change an IndexError to a ValueError
ee020ee
to
03aa644
Compare
Changed an exception from IndexError to a ValueError. |
Commit 8 is a bug fix. |
Found a bug. The ";LAYER:" line was not being added to the "modified data" string when in "single_fan_by_feature" mode. Update AddCoolingProfile.py bug fix for the bug fix.
f9dd1a5
to
1e18e0e
Compare
Add control for a Build Volume fan.
Add 'Idle speed' for the inactive extruder rather than always going to "0".
General cleanup in the code and changed variable "curaApp" to "global_stack".
Type of change
Test Configuration:
Win 10 Pro
All Cura versions
Checklist: