fix supporting of start and end of extrusion line

This commit is contained in:
PavelMikus 2022-09-07 18:00:04 +02:00
parent 3202756d22
commit 9e2a555f1b
2 changed files with 5 additions and 1 deletions

View File

@ -365,6 +365,7 @@ std::vector<ExtrusionLine> to_short_lines(const ExtrusionEntity *e, float length
Polyline pl = e->as_polyline();
std::vector<ExtrusionLine> lines;
lines.reserve(pl.points.size() * 1.5f);
lines.emplace_back(unscaled(pl.points[0]).cast<float>(), unscaled(pl.points[0]).cast<float>(), e);
for (int point_idx = 0; point_idx < int(pl.points.size() - 1); ++point_idx) {
Vec2f start = unscaled(pl.points[point_idx]).cast<float>();
Vec2f next = unscaled(pl.points[point_idx + 1]).cast<float>();
@ -415,6 +416,9 @@ void check_extrusion_entity_stability(const ExtrusionEntity *entity,
for (size_t line_idx = 0; line_idx < lines.size(); ++line_idx) {
ExtrusionLine &current_line = lines[line_idx];
if (line_idx + 1 == lines.size() && current_line.b != lines.begin()->a) {
bridging_acc.add_distance(params.bridge_distance + 1.0f);
}
float curr_angle = 0;
if (line_idx + 1 < lines.size()) {
const Vec2f v1 = current_line.b - current_line.a;

View File

@ -282,7 +282,7 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig* config)
"dont_support_bridges", "support_material_extrusion_width", "support_material_contact_distance",
"support_material_xy_spacing" })
toggle_field(el, have_support_material);
// toggle_field("support_material_threshold", have_support_material_auto);
toggle_field("support_material_threshold", have_support_material_auto);
toggle_field("support_material_bottom_contact_distance", have_support_material && ! have_support_soluble);
toggle_field("support_material_closing_radius", have_support_material && support_material_style == smsSnug);