Skip to content

Commit

Permalink
Fixed a issue that support_bottom_z_distance was not working as expec…
Browse files Browse the repository at this point in the history
…ted.

Fixed #2667
  • Loading branch information
SoftFever committed Nov 10, 2023
1 parent edb5676 commit c860680
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/libslic3r/GCode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1206,8 +1206,7 @@ std::vector<GCode::LayerToPrint> GCode::collect_layers_to_print(const PrintObjec
// Allow empty support layers, as the support generator may produce no extrusions for non-empty support regions.
|| (layer_to_print.support_layer /* && layer_to_print.support_layer->has_extrusions() */)) {
double top_cd = object.config().support_top_z_distance;
//double bottom_cd = object.config().support_bottom_z_distance == 0. ? top_cd : object.config().support_bottom_z_distance;
double bottom_cd = top_cd;
double bottom_cd = object.config().support_bottom_z_distance;

double extra_gap = (layer_to_print.support_layer ? bottom_cd : top_cd);

Expand Down
3 changes: 2 additions & 1 deletion src/libslic3r/PrintConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3501,6 +3501,7 @@ def = this->add("filament_loading_speed", coFloats);
def = this->add("support_top_z_distance", coFloat);
//def->gui_type = ConfigOptionDef::GUIType::f_enum_open;
def->label = L("Top Z distance");
def->min = 0;
def->category = L("Support");
def->tooltip = L("The z gap between the top support interface and object");
def->sidetext = L("mm");
Expand All @@ -3516,12 +3517,12 @@ def = this->add("filament_loading_speed", coFloats);
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(0.2));

// BBS:MusangKing
def = this->add("support_bottom_z_distance", coFloat);
def->label = L("Bottom Z distance");
def->category = L("Support");
def->tooltip = L("The z gap between the bottom support interface and object");
def->sidetext = L("mm");
def->min = 0;
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(0.2));

Expand Down
2 changes: 0 additions & 2 deletions src/libslic3r/Slicing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,6 @@ SlicingParameters SlicingParameters::create_from_config(
//BBS
params.gap_object_support = object_config.support_bottom_z_distance.value;
params.gap_support_object = object_config.support_top_z_distance.value;
if (params.gap_object_support <= 0)
params.gap_object_support = params.gap_support_object;

if (!print_config.independent_support_layer_height) {
params.gap_raft_object = std::round(params.gap_raft_object / object_config.layer_height + EPSILON) * object_config.layer_height;
Expand Down

0 comments on commit c860680

Please sign in to comment.