mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 19:33:47 +00:00
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:
@@ -657,6 +657,11 @@ public:
|
||||
{
|
||||
if (! append)
|
||||
this->values.clear();
|
||||
|
||||
if (str.empty()) {
|
||||
this->values.push_back(0);
|
||||
return true;
|
||||
}
|
||||
std::istringstream is(str);
|
||||
std::string item_str;
|
||||
while (std::getline(is, item_str, ',')) {
|
||||
@@ -675,6 +680,13 @@ public:
|
||||
}
|
||||
return true;
|
||||
}
|
||||
static bool validate_string(const std::string &str)
|
||||
{
|
||||
// should only have number and commas
|
||||
return std::all_of(str.begin(), str.end(), [](char c) {
|
||||
return std::isdigit(c) || c == ','|| std::isspace(c);
|
||||
});
|
||||
}
|
||||
|
||||
ConfigOptionFloatsTempl& operator=(const ConfigOption *opt)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user