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:
Harry-Loud authored and Harry Loud committed 2026-09-14 12:27:32 +01:00
1 parent 19a454746a
commit ee593c2d5a
9 files changed
+15 -33

No files matched your search

+3 -4
View File
@@ -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;
}