Add max boundary to the scarf_start_height

This commit is contained in:
Martin Šach 2024-10-23 18:13:11 +02:00 committed by Lukas Matena
parent 00010de0ee
commit 26b96c5ad2
2 changed files with 2 additions and 1 deletions

View File

@ -297,7 +297,7 @@ boost::variant<Point, Scarf::Scarf> finalize_seam_position(
Scarf::Scarf scarf{};
scarf.entire_loop = region->config().scarf_seam_entire_loop;
scarf.max_segment_length = region->config().scarf_seam_max_segment_length;
scarf.start_height = region->config().scarf_seam_start_height.get_abs_value(1.0);
scarf.start_height = std::min(region->config().scarf_seam_start_height.get_abs_value(1.0), 1.0);
const double offset{scarf.entire_loop ? 0.0 : region->config().scarf_seam_length.value};
const std::optional<Geometry::PointOnLine> outter_scarf_start_point{Geometry::offset_along_lines(

View File

@ -2699,6 +2699,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("Start height of the scarf joint specified as fraction of the current layer height.");
def->sidetext = L(" %");
def->min = 0;
def->max = 100;
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionPercent(0));