Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Contact Z distance cannot be changed to values other than the defaults #2752
I experienced the same issue. I was just playing around with the settings. I tried everything from 0.10 to 0.18. I also tried to leave the gap equal to one layer height. So if my layer height was 0.16, I tried to leave the gap as 0.16mm as well. After saving the settings and slicing the object, it seems to revert to 0 or 0.2 mm. I'm also using 1.2.6 on Windows 7 x64.
Repros on Ubuntu 14.04 for me though I had to back off Wx to version 0.9923 (Build.PL only requires 0.9918, but cpanm tried to install 0.9926 which doesn't compile on my machine). I could imagine that it is something to do with the widgets, perhaps.
OS: Ubuntu 14.04
I'll take a gander and see if I can figure it out.
It's in Slic3r::GUI::OptionsGroup::Field::NumericChoice::set_value:
I think what is happening here is that it's trying to use the labels (since !show_value) but it's using the value as an index, but the value is actually the measurement in mm, not the index. It rounds any fractional measurement to 0 and you git the first label.
For this field, that whole if seems unnecessary since the SetSelection above will already cover the case where the value matches a label in SetSelection, but perhaps there is a different kind of NumericChoice where there isn't a values array and $value is an index? If so, then the fix would be to make that if an else if? I'll poke around a little more.
@alexrj If I understand PrintConfig.cpp correctly, there are only three options of this type: "extruder", "fill_density" and "support_material_contact_distance". "fill_density" uses show_value, so takes the first if. "extruder" only has labels, not values, so I conclude that the label lookup by index is for that case. So I propose the following:
This also matches the logic of the constructor.
While testing out the extruder box before and after this change I found a couple of other bugs, one Windows only, the other in both Ubuntu and Windows, but since they both repro without the fix, I think they aren't regressions of my proposal above. I'll report them separately.