Allow specifying rotation patterns for Sparse and Solid infill (#9924)

* SPE-2405: Add Zig Zag infill that is rectilinear infill but with a consistent pattern between layers.

This Zig Zag infill is inspired by the Zig Zag infill in Cura.

Change-Id: I798affa99f4b5c3bd67f47643e67530fb7c3e0cb
(cherry picked from commit 2808d04d5deef6f99f9618648e46f11de03efc98)

* Add Cross zag and locked-zag for shoes

Ported from BambuStudio

* wip

* sparse infill roratation template

* solid_infill_rotate_template

* remove rotate_solid_infill_direction

* hide sparse infill rotation template for non applicable infill pattern

* hide solid_infill_rotate_template for non supported solid infill patterns

* update icon

* support empty string for ConfigOptionFloats deserialize

* fix build errors

---------

Co-authored-by: Lukáš Hejl <hejl.lukas@gmail.com>
This commit is contained in:
SoftFever
2025-06-22 23:10:35 +08:00
committed by GitHub
parent fa70582ed1
commit 88fb8187d9
39 changed files with 1551 additions and 714 deletions

View File

@@ -430,6 +430,16 @@ void Field::get_value_by_opt_type(wxString& str, const bool check_value/* = true
str = str_out;
set_value(str, true);
}
} else if (m_opt.opt_key == "sparse_infill_rotate_template" || m_opt.opt_key == "solid_infill_rotate_template") {
if (!ConfigOptionFloats::validate_string(str.utf8_string())) {
show_error(m_parent, format_wxstr(_L("This parameter expects a comma-delimited list of numbers. E.g, \"0,90\".")));
wxString old_value(boost::any_cast<std::string>(m_value));
this->set_value(old_value, true); // Revert to previous value
} else {
// Valid string, so update m_value with the new string from the control.
m_value = into_u8(str);
}
break;
}
m_value = into_u8(str);