mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-12 19:49:03 +08:00
Follow-up to 6f5813a849e40b1bcae97270a317222dff92f5ec: Recalculate infill surfaces when infill_only_where_needed is enabled while switching from the Lightning infill to another infill or vice versa.
This commit is contained in:
parent
be9cae74a0
commit
263b23fb46
@ -627,12 +627,21 @@ bool PrintObject::invalidate_state_by_config_options(
|
|||||||
|| opt_key == "bottom_fill_pattern"
|
|| opt_key == "bottom_fill_pattern"
|
||||||
|| opt_key == "external_fill_link_max_length"
|
|| opt_key == "external_fill_link_max_length"
|
||||||
|| opt_key == "fill_angle"
|
|| opt_key == "fill_angle"
|
||||||
|| opt_key == "fill_pattern"
|
|
||||||
|| opt_key == "infill_anchor"
|
|| opt_key == "infill_anchor"
|
||||||
|| opt_key == "infill_anchor_max"
|
|| opt_key == "infill_anchor_max"
|
||||||
|| opt_key == "top_infill_extrusion_width"
|
|| opt_key == "top_infill_extrusion_width"
|
||||||
|| opt_key == "first_layer_extrusion_width") {
|
|| opt_key == "first_layer_extrusion_width") {
|
||||||
steps.emplace_back(posInfill);
|
steps.emplace_back(posInfill);
|
||||||
|
} else if (opt_key == "fill_pattern") {
|
||||||
|
steps.emplace_back(posInfill);
|
||||||
|
|
||||||
|
const auto *old_fill_pattern = old_config.option<ConfigOptionEnum<InfillPattern>>(opt_key);
|
||||||
|
const auto *new_fill_pattern = new_config.option<ConfigOptionEnum<InfillPattern>>(opt_key);
|
||||||
|
assert(old_infill && new_infill);
|
||||||
|
// We need to recalculate infill surfaces when infill_only_where_needed is enabled, and we are switching from
|
||||||
|
// the Lightning infill to another infill or vice versa.
|
||||||
|
if (m_config.infill_only_where_needed && (new_fill_pattern->value == ipLightning || old_fill_pattern->value == ipLightning))
|
||||||
|
steps.emplace_back(posPrepareInfill);
|
||||||
} else if (opt_key == "fill_density") {
|
} else if (opt_key == "fill_density") {
|
||||||
// One likely wants to reslice only when switching between zero infill to simulate boolean difference (subtracting volumes),
|
// One likely wants to reslice only when switching between zero infill to simulate boolean difference (subtracting volumes),
|
||||||
// normal infill and 100% (solid) infill.
|
// normal infill and 100% (solid) infill.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user