mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-16 07:22:10 +00:00
Clean Up Settings Interface, Update Generic Profile (#22)
* clean up UI elements * further cleaning * final cleanup for first round of settings UI streamlining * update generic belt printer settings * fix generic again
This commit is contained in:
@@ -6305,7 +6305,7 @@ void PrintConfigDef::init_fff_params()
|
||||
def->sidetext = u8"\u00B0";
|
||||
def->min = -90;
|
||||
def->max = 90;
|
||||
def->mode = comAdvanced;
|
||||
def->mode = comExpert;
|
||||
def->set_default_value(new ConfigOptionFloat(0.));
|
||||
|
||||
def = this->add("build_plate_tilt_y", coFloat);
|
||||
@@ -6317,11 +6317,11 @@ void PrintConfigDef::init_fff_params()
|
||||
def->sidetext = u8"\u00B0";
|
||||
def->min = -90;
|
||||
def->max = 90;
|
||||
def->mode = comAdvanced;
|
||||
def->mode = comExpert;
|
||||
def->set_default_value(new ConfigOptionFloat(0.));
|
||||
|
||||
def = this->add("belt_printer", coBool);
|
||||
def->label = L("Belt printer");
|
||||
def->label = L("Enable belt printing");
|
||||
def->category = L("Printable space");
|
||||
def->tooltip = L("Enable belt printer mode. Belt printers use a conveyor belt as the build surface, "
|
||||
"tilted at an angle (typically 45 degrees). The slicer will rotate the slicing plane "
|
||||
@@ -6351,7 +6351,8 @@ void PrintConfigDef::init_fff_params()
|
||||
def->set_default_value(new ConfigOptionBool(true));
|
||||
|
||||
// Per-axis shear controls for belt printer
|
||||
auto add_belt_shear_mode = [this](const char *key, const char *label, BeltShearMode default_mode) {
|
||||
auto add_belt_shear_mode = [this](const char *key, const char *label, BeltShearMode default_mode,
|
||||
ConfigOptionMode mode = comAdvanced) {
|
||||
auto def = this->add(key, coEnum);
|
||||
def->label = L(label);
|
||||
def->category = L("Printable space");
|
||||
@@ -6359,10 +6360,11 @@ void PrintConfigDef::init_fff_params()
|
||||
def->enum_keys_map = &ConfigOptionEnum<BeltShearMode>::get_enum_values();
|
||||
def->enum_values = {"none", "pos_cot", "neg_cot", "pos_tan", "neg_tan"};
|
||||
def->enum_labels = {L("None"), L("+cot(α)"), L("-cot(α)"), L("+tan(α)"), L("-tan(α)")};
|
||||
def->mode = comAdvanced;
|
||||
def->mode = mode;
|
||||
def->set_default_value(new ConfigOptionEnum<BeltShearMode>(default_mode));
|
||||
};
|
||||
auto add_belt_shear_angle = [this](const char *key, const char *label) {
|
||||
auto add_belt_shear_angle = [this](const char *key, const char *label,
|
||||
ConfigOptionMode mode = comAdvanced) {
|
||||
auto def = this->add(key, coFloat);
|
||||
def->label = L(label);
|
||||
def->category = L("Printable space");
|
||||
@@ -6370,10 +6372,11 @@ void PrintConfigDef::init_fff_params()
|
||||
def->sidetext = L("°");
|
||||
def->min = 0.1;
|
||||
def->max = 89.9;
|
||||
def->mode = comAdvanced;
|
||||
def->mode = mode;
|
||||
def->set_default_value(new ConfigOptionFloat(45));
|
||||
};
|
||||
auto add_belt_axis_enum = [this](const char *key, const char *label, const char *tooltip, BeltAxis default_axis) {
|
||||
auto add_belt_axis_enum = [this](const char *key, const char *label, const char *tooltip,
|
||||
BeltAxis default_axis, ConfigOptionMode mode = comAdvanced) {
|
||||
auto def = this->add(key, coEnum);
|
||||
def->label = L(label);
|
||||
def->category = L("Printable space");
|
||||
@@ -6381,7 +6384,7 @@ void PrintConfigDef::init_fff_params()
|
||||
def->enum_keys_map = &ConfigOptionEnum<BeltAxis>::get_enum_values();
|
||||
def->enum_values = {"x", "y", "z"};
|
||||
def->enum_labels = {L("X"), L("Y"), L("Z")};
|
||||
def->mode = comAdvanced;
|
||||
def->mode = mode;
|
||||
def->set_default_value(new ConfigOptionEnum<BeltAxis>(default_axis));
|
||||
};
|
||||
|
||||
@@ -6390,27 +6393,28 @@ void PrintConfigDef::init_fff_params()
|
||||
def->label = L(label);
|
||||
def->category = L("Printable space");
|
||||
def->tooltip = L("Apply shear in global coordinates (position-aware) rather than object-local coordinates.");
|
||||
def->mode = comAdvanced;
|
||||
def->mode = comExpert;
|
||||
def->set_default_value(new ConfigOptionBool(default_val));
|
||||
};
|
||||
|
||||
add_belt_shear_mode("belt_shear_x", "Function", BeltShearMode::None);
|
||||
add_belt_shear_angle("belt_shear_x_angle", "Angle");
|
||||
add_belt_axis_enum("belt_shear_x_from", "From", "Source axis for X shear.", BeltAxis::Z);
|
||||
add_belt_shear_mode ("belt_shear_x", "Function", BeltShearMode::None, comExpert);
|
||||
add_belt_shear_angle("belt_shear_x_angle", "Angle", comExpert);
|
||||
add_belt_axis_enum ("belt_shear_x_from", "From", "Source axis for X shear.", BeltAxis::Z, comExpert);
|
||||
add_belt_shear_global("belt_shear_x_global", "Global");
|
||||
|
||||
add_belt_shear_mode("belt_shear_y", "Function", BeltShearMode::None);
|
||||
add_belt_shear_angle("belt_shear_y_angle", "Angle");
|
||||
add_belt_axis_enum("belt_shear_y_from", "From", "Source axis for Y shear.", BeltAxis::Z);
|
||||
add_belt_shear_mode ("belt_shear_y", "Function", BeltShearMode::None, comExpert);
|
||||
add_belt_shear_angle("belt_shear_y_angle", "Angle", comExpert);
|
||||
add_belt_axis_enum ("belt_shear_y_from", "From", "Source axis for Y shear.", BeltAxis::Z, comExpert);
|
||||
add_belt_shear_global("belt_shear_y_global", "Global");
|
||||
|
||||
add_belt_shear_mode("belt_shear_z", "Function", BeltShearMode::PosTan);
|
||||
add_belt_shear_mode ("belt_shear_z", "Function", BeltShearMode::PosTan);
|
||||
add_belt_shear_angle("belt_shear_z_angle", "Angle");
|
||||
add_belt_axis_enum("belt_shear_z_from", "From", "Source axis for Z shear.", BeltAxis::Y);
|
||||
add_belt_axis_enum ("belt_shear_z_from", "From", "Source axis for Z shear.", BeltAxis::Y);
|
||||
add_belt_shear_global("belt_shear_z_global", "Global", true);
|
||||
|
||||
// Per-axis scale controls for belt printer
|
||||
auto add_belt_scale_mode = [this](const char *key, const char *label, BeltScaleMode default_mode) {
|
||||
auto add_belt_scale_mode = [this](const char *key, const char *label, BeltScaleMode default_mode,
|
||||
ConfigOptionMode mode = comAdvanced) {
|
||||
auto def = this->add(key, coEnum);
|
||||
def->label = L(label);
|
||||
def->category = L("Printable space");
|
||||
@@ -6418,10 +6422,11 @@ void PrintConfigDef::init_fff_params()
|
||||
def->enum_keys_map = &ConfigOptionEnum<BeltScaleMode>::get_enum_values();
|
||||
def->enum_values = {"none", "inv_sin", "inv_cos", "sin", "cos"};
|
||||
def->enum_labels = {L("None"), L("1/sin(α)"), L("1/cos(α)"), L("sin(α)"), L("cos(α)")};
|
||||
def->mode = comAdvanced;
|
||||
def->mode = mode;
|
||||
def->set_default_value(new ConfigOptionEnum<BeltScaleMode>(default_mode));
|
||||
};
|
||||
auto add_belt_scale_angle = [this](const char *key, const char *label) {
|
||||
auto add_belt_scale_angle = [this](const char *key, const char *label,
|
||||
ConfigOptionMode mode = comAdvanced) {
|
||||
auto def = this->add(key, coFloat);
|
||||
def->label = L(label);
|
||||
def->category = L("Printable space");
|
||||
@@ -6429,18 +6434,18 @@ void PrintConfigDef::init_fff_params()
|
||||
def->sidetext = L("°");
|
||||
def->min = 0.1;
|
||||
def->max = 89.9;
|
||||
def->mode = comAdvanced;
|
||||
def->mode = mode;
|
||||
def->set_default_value(new ConfigOptionFloat(45));
|
||||
};
|
||||
|
||||
add_belt_scale_mode("belt_scale_x", "Function", BeltScaleMode::None);
|
||||
add_belt_scale_angle("belt_scale_x_angle", "Angle");
|
||||
add_belt_scale_mode ("belt_scale_x", "Function", BeltScaleMode::None, comExpert);
|
||||
add_belt_scale_angle("belt_scale_x_angle", "Angle", comExpert);
|
||||
|
||||
add_belt_scale_mode("belt_scale_y", "Function", BeltScaleMode::None);
|
||||
add_belt_scale_mode ("belt_scale_y", "Function", BeltScaleMode::None);
|
||||
add_belt_scale_angle("belt_scale_y_angle", "Angle");
|
||||
|
||||
add_belt_scale_mode("belt_scale_z", "Function", BeltScaleMode::None);
|
||||
add_belt_scale_angle("belt_scale_z_angle", "Angle");
|
||||
add_belt_scale_mode ("belt_scale_z", "Function", BeltScaleMode::None, comExpert);
|
||||
add_belt_scale_angle("belt_scale_z_angle", "Angle", comExpert);
|
||||
|
||||
auto add_belt_transform_order = [this](const char *key, const char *label, const char *tooltip) {
|
||||
auto def = this->add(key, coEnum);
|
||||
@@ -6450,8 +6455,8 @@ void PrintConfigDef::init_fff_params()
|
||||
def->enum_keys_map = &ConfigOptionEnum<BeltTransformOrder>::get_enum_values();
|
||||
def->enum_values = {"scale_then_shear", "shear_then_scale"};
|
||||
def->enum_labels = {L("Scale, then shear"), L("Shear, then scale")};
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionEnum<BeltTransformOrder>(BeltTransformOrder::ScaleThenShear));
|
||||
def->mode = comExpert;
|
||||
def->set_default_value(new ConfigOptionEnum<BeltTransformOrder>(BeltTransformOrder::ShearThenScale));
|
||||
};
|
||||
|
||||
add_belt_transform_order("belt_mesh_transform_order", "Mesh transform order",
|
||||
@@ -6461,7 +6466,8 @@ void PrintConfigDef::init_fff_params()
|
||||
"follows the same order so that it correctly inverts the mesh transform.");
|
||||
|
||||
// G-code axis remap with sign
|
||||
auto add_belt_remap = [this](const char *key, const char *label, const char *tooltip, RemapAxis default_axis) {
|
||||
auto add_belt_remap = [this](const char *key, const char *label, const char *tooltip,
|
||||
RemapAxis default_axis, ConfigOptionMode mode = comSimple) {
|
||||
auto def = this->add(key, coEnum);
|
||||
def->label = L(label);
|
||||
def->category = L("Printable space");
|
||||
@@ -6469,7 +6475,7 @@ void PrintConfigDef::init_fff_params()
|
||||
def->enum_keys_map = &ConfigOptionEnum<RemapAxis>::get_enum_values();
|
||||
def->enum_values = {"pos_x", "pos_y", "pos_z", "neg_x", "neg_y", "neg_z", "rev_x", "rev_y", "rev_z"};
|
||||
def->enum_labels = {L("+X"), L("+Y"), L("+Z"), L("-X"), L("-Y"), L("-Z"), L("Rev X"), L("Rev Y"), L("Rev Z")};
|
||||
def->mode = comSimple; // Visibility controlled by toggle_line in Tab.cpp
|
||||
def->mode = mode; // Visibility may also be gated by toggle_line in Tab.cpp
|
||||
def->set_default_value(new ConfigOptionEnum<RemapAxis>(default_axis));
|
||||
};
|
||||
|
||||
@@ -6479,19 +6485,19 @@ void PrintConfigDef::init_fff_params()
|
||||
"your belt printer's physical bed plane. For a printer whose bed is in the XZ plane, "
|
||||
"set Y to +Z and Z to +Y (or -Y) to swap the vertical and belt-travel axes. "
|
||||
"Default +X: no change.",
|
||||
RemapAxis::PosX);
|
||||
RemapAxis::PosX, comExpert);
|
||||
add_belt_remap("preslice_remap_y", "Y",
|
||||
"Before slicing, which model-space axis becomes the slicer's Y axis. "
|
||||
"The slicer treats Y as one of the two horizontal bed axes. If your physical "
|
||||
"belt surface runs along the Z axis, map Y to +Z here so the slicer slices "
|
||||
"along the correct plane. Default +Y: no change.",
|
||||
RemapAxis::PosY);
|
||||
RemapAxis::PosY, comExpert);
|
||||
add_belt_remap("preslice_remap_z", "Z",
|
||||
"Before slicing, which model-space axis becomes the slicer's Z axis (layer stacking direction). "
|
||||
"The slicer builds layers upward along this axis. If your printer's layer-stacking "
|
||||
"direction is the physical Y axis, map Z to +Y (or -Y for inverted direction). "
|
||||
"Rev mode mirrors relative to the build volume maximum. Default +Z: no change.",
|
||||
RemapAxis::PosZ);
|
||||
RemapAxis::PosZ, comExpert);
|
||||
|
||||
def = this->add("preslice_remap_global", coBool);
|
||||
def->label = L("Global");
|
||||
@@ -6500,35 +6506,35 @@ void PrintConfigDef::init_fff_params()
|
||||
"Without this, the remap is applied locally around each object's center, so "
|
||||
"objects at different positions don't get a position-dependent contribution. "
|
||||
"Mirrors the per-axis 'Global' option on belt mesh shears, but for the remap.");
|
||||
def->mode = comAdvanced;
|
||||
def->mode = comExpert;
|
||||
def->set_default_value(new ConfigOptionBool(false));
|
||||
|
||||
add_belt_remap("gcode_remap_x", "X", "Which slicing axis maps to machine X in G-code output. Applied AFTER slicing, during G-code generation.", RemapAxis::PosX);
|
||||
add_belt_remap("gcode_remap_y", "Y", "Which slicing axis maps to machine Y in G-code output. Applied AFTER slicing, during G-code generation.", RemapAxis::PosY);
|
||||
add_belt_remap("gcode_remap_z", "Z", "Which slicing axis maps to machine Z in G-code output. Applied AFTER slicing, during G-code generation.", RemapAxis::PosZ);
|
||||
add_belt_remap("gcode_remap_x", "X", "Which slicing axis maps to machine X in G-code output. Applied AFTER slicing, during G-code generation.", RemapAxis::PosX, comExpert);
|
||||
add_belt_remap("gcode_remap_y", "Y", "Which slicing axis maps to machine Y in G-code output. Applied AFTER slicing, during G-code generation.", RemapAxis::PosY, comExpert);
|
||||
add_belt_remap("gcode_remap_z", "Z", "Which slicing axis maps to machine Z in G-code output. Applied AFTER slicing, during G-code generation.", RemapAxis::PosZ, comExpert);
|
||||
|
||||
// Machine-frame G-code transforms: applied AFTER back-transform and gcode_remap,
|
||||
// before per-axis origin snap. Maps Cartesian G-code to the printer's physical machine frame.
|
||||
add_belt_shear_mode ("gcode_shear_x", "Function", BeltShearMode::None);
|
||||
add_belt_shear_angle("gcode_shear_x_angle", "Angle");
|
||||
add_belt_axis_enum ("gcode_shear_x_from", "From", "Source axis for X shear in the machine-frame stage.", BeltAxis::Z);
|
||||
add_belt_shear_mode ("gcode_shear_x", "Function", BeltShearMode::None, comExpert);
|
||||
add_belt_shear_angle("gcode_shear_x_angle", "Angle", comExpert);
|
||||
add_belt_axis_enum ("gcode_shear_x_from", "From", "Source axis for X shear in the machine-frame stage.", BeltAxis::Z, comExpert);
|
||||
|
||||
add_belt_shear_mode ("gcode_shear_y", "Function", BeltShearMode::None);
|
||||
add_belt_shear_angle("gcode_shear_y_angle", "Angle");
|
||||
add_belt_axis_enum ("gcode_shear_y_from", "From", "Source axis for Y shear in the machine-frame stage.", BeltAxis::Z);
|
||||
add_belt_shear_mode ("gcode_shear_y", "Function", BeltShearMode::None, comExpert);
|
||||
add_belt_shear_angle("gcode_shear_y_angle", "Angle", comExpert);
|
||||
add_belt_axis_enum ("gcode_shear_y_from", "From", "Source axis for Y shear in the machine-frame stage.", BeltAxis::Z, comExpert);
|
||||
|
||||
add_belt_shear_mode ("gcode_shear_z", "Function", BeltShearMode::None);
|
||||
add_belt_shear_angle("gcode_shear_z_angle", "Angle");
|
||||
add_belt_axis_enum ("gcode_shear_z_from", "From", "Source axis for Z shear in the machine-frame stage.", BeltAxis::Y);
|
||||
|
||||
add_belt_scale_mode ("gcode_scale_x", "Function", BeltScaleMode::None);
|
||||
add_belt_scale_angle("gcode_scale_x_angle", "Angle");
|
||||
add_belt_scale_mode ("gcode_scale_x", "Function", BeltScaleMode::None, comExpert);
|
||||
add_belt_scale_angle("gcode_scale_x_angle", "Angle", comExpert);
|
||||
|
||||
add_belt_scale_mode ("gcode_scale_y", "Function", BeltScaleMode::None);
|
||||
add_belt_scale_angle("gcode_scale_y_angle", "Angle");
|
||||
|
||||
add_belt_scale_mode ("gcode_scale_z", "Function", BeltScaleMode::None);
|
||||
add_belt_scale_angle("gcode_scale_z_angle", "Angle");
|
||||
add_belt_scale_mode ("gcode_scale_z", "Function", BeltScaleMode::None, comExpert);
|
||||
add_belt_scale_angle("gcode_scale_z_angle", "Angle", comExpert);
|
||||
|
||||
add_belt_transform_order("belt_gcode_transform_order", "G-code transform order",
|
||||
"Order in which the machine-frame shear and scale matrices are composed when "
|
||||
@@ -6554,8 +6560,8 @@ void PrintConfigDef::init_fff_params()
|
||||
def->tooltip = L("Reverse the shear/scale transform applied during slicing so G-code "
|
||||
"coordinates are in the machine's physical coordinate space. "
|
||||
"Requires at least one shear axis with global mode enabled.");
|
||||
def->mode = comSimple; // Visibility controlled by toggle_line in Tab.cpp
|
||||
def->set_default_value(new ConfigOptionBool(false));
|
||||
def->mode = comExpert;
|
||||
def->set_default_value(new ConfigOptionBool(true));
|
||||
|
||||
def = this->add("belt_preslice_global", coBool);
|
||||
def->label = L("Global mesh transforms");
|
||||
@@ -6563,8 +6569,8 @@ void PrintConfigDef::init_fff_params()
|
||||
def->tooltip = L("When enabled, pre-slice belt transforms (remap, shear, scale) account for "
|
||||
"each object's bed position, producing correct machine coordinates without "
|
||||
"relying on origin snap. Each instance gets its own PrintObject.");
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionBool(false));
|
||||
def->mode = comExpert;
|
||||
def->set_default_value(new ConfigOptionBool(true));
|
||||
|
||||
// First-layer plane: which surface defines "first layer" for fan / speed /
|
||||
// accel decisions. On belt printers the slicing-frame layer 0 is a tilted
|
||||
@@ -6583,11 +6589,11 @@ void PrintConfigDef::init_fff_params()
|
||||
def->enum_keys_map = &ConfigOptionEnum<FirstLayerPlaneMode>::get_enum_values();
|
||||
def->enum_values = {"auto", "xy", "yz", "xz", "belt_shear"};
|
||||
def->enum_labels = {L("Auto"), L("XY (machine bed)"), L("YZ"), L("XZ"), L("Belt shear plane")};
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionEnum<FirstLayerPlaneMode>(FirstLayerPlaneMode::Auto));
|
||||
def->mode = comExpert;
|
||||
def->set_default_value(new ConfigOptionEnum<FirstLayerPlaneMode>(FirstLayerPlaneMode::BeltShear));
|
||||
|
||||
def = this->add("first_layer_plane_offset", coFloat);
|
||||
def->label = L("Plane offset");
|
||||
def->label = L("Belt plane offset");
|
||||
def->category = L("Printable space");
|
||||
def->tooltip = L("Shifts the first-layer plane along its normal (mm). For axis-aligned "
|
||||
"planes this is just a coordinate shift. Positive values move the plane "
|
||||
@@ -6619,7 +6625,7 @@ void PrintConfigDef::init_fff_params()
|
||||
std::string tip = std::string("Shift G-code output so the object's bounding box minimum on machine ")
|
||||
+ axis_label + " equals the offset value.";
|
||||
def->tooltip = L(tip);
|
||||
def->mode = comAdvanced;
|
||||
def->mode = comExpert;
|
||||
def->set_default_value(new ConfigOptionBool(false));
|
||||
|
||||
def = this->add(key_offset, coFloat);
|
||||
@@ -6629,7 +6635,7 @@ void PrintConfigDef::init_fff_params()
|
||||
def->sidetext = L("mm");
|
||||
def->min = -10000;
|
||||
def->max = 10000;
|
||||
def->mode = comAdvanced;
|
||||
def->mode = comExpert;
|
||||
def->set_default_value(new ConfigOptionFloat(0));
|
||||
};
|
||||
add_belt_origin_snap("belt_origin_snap_x", "belt_origin_offset_x", "X");
|
||||
@@ -6638,7 +6644,7 @@ void PrintConfigDef::init_fff_params()
|
||||
|
||||
// Belt support floor debug controls
|
||||
def = this->add("belt_support_floor_offset", coFloat);
|
||||
def->label = L("Floor Z offset");
|
||||
def->label = L("Support Floor Z offset");
|
||||
def->category = L("Printable space");
|
||||
def->tooltip = L("Shifts the computed belt floor up or down (mm). Negative values lower the floor, allowing more supports to survive. Use this to diagnose belt floor formula issues.");
|
||||
def->sidetext = L("mm");
|
||||
@@ -6656,7 +6662,7 @@ void PrintConfigDef::init_fff_params()
|
||||
def->enum_keys_map = &ConfigOptionEnum<BeltSupportFloorMode>::get_enum_values();
|
||||
def->enum_values = {"none", "generator_only"};
|
||||
def->enum_labels = {L("None"), L("Generator only")};
|
||||
def->mode = comAdvanced;
|
||||
def->mode = comDevelop;
|
||||
def->set_default_value(new ConfigOptionEnum<BeltSupportFloorMode>(BeltSupportFloorMode::GeneratorOnly));
|
||||
}
|
||||
|
||||
@@ -6669,7 +6675,7 @@ void PrintConfigDef::init_fff_params()
|
||||
def->enum_keys_map = &ConfigOptionEnum<BeltSupportZOffsetMode>::get_enum_values();
|
||||
def->enum_values = {"none", "unconditional", "raft_only"};
|
||||
def->enum_labels = {L("None"), L("Unconditional"), L("Raft only")};
|
||||
def->mode = comAdvanced;
|
||||
def->mode = comExpert;
|
||||
def->set_default_value(new ConfigOptionEnum<BeltSupportZOffsetMode>(BeltSupportZOffsetMode::Unconditional));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user