mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-11-28 08:09:55 -05:00
Fix pipe-separated exclusion areas
Treat pipe-separated bed_exclude_area strings as extended exclusion syntax even when no Z range is present. ConfigOptionPoints now preserves and parses plain multi-region strings like XxY,...|XxY,... instead of flattening them into a single polygon. Remove the stale bed_exclude_area_3d config option and related preset/UI plumbing now that Z-limited and multi-region exclusions are represented through the existing bed_exclude_area field.
This commit is contained in:
1 parent
19a454746a
commit
ee593c2d5a
9 files changed
+15
-33
No files matched your search
@@ -734,7 +734,8 @@ void Field::get_value_by_opt_type(wxString& str, const bool check_value/* = true
|
||||
case coPoints: {
|
||||
std::vector<Vec2d> out_values;
|
||||
str.Replace(" ", wxEmptyString, true);
|
||||
const bool bed_exclusion_volume_syntax = m_opt_id == "bed_exclude_area" && str.Find("..") != wxNOT_FOUND && str.Find(";") != wxNOT_FOUND;
|
||||
const bool bed_exclusion_volume_syntax = m_opt_id == "bed_exclude_area" &&
|
||||
(str.Find("|") != wxNOT_FOUND || (str.Find("..") != wxNOT_FOUND && str.Find(";") != wxNOT_FOUND));
|
||||
const wxString raw_str = str;
|
||||
if (bed_exclusion_volume_syntax) {
|
||||
wxString points;
|
||||
@@ -742,11 +743,9 @@ void Field::get_value_by_opt_type(wxString& str, const bool check_value/* = true
|
||||
while (regions.HasMoreTokens()) {
|
||||
wxString region = regions.GetNextToken();
|
||||
const int sep = region.Find(";");
|
||||
if (sep == wxNOT_FOUND)
|
||||
continue;
|
||||
if (! points.empty())
|
||||
points += ",";
|
||||
points += region.Mid(sep + 1);
|
||||
points += sep == wxNOT_FOUND ? region : region.Mid(sep + 1);
|
||||
}
|
||||
str = points;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user