Limiting the application of Machine Limits

https://github.com/prusa3d/PrusaSlicer/issues/1212

WIP: The hints do not rescale when switching the "usage" combo box.
The new g-code time estimator needs to be updated to not read
the machine limits if not enabled.
This commit is contained in:
bubnikv 2020-10-02 17:31:55 +02:00
parent 0f44caa99c
commit 8df01818dd
11 changed files with 161 additions and 50 deletions

View file

@ -1201,6 +1201,21 @@ void PrintConfigDef::init_fff_params()
def->mode = comExpert;
def->set_default_value(new ConfigOptionBool(true));
def = this->add("machine_limits_usage", coEnum);
def->label = L("How to apply");
def->full_label = L("Purpose of Machine Limits");
def->category = L("Machine limits");
def->tooltip = L("How to apply the Machine Limits");
def->enum_keys_map = &ConfigOptionEnum<MachineLimitsUsage>::get_enum_values();
def->enum_values.push_back("emit_to_gcode");
def->enum_values.push_back("time_estimate_only");
def->enum_values.push_back("ignore");
def->enum_labels.push_back("Emit to G-code");
def->enum_labels.push_back("Use for time estimate");
def->enum_labels.push_back("Ignore");
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionEnum<MachineLimitsUsage>(MachineLimitsUsage::EmitToGCode));
{
struct AxisDefault {
std::string name;