mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-08-05 01:02:08 +00:00
Merge branch 'main' into feat/plugin-feature
This commit is contained in:
@@ -162,11 +162,14 @@ void Fill::fill_surface_extrusion(const Surface* surface, const FillParams& para
|
||||
out.push_back(eec = new ExtrusionEntityCollection());
|
||||
// Only concentric fills are not sorted.
|
||||
eec->no_sort = this->no_sort();
|
||||
// ORCA: special flag for flow rate calibration
|
||||
auto is_flow_calib = params.extrusion_role == erTopSolidInfill && this->print_object_config->has("calib_flowrate_topinfill_special_order") &&
|
||||
this->print_object_config->option("calib_flowrate_topinfill_special_order")->getBool();
|
||||
// Orca: a forced surface fill order must survive the G-code path planner, which would
|
||||
// otherwise re-chain and possibly reverse the paths. This also covers the flow rate
|
||||
// calibration, which forces an outward fill order on its top surfaces.
|
||||
// otherwise re-chain and possibly reverse the paths. The same applies to the flow rate
|
||||
// calibration's special toolpath order.
|
||||
const bool keep_fill_order = params.fill_order != SurfaceFillOrder::Default;
|
||||
if (keep_fill_order) {
|
||||
if (is_flow_calib || keep_fill_order) {
|
||||
eec->no_sort = true;
|
||||
}
|
||||
size_t idx = eec->entities.size();
|
||||
@@ -181,7 +184,7 @@ void Fill::fill_surface_extrusion(const Surface* surface, const FillParams& para
|
||||
params.extrusion_role,
|
||||
flow_mm3_per_mm, float(flow_width), params.flow.height());
|
||||
}
|
||||
if (!params.can_reverse || keep_fill_order) {
|
||||
if (!params.can_reverse || is_flow_calib || keep_fill_order) {
|
||||
for (size_t i = idx; i < eec->entities.size(); i++)
|
||||
eec->entities[i]->set_reverse();
|
||||
}
|
||||
|
||||
@@ -134,7 +134,34 @@ void FillPlanePath::_fill_surface_single(
|
||||
if (!polylines.empty()) {
|
||||
Polylines chained;
|
||||
if (params.dont_connect() || params.density > 0.5) {
|
||||
if (params.fill_order != SurfaceFillOrder::Default) {
|
||||
// ORCA: special flag for flow rate calibration. The chords chained ahead of the
|
||||
// inside-out center spiral collide with it in opposing directions, raising a
|
||||
// tactile lip that the calibration reads. Only applies while the fill order is
|
||||
// Default, so it can be overridden from the calibration objects.
|
||||
auto is_flow_calib = params.fill_order == SurfaceFillOrder::Default &&
|
||||
params.extrusion_role == erTopSolidInfill &&
|
||||
this->print_object_config->has("calib_flowrate_topinfill_special_order") &&
|
||||
this->print_object_config->option("calib_flowrate_topinfill_special_order")->getBool() &&
|
||||
dynamic_cast<FillArchimedeanChords*>(this);
|
||||
if (is_flow_calib) {
|
||||
// We want the spiral part to be printed inside-out
|
||||
// Find the center spiral line first, by looking for the longest one
|
||||
auto it = std::max_element(polylines.begin(), polylines.end(),
|
||||
[](const Polyline& a, const Polyline& b) { return a.length() < b.length(); });
|
||||
Polyline center_spiral = std::move(*it);
|
||||
|
||||
// Ensure the spiral is printed from inside to out
|
||||
if (center_spiral.first_point().squaredNorm() > center_spiral.last_point().squaredNorm()) {
|
||||
center_spiral.reverse();
|
||||
}
|
||||
|
||||
// Chain the other polylines
|
||||
polylines.erase(it);
|
||||
chained = chain_polylines(std::move(polylines), nullptr);
|
||||
|
||||
// Then add the center spiral back
|
||||
chained.push_back(std::move(center_spiral));
|
||||
} else if (params.fill_order != SurfaceFillOrder::Default) {
|
||||
// Orca: print the fragments in the order they appear along the generated
|
||||
// path, which runs from the center outwards. The Euclidean distance from
|
||||
// the center cannot be used for this: along the Octagram Spiral the radius
|
||||
|
||||
@@ -470,6 +470,8 @@ void Preset::normalize(DynamicPrintConfig &config)
|
||||
continue;
|
||||
if (filament_options_with_variant.find(key) != filament_options_with_variant.end())
|
||||
continue;
|
||||
if (filament_dev_options.find(key) != filament_dev_options.end())
|
||||
continue;
|
||||
auto *opt = config.option(key, false);
|
||||
/*assert(opt != nullptr);
|
||||
assert(opt->is_vector());*/
|
||||
@@ -1310,6 +1312,7 @@ static std::vector<std::string> s_Preset_print_options{
|
||||
"interlocking_depth",
|
||||
"interlocking_boundary_avoidance",
|
||||
"interlocking_beam_width",
|
||||
"calib_flowrate_topinfill_special_order",
|
||||
// Z Anti-Aliasing (ZAA)
|
||||
"zaa_enabled",
|
||||
"zaa_minimize_perimeter_height",
|
||||
@@ -1373,7 +1376,11 @@ static std::vector<std::string> s_Preset_filament_options {/*"filament_colour",
|
||||
"filament_pre_cooling_temperature", "filament_pre_cooling_temperature_nc",
|
||||
"filament_preheat_temperature_delta", "filament_retract_length_nc",
|
||||
"filament_change_length_nc", "filament_prime_volume_nc",
|
||||
"long_retractions_when_ec", "retraction_distances_when_ec"
|
||||
"long_retractions_when_ec", "retraction_distances_when_ec",
|
||||
//ams chamber
|
||||
"filament_dev_ams_drying_ams_limitations", "filament_dev_ams_drying_temperature", "filament_dev_ams_drying_time", "filament_dev_ams_drying_heat_distortion_temperature",
|
||||
"filament_dev_chamber_drying_bed_temperature", "filament_dev_chamber_drying_time",
|
||||
"filament_dev_drying_softening_temperature", "filament_dev_drying_cooling_temperature"
|
||||
};
|
||||
|
||||
static std::vector<std::string> s_Preset_machine_limits_options {
|
||||
@@ -3825,6 +3832,26 @@ void PresetCollection::set_custom_preset_alias(Preset &preset)
|
||||
set_printer_hold_alias(preset.alias, preset);
|
||||
}
|
||||
|
||||
std::string PresetCollection::get_preset_alias(Preset &preset, bool force)
|
||||
{
|
||||
if (!preset.alias.empty())
|
||||
return preset.alias;
|
||||
else
|
||||
set_custom_preset_alias(preset);
|
||||
|
||||
if (!preset.alias.empty() || !force)
|
||||
return preset.alias;
|
||||
|
||||
std::string alias_name;
|
||||
std::string preset_name = preset.name;
|
||||
size_t end_pos = preset_name.find_first_of("@");
|
||||
if (end_pos != std::string::npos) {
|
||||
alias_name = preset_name.substr(0, end_pos);
|
||||
boost::trim_right(alias_name);
|
||||
}
|
||||
return alias_name;
|
||||
}
|
||||
|
||||
void PresetCollection::set_printer_hold_alias(const std::string &alias, Preset &preset, bool remove)
|
||||
{
|
||||
auto compatible_printers = dynamic_cast<ConfigOptionStrings *>(preset.config.option("compatible_printers"));
|
||||
|
||||
@@ -805,6 +805,9 @@ public:
|
||||
std::string path_from_name(const std::string &new_name, bool detach = false) const;
|
||||
std::string path_for_preset(const Preset & preset) const;
|
||||
|
||||
// Get the alias of a preset, setting it if it's empty
|
||||
std::string get_preset_alias(Preset &preset, bool force = false);
|
||||
|
||||
size_t num_default_presets() { return m_num_default_presets; }
|
||||
|
||||
protected:
|
||||
|
||||
@@ -2021,7 +2021,7 @@ void PrintConfigDef::init_fff_params()
|
||||
def = this->add("initial_layer_travel_acceleration", coFloatsOrPercents);
|
||||
def->label = L("First layer travel");
|
||||
def->tooltip = L("Travel acceleration of first layer.\nThe percentage value is relative to Travel Acceleration.");
|
||||
def->sidetext = L("mm/s² or %");
|
||||
def->sidetext = L(u8"mm/s² or %");
|
||||
def->min = 0;
|
||||
def->mode = comAdvanced;
|
||||
def->ratio_over = "travel_acceleration";
|
||||
@@ -2032,7 +2032,7 @@ void PrintConfigDef::init_fff_params()
|
||||
def->label = L("Bridge");
|
||||
def->category = L("Speed");
|
||||
def->tooltip = L("Acceleration of bridges. If the value is expressed as a percentage (e.g. 50%), it will be calculated based on the outer wall acceleration.");
|
||||
def->sidetext = L("mm/s² or %");
|
||||
def->sidetext = L(u8"mm/s² or %");
|
||||
def->min = 0;
|
||||
def->mode = comAdvanced;
|
||||
def->ratio_over = "outer_wall_acceleration";
|
||||
@@ -3456,7 +3456,7 @@ void PrintConfigDef::init_fff_params()
|
||||
def->label = L("Sparse infill");
|
||||
def->category = L("Speed");
|
||||
def->tooltip = L("Acceleration of sparse infill. If the value is expressed as a percentage (e.g. 100%), it will be calculated based on the default acceleration.");
|
||||
def->sidetext = L("mm/s² or %");
|
||||
def->sidetext = L(u8"mm/s² or %");
|
||||
def->min = 0;
|
||||
def->mode = comAdvanced;
|
||||
def->ratio_over = "default_acceleration";
|
||||
@@ -3467,7 +3467,7 @@ void PrintConfigDef::init_fff_params()
|
||||
def->label = L("Internal solid infill");
|
||||
def->category = L("Speed");
|
||||
def->tooltip = L("Acceleration of internal solid infill. If the value is expressed as a percentage (e.g. 100%), it will be calculated based on the default acceleration.");
|
||||
def->sidetext = L("mm/s² or %");
|
||||
def->sidetext = L(u8"mm/s² or %");
|
||||
def->min = 0;
|
||||
def->mode = comAdvanced;
|
||||
def->ratio_over = "default_acceleration";
|
||||
@@ -3923,7 +3923,7 @@ void PrintConfigDef::init_fff_params()
|
||||
"The shift is applied once every number of layers set by Layers between ripple offset, so layers within the same group are printed identically.");
|
||||
def->min = 0;
|
||||
def->max = 100;
|
||||
def->sidetext = ("%");
|
||||
def->sidetext = "%";
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionPercent(50));
|
||||
|
||||
@@ -4131,7 +4131,7 @@ void PrintConfigDef::init_fff_params()
|
||||
"value that the firmware would silently drop, and the fan never receives a value below the one "
|
||||
"you know it can actually spool at."
|
||||
"\nSet to 0 to deactivate.");
|
||||
def->sidetext = L("%");
|
||||
def->sidetext = "%";
|
||||
def->min = 0;
|
||||
def->max = 100;
|
||||
def->mode = comAdvanced;
|
||||
@@ -4651,6 +4651,11 @@ void PrintConfigDef::init_fff_params()
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionInt(2));
|
||||
|
||||
// ORCA: special flag for flow rate calibration
|
||||
def = this->add("calib_flowrate_topinfill_special_order", coBool);
|
||||
def->mode = comDevelop;
|
||||
def->set_default_value(new ConfigOptionBool(false));
|
||||
|
||||
def = this->add("ironing_type", coEnum);
|
||||
def->label = L("Ironing type");
|
||||
def->category = L("Quality");
|
||||
@@ -5081,7 +5086,7 @@ void PrintConfigDef::init_fff_params()
|
||||
def = this->add("input_shaping_freq_x", coFloat);
|
||||
def->label = L("X");
|
||||
def->tooltip = L("Resonant frequency for the X axis input shaper.\nZero will use the firmware frequency.\nTo disable input shaping, use the Disable type.\nRRF: X and Y values are equal.");
|
||||
def->sidetext = "Hz";
|
||||
def->sidetext = L("Hz"); // Hertz, CIS languages need translation
|
||||
def->min = 0;
|
||||
def->max = 1000;
|
||||
def->mode = comExpert;
|
||||
@@ -5090,7 +5095,7 @@ void PrintConfigDef::init_fff_params()
|
||||
def = this->add("input_shaping_freq_y", coFloat);
|
||||
def->label = L("Y");
|
||||
def->tooltip = L("Resonant frequency for the Y axis input shaper.\nZero will use the firmware frequency.\nTo disable input shaping, use the Disable type.");
|
||||
def->sidetext = "Hz";
|
||||
def->sidetext = L("Hz"); // Hertz, CIS languages need translation
|
||||
def->min = 0;
|
||||
def->max = 1000;
|
||||
def->mode = comExpert;
|
||||
@@ -7140,7 +7145,7 @@ void PrintConfigDef::init_fff_params()
|
||||
def->label = L("Minimal");
|
||||
def->tooltip = L("This is the chamber temperature at which printing should start, while the chamber continues heating "
|
||||
"toward the \"Target\" chamber temperature. For example, set the Target to 60 and the Minimal to 50 to "
|
||||
"begin printing once the chamber reaches 50°C, without waiting for the full 60°C.\n\n"
|
||||
"begin printing once the chamber reaches 50℃, without waiting for the full 60℃.\n\n"
|
||||
"It sets a G-code variable named chamber_minimal_temperature, which can be passed to your print start macro "
|
||||
"or a heat soak macro, like this: PRINT_START (other variables) CHAMBER_MIN_TEMP=[chamber_minimal_temperature].\n\n"
|
||||
"Unlike the \"Target\" chamber temperature, this option does not emit any M141/M191 commands; it only exposes "
|
||||
@@ -7817,6 +7822,30 @@ void PrintConfigDef::init_fff_params()
|
||||
def->min = 0;
|
||||
def->set_default_value(new ConfigOptionPercent(85));
|
||||
|
||||
def = this->add("filament_dev_ams_drying_ams_limitations", coStrings);
|
||||
def->set_default_value(new ConfigOptionStrings{""});
|
||||
|
||||
def = this->add("filament_dev_ams_drying_temperature", coFloats);
|
||||
def->set_default_value(new ConfigOptionFloats{0});
|
||||
|
||||
def = this->add("filament_dev_ams_drying_time", coFloats);
|
||||
def->set_default_value(new ConfigOptionFloats{0});
|
||||
|
||||
def = this->add("filament_dev_ams_drying_heat_distortion_temperature", coFloats);
|
||||
def->set_default_value(new ConfigOptionFloats{0});
|
||||
|
||||
def = this->add("filament_dev_chamber_drying_bed_temperature", coFloats);
|
||||
def->set_default_value(new ConfigOptionFloats{0});
|
||||
|
||||
def = this->add("filament_dev_chamber_drying_time", coFloats);
|
||||
def->set_default_value(new ConfigOptionFloats{0});
|
||||
|
||||
def = this->add("filament_dev_drying_softening_temperature", coFloats);
|
||||
def->set_default_value(new ConfigOptionFloats{0});
|
||||
|
||||
def = this->add("filament_dev_drying_cooling_temperature", coFloats);
|
||||
def->set_default_value(new ConfigOptionFloats{0});
|
||||
|
||||
// Declare retract values for filament profile, overriding the printer's extruder profile.
|
||||
for (auto& opt_key : filament_extruder_override_keys) {
|
||||
const std::string filament_prefix = "filament_";
|
||||
@@ -9012,7 +9041,6 @@ void PrintConfigDef::handle_legacy(t_config_option_key &opt_key, std::string &va
|
||||
"internal_bridge_support_thickness", "top_area_threshold", "reduce_wall_solid_infill","filament_load_time","filament_unload_time",
|
||||
"smooth_coefficient", "overhang_totally_speed", "silent_mode",
|
||||
"overhang_speed_classic", "filament_prime_volume",
|
||||
"calib_flowrate_topinfill_special_order",
|
||||
"anisotropic_surfaces", // superseded by top_surface_fill_order / bottom_surface_fill_order
|
||||
};
|
||||
|
||||
@@ -9252,6 +9280,17 @@ std::set<std::string> printer_options_with_variant_2 = {
|
||||
|
||||
std::set<std::string> empty_options;
|
||||
|
||||
std::set<std::string> filament_dev_options = {
|
||||
"filament_dev_ams_drying_ams_limitations",
|
||||
"filament_dev_ams_drying_temperature",
|
||||
"filament_dev_ams_drying_time",
|
||||
"filament_dev_ams_drying_heat_distortion_temperature",
|
||||
"filament_dev_chamber_drying_bed_temperature",
|
||||
"filament_dev_chamber_drying_time",
|
||||
"filament_dev_drying_softening_temperature",
|
||||
"filament_dev_drying_cooling_temperature"
|
||||
};
|
||||
|
||||
DynamicPrintConfig DynamicPrintConfig::full_print_config()
|
||||
{
|
||||
return DynamicPrintConfig((const PrintRegionConfig&)FullPrintConfig::defaults());
|
||||
|
||||
@@ -840,6 +840,8 @@ extern std::set<std::string> printer_options_with_variant_1;
|
||||
extern std::set<std::string> printer_options_with_variant_2;
|
||||
extern std::set<std::string> empty_options;
|
||||
|
||||
extern std::set<std::string> filament_dev_options;
|
||||
|
||||
extern void update_static_print_config_from_dynamic(ConfigBase& config, const DynamicPrintConfig& dest_config, std::vector<int> variant_index, std::set<std::string>& key_set1, int stride = 1);
|
||||
extern void compute_filament_override_value(const std::string& opt_key, const ConfigOption *opt_old_machine, const ConfigOption *opt_new_machine, const ConfigOption *opt_new_filament, const DynamicPrintConfig& new_full_config,
|
||||
t_config_option_keys& diff_keys, DynamicPrintConfig& filament_overrides, std::vector<int>& f_map_indices);
|
||||
@@ -1219,6 +1221,9 @@ PRINT_CONFIG_CLASS_DEFINE(
|
||||
((ConfigOptionInt, interlocking_beam_layer_count))
|
||||
((ConfigOptionInt, interlocking_depth))
|
||||
((ConfigOptionInt, interlocking_boundary_avoidance))
|
||||
|
||||
// Orca: internal use only
|
||||
((ConfigOptionBool, calib_flowrate_topinfill_special_order)) // ORCA: special flag for flow rate calibration
|
||||
)
|
||||
|
||||
// This object is mapped to Perl as Slic3r::Config::PrintRegion.
|
||||
@@ -1678,6 +1683,16 @@ PRINT_CONFIG_CLASS_DEFINE(
|
||||
// Printer flag: whether the printer offers the fast-purge mode selector.
|
||||
// Default false; no shipping profile sets it, so the fast-purge UI stays hidden.
|
||||
((ConfigOptionBool, support_fast_purge_mode))
|
||||
|
||||
//ams chamber
|
||||
((ConfigOptionStrings, filament_dev_ams_drying_ams_limitations))
|
||||
((ConfigOptionFloats, filament_dev_ams_drying_temperature))
|
||||
((ConfigOptionFloats, filament_dev_ams_drying_time))
|
||||
((ConfigOptionFloats, filament_dev_ams_drying_heat_distortion_temperature))
|
||||
((ConfigOptionFloats, filament_dev_chamber_drying_bed_temperature))
|
||||
((ConfigOptionFloats, filament_dev_chamber_drying_time))
|
||||
((ConfigOptionFloats, filament_dev_drying_softening_temperature))
|
||||
((ConfigOptionFloats, filament_dev_drying_cooling_temperature))
|
||||
)
|
||||
|
||||
// This object is mapped to Perl as Slic3r::Config::Print.
|
||||
|
||||
Reference in New Issue
Block a user