FIX: dont change raft_distance when no raft

jira: STUDIO-12187
Change-Id: I1db2124e5e818025249a038086553c9eb845f025
This commit is contained in:
jiaxi.chen 2025-05-15 16:53:21 +08:00 committed by lane.wei
parent 3cb9194247
commit ad98c9971c
3 changed files with 3 additions and 4 deletions

View File

@ -1187,12 +1187,12 @@ std::vector<GCode::LayerToPrint> GCode::collect_layers_to_print(const PrintObjec
// raft contact distance should not trigger any warning // raft contact distance should not trigger any warning
if (last_extrusion_layer && last_extrusion_layer->support_layer) { if (last_extrusion_layer && last_extrusion_layer->support_layer) {
double raft_gap = object.config().raft_contact_distance.value; double raft_gap = top_cd == 0 ? 0 : object.config().raft_contact_distance.value;
//if (!object.print()->config().independent_support_layer_height) //if (!object.print()->config().independent_support_layer_height)
{ {
raft_gap = std::ceil(raft_gap / object.config().layer_height) * object.config().layer_height; raft_gap = std::ceil(raft_gap / object.config().layer_height) * object.config().layer_height;
} }
extra_gap = std::max(extra_gap, object.config().raft_contact_distance.value); extra_gap = std::max(extra_gap, top_cd == 0 ? 0 :object.config().raft_contact_distance.value);
} }
double maximal_print_z = (last_extrusion_layer ? last_extrusion_layer->print_z() : 0.) double maximal_print_z = (last_extrusion_layer ? last_extrusion_layer->print_z() : 0.)
+ layer_to_print.layer()->height + layer_to_print.layer()->height

View File

@ -110,7 +110,7 @@ SlicingParameters SlicingParameters::create_from_config(
params.min_layer_height = std::min(params.min_layer_height, params.layer_height); params.min_layer_height = std::min(params.min_layer_height, params.layer_height);
params.max_layer_height = std::max(params.max_layer_height, params.layer_height); params.max_layer_height = std::max(params.max_layer_height, params.layer_height);
params.gap_raft_object = object_config.raft_contact_distance.value; params.gap_raft_object = soluble_interface ? 0 : object_config.raft_contact_distance.value;
//BBS //BBS
params.gap_object_support = object_config.support_bottom_z_distance.value; params.gap_object_support = object_config.support_bottom_z_distance.value;
params.gap_support_object = object_config.support_top_z_distance.value; params.gap_support_object = object_config.support_top_z_distance.value;

View File

@ -676,7 +676,6 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, in
toggle_field("support_filament", have_support_material || have_skirt); toggle_field("support_filament", have_support_material || have_skirt);
toggle_line("raft_contact_distance", have_raft && !have_support_soluble); toggle_line("raft_contact_distance", have_raft && !have_support_soluble);
if (!have_raft || have_support_soluble) config->opt_float("raft_contact_distance") = config->opt_float("support_top_z_distance");
bool has_ironing = (config->opt_enum<IroningType>("ironing_type") != IroningType::NoIroning); bool has_ironing = (config->opt_enum<IroningType>("ironing_type") != IroningType::NoIroning);
for (auto el : { for (auto el : {