-
-
Notifications
You must be signed in to change notification settings - Fork 833
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
fix is_extruder_used #1422
fix is_extruder_used #1422
Conversation
// case of "is_extruder_used[]" as Slicer may lie about availability of such non-existent extruder. We rather | ||
// sacrifice 256B of memory before we change the behavior of the PlaceholderParser, which should really only fill in | ||
// the non-existent vector elements for filament parameters. | ||
std::vector<unsigned char> is_extruder_used(std::max(size_t(255), print.config().filament_diameter.size()), 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Am I understanding correctly that the purpose of this change is to handle cases where the user tries to access a non-existent extruder in his custom G-code? For example, using is_extruder_used[18]
when only 3 extruders/filaments are set in the slicer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I use it with my IDEX device (Snapmaker J1), and when only one filament is added in the slicer, it used to return true when attempting to check is_extruder_used[1]
in the Start Gcode. Now it will return false.
LGTM |
Thanks for merging my code into OrcaSlicer. |
@bubnikv Can you kindly point out where are original codes located? |
I like slicing in Orca, so i copied this code for my printer to work correctly. |
No description provided.