mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-17 05:52:39 +00:00
Part 3.2: decouple axis remapping, enable viewing settings in Developer mode or when Belt mode is active
This commit is contained in:
@@ -3129,26 +3129,26 @@ void GCodeProcessor::process_tags(const std::string_view comment, bool producers
|
||||
try { m_result.belt_scale_z_angle = std::stof(std::string(comment.substr(22))); } catch (...) {} return;
|
||||
}
|
||||
// Pre-slice axis remap
|
||||
auto parse_remap_axis = [](const std::string &s) -> BeltRemapAxis {
|
||||
if (s == "pos_x") return BeltRemapAxis::PosX;
|
||||
if (s == "pos_y") return BeltRemapAxis::PosY;
|
||||
if (s == "pos_z") return BeltRemapAxis::PosZ;
|
||||
if (s == "neg_x") return BeltRemapAxis::NegX;
|
||||
if (s == "neg_y") return BeltRemapAxis::NegY;
|
||||
if (s == "neg_z") return BeltRemapAxis::NegZ;
|
||||
if (s == "rev_x") return BeltRemapAxis::RevX;
|
||||
if (s == "rev_y") return BeltRemapAxis::RevY;
|
||||
if (s == "rev_z") return BeltRemapAxis::RevZ;
|
||||
return BeltRemapAxis::PosX;
|
||||
auto parse_remap_axis = [](const std::string &s) -> RemapAxis {
|
||||
if (s == "pos_x") return RemapAxis::PosX;
|
||||
if (s == "pos_y") return RemapAxis::PosY;
|
||||
if (s == "pos_z") return RemapAxis::PosZ;
|
||||
if (s == "neg_x") return RemapAxis::NegX;
|
||||
if (s == "neg_y") return RemapAxis::NegY;
|
||||
if (s == "neg_z") return RemapAxis::NegZ;
|
||||
if (s == "rev_x") return RemapAxis::RevX;
|
||||
if (s == "rev_y") return RemapAxis::RevY;
|
||||
if (s == "rev_z") return RemapAxis::RevZ;
|
||||
return RemapAxis::PosX;
|
||||
};
|
||||
if (boost::starts_with(comment, " belt_preslice_remap_x = ")) {
|
||||
m_result.belt_preslice_remap_x = parse_remap_axis(trim(std::string(comment.substr(25)))); return;
|
||||
if (boost::starts_with(comment, " preslice_remap_x = ")) {
|
||||
m_result.preslice_remap_x = parse_remap_axis(trim(std::string(comment.substr(25)))); return;
|
||||
}
|
||||
if (boost::starts_with(comment, " belt_preslice_remap_y = ")) {
|
||||
m_result.belt_preslice_remap_y = parse_remap_axis(trim(std::string(comment.substr(25)))); return;
|
||||
if (boost::starts_with(comment, " preslice_remap_y = ")) {
|
||||
m_result.preslice_remap_y = parse_remap_axis(trim(std::string(comment.substr(25)))); return;
|
||||
}
|
||||
if (boost::starts_with(comment, " belt_preslice_remap_z = ")) {
|
||||
m_result.belt_preslice_remap_z = parse_remap_axis(trim(std::string(comment.substr(25)))); return;
|
||||
if (boost::starts_with(comment, " preslice_remap_z = ")) {
|
||||
m_result.preslice_remap_z = parse_remap_axis(trim(std::string(comment.substr(25)))); return;
|
||||
}
|
||||
}
|
||||
// wipe start tag
|
||||
|
||||
Reference in New Issue
Block a user