Initial attempt to make speed configs multi-variant

Co-authored-by: chunmao.guo <chunmao.guo@bambulab.com>
Co-authored-by: zhimin.zeng <zhimin.zeng@bambulab.com>
Co-authored-by: qing.zhang <qing.zhang@bambulab.com>
This commit is contained in:
Noisyfox
2026-05-21 09:04:27 +08:00
co-authored by chunmao.guo zhimin.zeng qing.zhang
parent e87b0d57b4
commit 1c8c7820c8
22 changed files with 648 additions and 512 deletions
+26
View File
@@ -685,6 +685,32 @@ bool ConfigBase::set_deserialize_raw(const t_config_option_key &opt_key_src, con
return success; return success;
} }
double ConfigBase::get_abs_value_at(const t_config_option_key &opt_key, size_t index) const
{
const ConfigOption *raw_opt = this->option(opt_key);
assert(raw_opt != nullptr);
if (raw_opt->type() == coFloats) {
return static_cast<const ConfigOptionFloats*>(raw_opt)->get_at(index);
}
if (raw_opt->type() == coFloatsOrPercents) {
const ConfigDef *def = this->def();
if (def == nullptr) throw NoDefinitionException(opt_key);
const ConfigOptionDef *opt_def = def->get(opt_key);
assert(opt_def != nullptr);
if (opt_def->ratio_over.empty()) {
return 0;
} else {
const ConfigOption *ratio_opt = this->option(opt_def->ratio_over);
assert(ratio_opt->type() == coFloats);
const ConfigOptionFloats *ratio_values = static_cast<const ConfigOptionFloats *>(ratio_opt);
return static_cast<const ConfigOptionFloatsOrPercents *>(raw_opt)->get_at(index).get_abs_value(ratio_values->get_at(index));
}
}
throw ConfigurationError("ConfigBase::get_abs_value_at(): Not a valid option type for get_abs_value_at()");
}
// Return an absolute value of a possibly relative config variable. // Return an absolute value of a possibly relative config variable.
// For example, return absolute infill extrusion width, either from an absolute value, or relative to the layer height. // For example, return absolute infill extrusion width, either from an absolute value, or relative to the layer height.
double ConfigBase::get_abs_value(const t_config_option_key &opt_key) const double ConfigBase::get_abs_value(const t_config_option_key &opt_key) const
+9 -2
View File
@@ -30,8 +30,14 @@
namespace Slic3r { namespace Slic3r {
struct FloatOrPercent struct FloatOrPercent
{ {
double value; double value = 0;
bool percent; bool percent = false;
FloatOrPercent() {}
FloatOrPercent(double value_, bool percent_) : value(value_), percent(percent_) { }
double get_abs_value(double ratio_over) const { return this->percent ? (ratio_over * this->value / 100) : this->value; }
private: private:
friend class cereal::access; friend class cereal::access;
template<class Archive> void serialize(Archive& ar) { ar(this->value); ar(this->percent); } template<class Archive> void serialize(Archive& ar) { ar(this->value); ar(this->percent); }
@@ -2726,6 +2732,7 @@ public:
void set_deserialize_strict(std::initializer_list<SetDeserializeItem> items) void set_deserialize_strict(std::initializer_list<SetDeserializeItem> items)
{ ConfigSubstitutionContext ctxt{ ForwardCompatibilitySubstitutionRule::Disable }; this->set_deserialize(items, ctxt); } { ConfigSubstitutionContext ctxt{ ForwardCompatibilitySubstitutionRule::Disable }; this->set_deserialize(items, ctxt); }
double get_abs_value_at(const t_config_option_key &opt_key, size_t index) const;
double get_abs_value(const t_config_option_key &opt_key) const; double get_abs_value(const t_config_option_key &opt_key) const;
double get_abs_value(const t_config_option_key &opt_key, double ratio_over) const; double get_abs_value(const t_config_option_key &opt_key, double ratio_over) const;
void setenv_() const; void setenv_() const;
+3 -3
View File
@@ -957,11 +957,11 @@ std::vector<SurfaceFill> group_fills(const Layer &layer, LockRegionParam &lock_p
// record speed params // record speed params
if (!params.bridge) { if (!params.bridge) {
if (params.extrusion_role == erInternalInfill) if (params.extrusion_role == erInternalInfill)
params.sparse_infill_speed = region_config.sparse_infill_speed; params.sparse_infill_speed = region_config.sparse_infill_speed.get_at(layer.get_extruder_id(params.extruder));
else if (params.extrusion_role == erTopSolidInfill) { else if (params.extrusion_role == erTopSolidInfill) {
params.top_surface_speed = region_config.top_surface_speed; params.top_surface_speed = region_config.top_surface_speed.get_at(layer.get_extruder_id(params.extruder));
} else if (params.extrusion_role == erSolidInfill) } else if (params.extrusion_role == erSolidInfill)
params.solid_infill_speed = region_config.internal_solid_infill_speed; params.solid_infill_speed = region_config.internal_solid_infill_speed.get_at(layer.get_extruder_id(params.extruder));
} }
// Calculate flow spacing for infill pattern generation. // Calculate flow spacing for infill pattern generation.
if (surface.is_solid() || is_bridge) { if (surface.is_solid() || is_bridge) {
+117 -116
View File
@@ -515,7 +515,7 @@ static std::vector<Vec2d> get_path_of_change_filament(const Print& print)
outer_wall_line_width = default_line_width == 0.0 ? filament_diameter : default_line_width; outer_wall_line_width = default_line_width == 0.0 ? filament_diameter : default_line_width;
} }
Flow outer_wall_flow = Flow(outer_wall_line_width, config.layer_height, config.nozzle_diameter.get_at(extruder_id)); Flow outer_wall_flow = Flow(outer_wall_line_width, config.layer_height, config.nozzle_diameter.get_at(extruder_id));
float outer_wall_speed = print.default_region_config().outer_wall_speed.value; float outer_wall_speed = print.default_region_config().outer_wall_speed.get_at(extruder_id);
outer_wall_volumetric_speed = outer_wall_speed * outer_wall_flow.mm3_per_mm(); outer_wall_volumetric_speed = outer_wall_speed * outer_wall_flow.mm3_per_mm();
if (outer_wall_volumetric_speed > filament_max_volumetric_speed) if (outer_wall_volumetric_speed > filament_max_volumetric_speed)
outer_wall_volumetric_speed = filament_max_volumetric_speed; outer_wall_volumetric_speed = filament_max_volumetric_speed;
@@ -1602,6 +1602,7 @@ static std::vector<Vec2d> get_path_of_change_filament(const Print& print)
#define EXTRUDER_CONFIG(OPT) m_config.OPT.get_at(m_writer.filament()->extruder_id()) #define EXTRUDER_CONFIG(OPT) m_config.OPT.get_at(m_writer.filament()->extruder_id())
#define FILAMENT_CONFIG(OPT) m_config.OPT.get_at(m_writer.filament()->id()) #define FILAMENT_CONFIG(OPT) m_config.OPT.get_at(m_writer.filament()->id())
#define NOZZLE_CONFIG(OPT) m_config.OPT.get_at(cur_extruder_index())
void GCode::PlaceholderParserIntegration::reset() void GCode::PlaceholderParserIntegration::reset()
{ {
@@ -2772,11 +2773,11 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
print.throw_if_canceled(); print.throw_if_canceled();
m_cooling_buffer = make_unique<CoolingBuffer>(*this);
m_cooling_buffer->set_current_extruder(initial_extruder_id);
int extruder_id = get_extruder_id(initial_extruder_id); int extruder_id = get_extruder_id(initial_extruder_id);
m_cooling_buffer = make_unique<CoolingBuffer>(*this);
m_cooling_buffer->set_current_extruder(initial_extruder_id, extruder_id);
// Orca: Initialise AdaptivePA processor filter // Orca: Initialise AdaptivePA processor filter
m_pa_processor = std::make_unique<AdaptivePAProcessor>(*this, tool_ordering.all_extruders()); m_pa_processor = std::make_unique<AdaptivePAProcessor>(*this, tool_ordering.all_extruders());
@@ -3199,12 +3200,12 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
if (print.calib_params().mode == CalibMode::Calib_PA_Line) { if (print.calib_params().mode == CalibMode::Calib_PA_Line) {
std::string gcode; std::string gcode;
gcode += ";" + GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Layer_Change) + "\n"; gcode += ";" + GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Layer_Change) + "\n";
if ((print.default_object_config().outer_wall_acceleration.value > 0 && print.default_object_config().outer_wall_acceleration.value > 0)) { if ((NOZZLE_CONFIG(outer_wall_acceleration) > 0 && NOZZLE_CONFIG(outer_wall_acceleration) > 0)) {
gcode += m_writer.set_print_acceleration((unsigned int)floor(print.default_object_config().outer_wall_acceleration.value + 0.5)); gcode += m_writer.set_print_acceleration((unsigned int)floor(NOZZLE_CONFIG(outer_wall_acceleration) + 0.5));
} }
if (print.default_object_config().outer_wall_jerk.value > 0) { if (NOZZLE_CONFIG(outer_wall_jerk) > 0) {
double jerk = print.default_object_config().outer_wall_jerk.value; double jerk = NOZZLE_CONFIG(outer_wall_jerk);
gcode += m_writer.set_jerk_xy(jerk); gcode += m_writer.set_jerk_xy(jerk);
} }
@@ -3287,8 +3288,8 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
file.writeln(printing_by_object_gcode); file.writeln(printing_by_object_gcode);
} }
// Reset the cooling buffer internal state (the current position, feed rate, accelerations). // Reset the cooling buffer internal state (the current position, feed rate, accelerations).
m_cooling_buffer->set_current_extruder(initial_extruder_id, get_extruder_id(initial_extruder_id));
m_cooling_buffer->reset(this->writer().get_position()); m_cooling_buffer->reset(this->writer().get_position());
m_cooling_buffer->set_current_extruder(initial_extruder_id);
// Process all layers of a single object instance (sequential mode) with a parallel pipeline: // Process all layers of a single object instance (sequential mode) with a parallel pipeline:
// Generate G-code, run the filters (vase mode, cooling buffer), run the G-code analyser // Generate G-code, run the filters (vase mode, cooling buffer), run the G-code analyser
// and export G-code into file. // and export G-code into file.
@@ -4384,10 +4385,10 @@ std::string GCode::generate_skirt(const Print &print,
if (first_layer && i==loops.first) { if (first_layer && i==loops.first) {
//set skirt start point location //set skirt start point location
const Point desired_start_point = Skirt::find_start_point(loop, skirt_start_angle); const Point desired_start_point = Skirt::find_start_point(loop, skirt_start_angle);
gcode += this->extrude_loop(loop, "skirt", m_config.support_speed.value, {}, &desired_start_point); gcode += this->extrude_loop(loop, "skirt", NOZZLE_CONFIG(support_speed), {}, &desired_start_point);
} }
else else
gcode += this->extrude_loop(loop, "skirt", m_config.support_speed.value); gcode += this->extrude_loop(loop, "skirt", NOZZLE_CONFIG(support_speed));
// If we only want a single wall on non-first layers, break now // If we only want a single wall on non-first layers, break now
if (!first_layer && print.m_config.single_loop_draft_shield) { if (!first_layer && print.m_config.single_loop_draft_shield) {
@@ -4634,16 +4635,16 @@ LayerResult GCode::process_layer(
//BBS //BBS
if (first_layer) { if (first_layer) {
// Orca: we don't need to optimize the Klipper as only set once // Orca: we don't need to optimize the Klipper as only set once
if (m_config.default_acceleration.value > 0 && m_config.initial_layer_acceleration.value > 0) { if (NOZZLE_CONFIG(default_acceleration) > 0 && NOZZLE_CONFIG(initial_layer_acceleration) > 0) {
gcode += m_writer.set_print_acceleration((unsigned int)floor(m_config.initial_layer_acceleration.value + 0.5)); gcode += m_writer.set_print_acceleration((unsigned int)floor(NOZZLE_CONFIG(initial_layer_acceleration) + 0.5));
} }
if (m_config.default_jerk.value > 0 && m_config.initial_layer_jerk.value > 0) { if (NOZZLE_CONFIG(default_jerk) > 0 && NOZZLE_CONFIG(initial_layer_jerk) > 0) {
gcode += m_writer.set_jerk_xy(m_config.initial_layer_jerk.value); gcode += m_writer.set_jerk_xy(NOZZLE_CONFIG(initial_layer_jerk));
} }
if (m_writer.get_gcode_flavor() == gcfMarlinFirmware && m_config.default_junction_deviation.value > 0) { if (m_writer.get_gcode_flavor() == gcfMarlinFirmware && NOZZLE_CONFIG(default_junction_deviation) > 0) {
gcode += m_writer.set_junction_deviation(m_config.default_junction_deviation.value); gcode += m_writer.set_junction_deviation(NOZZLE_CONFIG(default_junction_deviation));
} }
} }
@@ -4664,12 +4665,12 @@ LayerResult GCode::process_layer(
} }
// Reset acceleration at sencond layer // Reset acceleration at sencond layer
// Orca: only set once, don't need to call set_accel_and_jerk // Orca: only set once, don't need to call set_accel_and_jerk
if (m_config.default_acceleration.value > 0 && m_config.initial_layer_acceleration.value > 0) { if (NOZZLE_CONFIG(default_acceleration) > 0 && NOZZLE_CONFIG(initial_layer_acceleration) > 0) {
gcode += m_writer.set_print_acceleration((unsigned int) floor(m_config.default_acceleration.value + 0.5)); gcode += m_writer.set_print_acceleration((unsigned int) floor(NOZZLE_CONFIG(default_acceleration) + 0.5));
} }
if (m_config.default_jerk.value > 0 && m_config.initial_layer_jerk.value > 0) { if (NOZZLE_CONFIG(default_jerk) > 0 && NOZZLE_CONFIG(initial_layer_jerk) > 0) {
gcode += m_writer.set_jerk_xy(m_config.default_jerk.value); gcode += m_writer.set_jerk_xy(NOZZLE_CONFIG(default_jerk));
} }
// Transition from 1st to 2nd layer. Adjust nozzle temperatures as prescribed by the nozzle dependent // Transition from 1st to 2nd layer. Adjust nozzle temperatures as prescribed by the nozzle dependent
@@ -4724,8 +4725,8 @@ LayerResult GCode::process_layer(
for (const auto &layer_to_print : layers) { for (const auto &layer_to_print : layers) {
if (layer_to_print.object_layer) { if (layer_to_print.object_layer) {
const auto& regions = layer_to_print.object_layer->regions(); const auto& regions = layer_to_print.object_layer->regions();
const bool enable_overhang_speed = std::any_of(regions.begin(), regions.end(), [](const LayerRegion* r) { const bool enable_overhang_speed = std::any_of(regions.begin(), regions.end(), [this](const LayerRegion* r) {
return r->has_extrusions() && r->region().config().enable_overhang_speed; return r->has_extrusions() && r->region().config().enable_overhang_speed.get_at(cur_extruder_index());
}); });
if (enable_overhang_speed) { if (enable_overhang_speed) {
m_extrusion_quality_estimator.prepare_for_new_layer(layer_to_print.original_object, m_extrusion_quality_estimator.prepare_for_new_layer(layer_to_print.original_object,
@@ -5106,7 +5107,7 @@ LayerResult GCode::process_layer(
this->set_origin(0., 0.); this->set_origin(0., 0.);
for (const ExtrusionEntity* ee : it->second.entities) for (const ExtrusionEntity* ee : it->second.entities)
if (ee != nullptr) if (ee != nullptr)
gcode += this->extrude_entity(*ee, "brim", m_config.support_speed.value); gcode += this->extrude_entity(*ee, "brim", NOZZLE_CONFIG(support_speed));
// Mark brim as printed for this object to avoid per-object brim emission later. // Mark brim as printed for this object to avoid per-object brim emission later.
this->m_objsWithBrim.erase(unified_object_id); this->m_objsWithBrim.erase(unified_object_id);
@@ -5317,7 +5318,7 @@ LayerResult GCode::process_layer(
this->set_origin(0., 0.); this->set_origin(0., 0.);
m_avoid_crossing_perimeters.use_external_mp(); m_avoid_crossing_perimeters.use_external_mp();
for (const ExtrusionEntity* ee : print.m_supportBrimMap.at(instance_to_print.print_object.id()).entities) { for (const ExtrusionEntity* ee : print.m_supportBrimMap.at(instance_to_print.print_object.id()).entities) {
gcode += this->extrude_entity(*ee, "brim", m_config.support_speed.value); gcode += this->extrude_entity(*ee, "brim", NOZZLE_CONFIG(support_speed));
} }
m_avoid_crossing_perimeters.use_external_mp(false); m_avoid_crossing_perimeters.use_external_mp(false);
// Allow a straight travel move to the first object point. // Allow a straight travel move to the first object point.
@@ -5364,7 +5365,7 @@ LayerResult GCode::process_layer(
this->set_origin(0., 0.); this->set_origin(0., 0.);
m_avoid_crossing_perimeters.use_external_mp(); m_avoid_crossing_perimeters.use_external_mp();
for (const ExtrusionEntity* ee : print.m_brimMap.at(instance_to_print.print_object.id()).entities) { for (const ExtrusionEntity* ee : print.m_brimMap.at(instance_to_print.print_object.id()).entities) {
gcode += this->extrude_entity(*ee, "brim", m_config.support_speed.value); gcode += this->extrude_entity(*ee, "brim", NOZZLE_CONFIG(support_speed));
} }
m_avoid_crossing_perimeters.use_external_mp(false); m_avoid_crossing_perimeters.use_external_mp(false);
// Allow a straight travel move to the first object point. // Allow a straight travel move to the first object point.
@@ -5742,11 +5743,11 @@ std::string GCode::extrude_loop(const ExtrusionLoop& loop_ref,
// SoftFever: check loop lenght for small perimeter. // SoftFever: check loop lenght for small perimeter.
double small_peri_speed = -1; double small_peri_speed = -1;
if (speed == -1 && loop.length() <= SMALL_PERIMETER_LENGTH(m_config.small_perimeter_threshold.value)) { if (speed == -1 && loop.length() <= SMALL_PERIMETER_LENGTH(NOZZLE_CONFIG(small_perimeter_threshold))) {
if(m_config.small_perimeter_speed == 0) if(NOZZLE_CONFIG(small_perimeter_speed).value == 0)
small_peri_speed = m_config.outer_wall_speed * 0.5; small_peri_speed = NOZZLE_CONFIG(outer_wall_speed) * 0.5;
else else
small_peri_speed = m_config.small_perimeter_speed.get_abs_value(m_config.outer_wall_speed); small_peri_speed = NOZZLE_CONFIG(small_perimeter_speed).get_abs_value(NOZZLE_CONFIG(outer_wall_speed));
} }
// extrude along the path // extrude along the path
@@ -6128,8 +6129,8 @@ std::string GCode::extrude_support(const ExtrusionEntityCollection &support_fill
chain_and_reorder_extrusion_entities(extrusions, m_last_pos.to_point()); chain_and_reorder_extrusion_entities(extrusions, m_last_pos.to_point());
const double support_speed = m_config.support_speed.value; //const double support_speed = m_config.support_speed.value;
const double support_interface_speed = m_config.get_abs_value("support_interface_speed"); //const double support_interface_speed = m_config.get_abs_value("support_interface_speed");
for (const ExtrusionEntity *ee : extrusions) { for (const ExtrusionEntity *ee : extrusions) {
ExtrusionRole role = ee->role(); ExtrusionRole role = ee->role();
assert(role == erSupportMaterial || role == erSupportMaterialInterface || role == erSupportTransition || role == erIroning); assert(role == erSupportMaterial || role == erSupportMaterialInterface || role == erSupportTransition || role == erIroning);
@@ -6340,47 +6341,47 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description,
unsigned int acceleration_i = 0; unsigned int acceleration_i = 0;
double jerk = 0; double jerk = 0;
// adjust acceleration // adjust acceleration
if (m_config.default_acceleration.value > 0) { if (NOZZLE_CONFIG(default_acceleration) > 0) {
double acceleration; double acceleration;
if (this->on_first_layer() && m_config.initial_layer_acceleration.value > 0) { if (this->on_first_layer() && NOZZLE_CONFIG(initial_layer_acceleration) > 0) {
acceleration = m_config.initial_layer_acceleration.value; acceleration = NOZZLE_CONFIG(initial_layer_acceleration);
#if 0 #if 0
} else if (this->object_layer_over_raft() && m_config.first_layer_acceleration_over_raft.value > 0) { } else if (this->object_layer_over_raft() && m_config.first_layer_acceleration_over_raft.value > 0) {
acceleration = m_config.first_layer_acceleration_over_raft.value; acceleration = m_config.first_layer_acceleration_over_raft.value;
#endif #endif
} else if (m_config.get_abs_value("bridge_acceleration") > 0 && is_bridge(path.role())) { } else if (m_config.get_abs_value_at("bridge_acceleration", cur_extruder_index()) > 0 && is_bridge(path.role())) {
acceleration = m_config.get_abs_value("bridge_acceleration"); acceleration = m_config.get_abs_value_at("bridge_acceleration", cur_extruder_index());
} else if (m_config.get_abs_value("sparse_infill_acceleration") > 0 && (path.role() == erInternalInfill)) { } else if (m_config.get_abs_value_at("sparse_infill_acceleration", cur_extruder_index()) > 0 && (path.role() == erInternalInfill)) {
acceleration = m_config.get_abs_value("sparse_infill_acceleration"); acceleration = m_config.get_abs_value_at("sparse_infill_acceleration", cur_extruder_index());
} else if (m_config.get_abs_value("internal_solid_infill_acceleration") > 0 && (path.role() == erSolidInfill)) { } else if (m_config.get_abs_value_at("internal_solid_infill_acceleration", cur_extruder_index()) > 0 && (path.role() == erSolidInfill)) {
acceleration = m_config.get_abs_value("internal_solid_infill_acceleration"); acceleration = m_config.get_abs_value_at("internal_solid_infill_acceleration", cur_extruder_index());
} else if (m_config.outer_wall_acceleration.value > 0 && is_external_perimeter(path.role())) { } else if (NOZZLE_CONFIG(outer_wall_acceleration) > 0 && is_external_perimeter(path.role())) {
acceleration = m_config.outer_wall_acceleration.value; acceleration = NOZZLE_CONFIG(outer_wall_acceleration);
} else if (m_config.inner_wall_acceleration.value > 0 && is_internal_perimeter(path.role())) { } else if (NOZZLE_CONFIG(inner_wall_acceleration) > 0 && is_internal_perimeter(path.role())) {
acceleration = m_config.inner_wall_acceleration.value; acceleration = NOZZLE_CONFIG(inner_wall_acceleration);
} else if (m_config.top_surface_acceleration.value > 0 && is_top_surface(path.role())) { } else if (NOZZLE_CONFIG(top_surface_acceleration) > 0 && is_top_surface(path.role())) {
acceleration = m_config.top_surface_acceleration.value; acceleration = NOZZLE_CONFIG(top_surface_acceleration);
} else { } else {
acceleration = m_config.default_acceleration.value; acceleration = NOZZLE_CONFIG(default_acceleration);
} }
acceleration_i = (unsigned int)floor(acceleration + 0.5); acceleration_i = (unsigned int)floor(acceleration + 0.5);
} }
// adjust X Y jerk // adjust X Y jerk
if (m_config.default_jerk.value > 0) { if (NOZZLE_CONFIG(default_jerk) > 0) {
if (this->on_first_layer() && m_config.initial_layer_jerk.value > 0) { if (this->on_first_layer() && NOZZLE_CONFIG(initial_layer_jerk) > 0) {
jerk = m_config.initial_layer_jerk.value; jerk = NOZZLE_CONFIG(initial_layer_jerk);
} else if (m_config.outer_wall_jerk.value > 0 && is_external_perimeter(path.role())) { } else if (NOZZLE_CONFIG(outer_wall_jerk) > 0 && is_external_perimeter(path.role())) {
jerk = m_config.outer_wall_jerk.value; jerk = NOZZLE_CONFIG(outer_wall_jerk);
} else if (m_config.inner_wall_jerk.value > 0 && is_internal_perimeter(path.role())) { } else if (NOZZLE_CONFIG(inner_wall_jerk) > 0 && is_internal_perimeter(path.role())) {
jerk = m_config.inner_wall_jerk.value; jerk = NOZZLE_CONFIG(inner_wall_jerk);
} else if (m_config.top_surface_jerk.value > 0 && is_top_surface(path.role())) { } else if (NOZZLE_CONFIG(top_surface_jerk) > 0 && is_top_surface(path.role())) {
jerk = m_config.top_surface_jerk.value; jerk = NOZZLE_CONFIG(top_surface_jerk);
} else if (m_config.infill_jerk.value > 0 && is_infill(path.role())) { } else if (NOZZLE_CONFIG(infill_jerk) > 0 && is_infill(path.role())) {
jerk = m_config.infill_jerk.value; jerk = NOZZLE_CONFIG(infill_jerk);
} }
else { else {
jerk = m_config.default_jerk.value; jerk = NOZZLE_CONFIG(default_jerk);
} }
} }
@@ -6443,37 +6444,37 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description,
// set speed // set speed
if (speed == -1) { if (speed == -1) {
if (path.role() == erPerimeter) { if (path.role() == erPerimeter) {
speed = m_config.inner_wall_speed.get_at(cur_extruder_index()); speed = NOZZLE_CONFIG(inner_wall_speed);
if (sloped) { if (sloped) {
speed = std::min(speed, m_config.scarf_joint_speed.get_abs_value(speed)); speed = std::min(speed, m_config.scarf_joint_speed.get_abs_value(speed));
} }
} else if (path.role() == erExternalPerimeter) { } else if (path.role() == erExternalPerimeter) {
speed = m_config.get_abs_value("outer_wall_speed"); speed = NOZZLE_CONFIG(outer_wall_speed);
if (sloped) { if (sloped) {
speed = std::min(speed, m_config.scarf_joint_speed.get_abs_value(speed)); speed = std::min(speed, m_config.scarf_joint_speed.get_abs_value(speed));
} }
} }
else if(path.role() == erInternalBridgeInfill) { else if(path.role() == erInternalBridgeInfill) {
speed = m_config.get_abs_value("internal_bridge_speed"); speed = m_config.get_abs_value_at("internal_bridge_speed", cur_extruder_index());
} else if (path.role() == erOverhangPerimeter || path.role() == erSupportTransition || path.role() == erBridgeInfill) { } else if (path.role() == erOverhangPerimeter || path.role() == erSupportTransition || path.role() == erBridgeInfill) {
speed = m_config.get_abs_value("bridge_speed"); speed = NOZZLE_CONFIG(bridge_speed);
} else if (path.role() == erInternalInfill) { } else if (path.role() == erInternalInfill) {
speed = m_config.get_abs_value("sparse_infill_speed"); speed = NOZZLE_CONFIG(sparse_infill_speed);
} else if (path.role() == erSolidInfill) { } else if (path.role() == erSolidInfill) {
speed = m_config.get_abs_value("internal_solid_infill_speed"); speed = NOZZLE_CONFIG(internal_solid_infill_speed);
} else if (path.role() == erTopSolidInfill) { } else if (path.role() == erTopSolidInfill) {
speed = m_config.get_abs_value("top_surface_speed"); speed = NOZZLE_CONFIG(top_surface_speed);
} else if (path.role() == erIroning) { } else if (path.role() == erIroning) {
speed = m_config.get_abs_value("ironing_speed"); speed = m_config.get_abs_value("ironing_speed");
} else if (path.role() == erBottomSurface) { } else if (path.role() == erBottomSurface) {
speed = m_config.get_abs_value("initial_layer_infill_speed"); speed = NOZZLE_CONFIG(initial_layer_infill_speed);
} else if (path.role() == erGapFill) { } else if (path.role() == erGapFill) {
speed = m_config.get_abs_value("gap_infill_speed"); speed = NOZZLE_CONFIG(gap_infill_speed);
} }
else if (path.role() == erSupportMaterial || else if (path.role() == erSupportMaterial ||
path.role() == erSupportMaterialInterface) { path.role() == erSupportMaterialInterface) {
const double support_speed = m_config.support_speed.value; const double support_speed = NOZZLE_CONFIG(support_speed);
const double support_interface_speed = m_config.get_abs_value("support_interface_speed"); const double support_interface_speed = NOZZLE_CONFIG(support_interface_speed);
speed = (path.role() == erSupportMaterial) ? support_speed : support_interface_speed; speed = (path.role() == erSupportMaterial) ? support_speed : support_interface_speed;
} else { } else {
throw Slic3r::InvalidArgument("Invalid speed"); throw Slic3r::InvalidArgument("Invalid speed");
@@ -6494,16 +6495,16 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description,
//BBS: for solid infill of first layer, speed can be higher as long as //BBS: for solid infill of first layer, speed can be higher as long as
//wall lines have be attached //wall lines have be attached
if (path.role() != erBottomSurface) { if (path.role() != erBottomSurface) {
speed = is_perimeter(path.role()) ? m_config.get_abs_value("initial_layer_speed") : speed = is_perimeter(path.role()) ? NOZZLE_CONFIG(initial_layer_speed) :
m_config.get_abs_value("initial_layer_infill_speed"); NOZZLE_CONFIG(initial_layer_infill_speed);
} }
} else if (m_config.slow_down_layers > 1 && m_config.raft_layers == 0) { } else if (m_config.slow_down_layers > 1 && m_config.raft_layers == 0) {
if (_layer > 0 && _layer < m_config.slow_down_layers) { if (_layer > 0 && _layer < m_config.slow_down_layers) {
const auto first_layer_speed = const auto first_layer_speed =
is_perimeter(path.role()) is_perimeter(path.role())
? m_config.get_abs_value("initial_layer_speed") ? NOZZLE_CONFIG(initial_layer_speed)
: m_config.get_abs_value("initial_layer_infill_speed"); : NOZZLE_CONFIG(initial_layer_infill_speed);
if (first_layer_speed < speed) { if (first_layer_speed < speed) {
speed = std::min( speed = std::min(
speed, speed,
@@ -6515,8 +6516,8 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description,
if (_layer > m_config.raft_layers && (_layer - m_config.raft_layers) < m_config.slow_down_layers) { if (_layer > m_config.raft_layers && (_layer - m_config.raft_layers) < m_config.slow_down_layers) {
const auto first_layer_speed const auto first_layer_speed
= is_perimeter(path.role()) ? m_config.get_abs_value("initial_layer_speed") : = is_perimeter(path.role()) ? NOZZLE_CONFIG(initial_layer_speed) :
m_config.get_abs_value("initial_layer_infill_speed"); NOZZLE_CONFIG(initial_layer_infill_speed);
if (first_layer_speed < speed) { if (first_layer_speed < speed) {
speed = std::min(speed, Slic3r::lerp(first_layer_speed, speed, speed = std::min(speed, Slic3r::lerp(first_layer_speed, speed,
(double) (_layer - m_config.raft_layers) / m_config.slow_down_layers)); (double) (_layer - m_config.raft_layers) / m_config.slow_down_layers));
@@ -6582,10 +6583,10 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description,
bool variable_speed = false; bool variable_speed = false;
std::vector<ProcessedPoint> new_points {}; std::vector<ProcessedPoint> new_points {};
if (m_config.enable_overhang_speed && !this->on_first_layer() && !object_layer_over_raft() && if (NOZZLE_CONFIG(enable_overhang_speed) && !this->on_first_layer() && !object_layer_over_raft() &&
(is_bridge(path.role()) || is_perimeter(path.role()))) { (is_bridge(path.role()) || is_perimeter(path.role()))) {
bool is_external = is_external_perimeter(path.role()); bool is_external = is_external_perimeter(path.role());
double ref_speed = is_external ? m_config.get_abs_value("outer_wall_speed") : m_config.inner_wall_speed.get_at(cur_extruder_index()); double ref_speed = is_external ? NOZZLE_CONFIG(outer_wall_speed) : NOZZLE_CONFIG(inner_wall_speed);
if (ref_speed == 0) if (ref_speed == 0)
ref_speed = FILAMENT_CONFIG(filament_max_volumetric_speed) / _mm3_per_mm; ref_speed = FILAMENT_CONFIG(filament_max_volumetric_speed) / _mm3_per_mm;
@@ -6598,46 +6599,46 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description,
ConfigOptionPercents overhang_overlap_levels({90, 75, 50, 25, 13, 0}); ConfigOptionPercents overhang_overlap_levels({90, 75, 50, 25, 13, 0});
if (m_config.slowdown_for_curled_perimeters){ if (NOZZLE_CONFIG(slowdown_for_curled_perimeters)){
ConfigOptionFloatsOrPercents dynamic_overhang_speeds( ConfigOptionFloatsOrPercents dynamic_overhang_speeds(
{FloatOrPercent{100, true}, {FloatOrPercent{100, true},
(m_config.get_abs_value("overhang_1_4_speed", ref_speed) < 0.5) ? (NOZZLE_CONFIG(overhang_1_4_speed).get_abs_value(ref_speed) < 0.5) ?
FloatOrPercent{100, true} : FloatOrPercent{100, true} :
FloatOrPercent{m_config.get_abs_value("overhang_1_4_speed", ref_speed) * 100 / ref_speed, true}, FloatOrPercent{NOZZLE_CONFIG(overhang_1_4_speed).get_abs_value(ref_speed) * 100 / ref_speed, true},
(m_config.get_abs_value("overhang_2_4_speed", ref_speed) < 0.5) ? (NOZZLE_CONFIG(overhang_2_4_speed).get_abs_value(ref_speed) < 0.5) ?
FloatOrPercent{100, true} : FloatOrPercent{100, true} :
FloatOrPercent{m_config.get_abs_value("overhang_2_4_speed", ref_speed) * 100 / ref_speed, true}, FloatOrPercent{NOZZLE_CONFIG(overhang_2_4_speed).get_abs_value(ref_speed) * 100 / ref_speed, true},
(m_config.get_abs_value("overhang_3_4_speed", ref_speed) < 0.5) ? (NOZZLE_CONFIG(overhang_3_4_speed).get_abs_value(ref_speed) < 0.5) ?
FloatOrPercent{100, true} : FloatOrPercent{100, true} :
FloatOrPercent{m_config.get_abs_value("overhang_3_4_speed", ref_speed) * 100 / ref_speed, true}, FloatOrPercent{NOZZLE_CONFIG(overhang_3_4_speed).get_abs_value(ref_speed) * 100 / ref_speed, true},
(m_config.get_abs_value("overhang_4_4_speed", ref_speed) < 0.5) ? (NOZZLE_CONFIG(overhang_4_4_speed).get_abs_value(ref_speed) < 0.5) ?
FloatOrPercent{100, true} : FloatOrPercent{100, true} :
FloatOrPercent{m_config.get_abs_value("overhang_4_4_speed", ref_speed) * 100 / ref_speed, true}, FloatOrPercent{NOZZLE_CONFIG(overhang_4_4_speed).get_abs_value(ref_speed) * 100 / ref_speed, true},
(m_config.get_abs_value("overhang_4_4_speed", ref_speed) < 0.5) ? (NOZZLE_CONFIG(overhang_4_4_speed).get_abs_value(ref_speed) < 0.5) ?
FloatOrPercent{100, true} : FloatOrPercent{100, true} :
FloatOrPercent{m_config.get_abs_value("overhang_4_4_speed", ref_speed) * 100 / ref_speed, true}}); FloatOrPercent{NOZZLE_CONFIG(overhang_4_4_speed).get_abs_value(ref_speed) * 100 / ref_speed, true}});
new_points = m_extrusion_quality_estimator.estimate_extrusion_quality(path, overhang_overlap_levels, dynamic_overhang_speeds, new_points = m_extrusion_quality_estimator.estimate_extrusion_quality(path, overhang_overlap_levels, dynamic_overhang_speeds,
ref_speed, speed, m_config.slowdown_for_curled_perimeters); ref_speed, speed, NOZZLE_CONFIG(slowdown_for_curled_perimeters));
}else{ }else{
ConfigOptionFloatsOrPercents dynamic_overhang_speeds( ConfigOptionFloatsOrPercents dynamic_overhang_speeds(
{FloatOrPercent{100, true}, {FloatOrPercent{100, true},
(m_config.get_abs_value("overhang_1_4_speed", ref_speed) < 0.5) ? (NOZZLE_CONFIG(overhang_1_4_speed).get_abs_value(ref_speed) < 0.5) ?
FloatOrPercent{100, true} : FloatOrPercent{100, true} :
FloatOrPercent{m_config.get_abs_value("overhang_1_4_speed", ref_speed) * 100 / ref_speed, true}, FloatOrPercent{NOZZLE_CONFIG(overhang_1_4_speed).get_abs_value(ref_speed) * 100 / ref_speed, true},
(m_config.get_abs_value("overhang_2_4_speed", ref_speed) < 0.5) ? (NOZZLE_CONFIG(overhang_2_4_speed).get_abs_value(ref_speed) < 0.5) ?
FloatOrPercent{100, true} : FloatOrPercent{100, true} :
FloatOrPercent{m_config.get_abs_value("overhang_2_4_speed", ref_speed) * 100 / ref_speed, true}, FloatOrPercent{NOZZLE_CONFIG(overhang_2_4_speed).get_abs_value(ref_speed) * 100 / ref_speed, true},
(m_config.get_abs_value("overhang_3_4_speed", ref_speed) < 0.5) ? (NOZZLE_CONFIG(overhang_3_4_speed).get_abs_value(ref_speed) < 0.5) ?
FloatOrPercent{100, true} : FloatOrPercent{100, true} :
FloatOrPercent{m_config.get_abs_value("overhang_3_4_speed", ref_speed) * 100 / ref_speed, true}, FloatOrPercent{NOZZLE_CONFIG(overhang_3_4_speed).get_abs_value(ref_speed) * 100 / ref_speed, true},
(m_config.get_abs_value("overhang_4_4_speed", ref_speed) < 0.5) ? (NOZZLE_CONFIG(overhang_4_4_speed).get_abs_value(ref_speed) < 0.5) ?
FloatOrPercent{100, true} : FloatOrPercent{100, true} :
FloatOrPercent{m_config.get_abs_value("overhang_4_4_speed", ref_speed) * 100 / ref_speed, true}, FloatOrPercent{NOZZLE_CONFIG(overhang_4_4_speed).get_abs_value(ref_speed) * 100 / ref_speed, true},
FloatOrPercent{m_config.get_abs_value("bridge_speed") * 100 / ref_speed, true}}); FloatOrPercent{NOZZLE_CONFIG(bridge_speed) * 100 / ref_speed, true}});
new_points = m_extrusion_quality_estimator.estimate_extrusion_quality(path, overhang_overlap_levels, dynamic_overhang_speeds, new_points = m_extrusion_quality_estimator.estimate_extrusion_quality(path, overhang_overlap_levels, dynamic_overhang_speeds,
ref_speed, speed, m_config.slowdown_for_curled_perimeters); ref_speed, speed, NOZZLE_CONFIG(slowdown_for_curled_perimeters));
} }
variable_speed = std::any_of(new_points.begin(), new_points.end(), variable_speed = std::any_of(new_points.begin(), new_points.end(),
[speed](const ProcessedPoint &p) { return fabs(double(p.speed) - speed) > 1; }); // Ignore small speed variations (under 1mm/sec) [speed](const ProcessedPoint &p) { return fabs(double(p.speed) - speed) > 1; }); // Ignore small speed variations (under 1mm/sec)
@@ -7296,40 +7297,40 @@ std::string GCode::travel_to(const Point& point, ExtrusionRole role, std::string
unsigned int acceleration_to_set = 0; unsigned int acceleration_to_set = 0;
if (this->on_first_layer()) { if (this->on_first_layer()) {
unsigned int initial_layer_travel_acceleration = m_config.get_abs_value("initial_layer_travel_acceleration"); unsigned int initial_layer_travel_acceleration = m_config.get_abs_value_at("initial_layer_travel_acceleration", cur_extruder_index());
double initial_layer_travel_jerk = m_config.get_abs_value("initial_layer_travel_jerk"); double initial_layer_travel_jerk = m_config.get_abs_value_at("initial_layer_travel_jerk", cur_extruder_index());
if (m_config.default_acceleration.value > 0 && initial_layer_travel_acceleration > 0) { if (NOZZLE_CONFIG(default_acceleration) > 0 && initial_layer_travel_acceleration > 0) {
acceleration_to_set = (unsigned int) floor(initial_layer_travel_acceleration + 0.5); acceleration_to_set = (unsigned int) floor(initial_layer_travel_acceleration + 0.5);
} }
if (m_config.default_jerk.value > 0 && initial_layer_travel_jerk > 0) { if (NOZZLE_CONFIG(default_jerk)> 0 && initial_layer_travel_jerk > 0) {
jerk_to_set = initial_layer_travel_jerk; jerk_to_set = initial_layer_travel_jerk;
} }
} else { // ORCA: Handle short-travel acceleration and jerk for outer perimeters (if applicable) } else { // ORCA: Handle short-travel acceleration and jerk for outer perimeters (if applicable)
const bool is_short_travel = travel.length() < scale_(EXTRUDER_CONFIG(retraction_minimum_travel)); const bool is_short_travel = travel.length() < scale_(EXTRUDER_CONFIG(retraction_minimum_travel));
if (m_config.default_acceleration.value > 0) { if (NOZZLE_CONFIG(default_acceleration) > 0) {
if (role == erOverhangPerimeter && is_short_travel) { if (role == erOverhangPerimeter && is_short_travel) {
const double bridge_acceleration = m_config.get_abs_value("bridge_acceleration"); const double bridge_acceleration = m_config.get_abs_value_at("bridge_acceleration", cur_extruder_index());
if (bridge_acceleration > 0) if (bridge_acceleration > 0)
acceleration_to_set = (unsigned int) floor(bridge_acceleration + 0.5); acceleration_to_set = (unsigned int) floor(bridge_acceleration + 0.5);
} else if (role == erExternalPerimeter && is_short_travel) { } else if (role == erExternalPerimeter && is_short_travel) {
if (m_config.outer_wall_acceleration.value > 0) if (NOZZLE_CONFIG(outer_wall_acceleration) > 0)
acceleration_to_set = (unsigned int) floor(m_config.outer_wall_acceleration.value + 0.5); acceleration_to_set = (unsigned int) floor(NOZZLE_CONFIG(outer_wall_acceleration) + 0.5);
} else { } else {
if (m_config.travel_acceleration.value > 0) if (NOZZLE_CONFIG(travel_acceleration) > 0)
acceleration_to_set = (unsigned int) floor(m_config.travel_acceleration.value + 0.5); acceleration_to_set = (unsigned int) floor(NOZZLE_CONFIG(travel_acceleration) + 0.5);
} }
} }
if (m_config.default_jerk.value > 0) { if (NOZZLE_CONFIG(default_jerk) > 0) {
if ((role == erExternalPerimeter || role == erOverhangPerimeter) && is_short_travel) { if ((role == erExternalPerimeter || role == erOverhangPerimeter) && is_short_travel) {
if (m_config.outer_wall_jerk.value > 0) if (NOZZLE_CONFIG(outer_wall_jerk) > 0)
jerk_to_set = m_config.outer_wall_jerk.value; jerk_to_set = NOZZLE_CONFIG(outer_wall_jerk);
} else { } else {
if (m_config.travel_jerk.value > 0) if (NOZZLE_CONFIG(travel_jerk) > 0)
jerk_to_set = m_config.travel_jerk.value; jerk_to_set = NOZZLE_CONFIG(travel_jerk);
} }
} }
} }
+2 -2
View File
@@ -18,7 +18,7 @@
namespace Slic3r { namespace Slic3r {
CoolingBuffer::CoolingBuffer(GCode &gcodegen) : m_config(gcodegen.config()), m_toolchange_prefix(gcodegen.writer().toolchange_prefix()), m_current_extruder(0) CoolingBuffer::CoolingBuffer(GCode &gcodegen) : m_config(gcodegen.config()), m_toolchange_prefix(gcodegen.writer().toolchange_prefix()), m_current_extruder(0), m_current_nozzle(0)
{ {
this->reset(gcodegen.writer().get_position()); this->reset(gcodegen.writer().get_position());
@@ -37,7 +37,7 @@ void CoolingBuffer::reset(const Vec3d &position)
m_current_pos[0] = float(position.x()); m_current_pos[0] = float(position.x());
m_current_pos[1] = float(position.y()); m_current_pos[1] = float(position.y());
m_current_pos[2] = float(position.z()); m_current_pos[2] = float(position.z());
m_current_pos[4] = float(m_config.travel_speed.value); m_current_pos[4] = float(m_config.travel_speed.get_at(m_current_nozzle));
m_fan_speed = -1; m_fan_speed = -1;
m_additional_fan_speed = -1; m_additional_fan_speed = -1;
m_current_fan_speed = -1; m_current_fan_speed = -1;
+2 -1
View File
@@ -25,7 +25,7 @@ class CoolingBuffer {
public: public:
CoolingBuffer(GCode &gcodegen); CoolingBuffer(GCode &gcodegen);
void reset(const Vec3d &position); void reset(const Vec3d &position);
void set_current_extruder(unsigned int extruder_id) { m_current_extruder = extruder_id; } void set_current_extruder(unsigned int extruder_id, unsigned int nozzle_id) { m_current_extruder = extruder_id; m_current_nozzle = nozzle_id; }
std::string process_layer(std::string &&gcode, size_t layer_id, bool flush); std::string process_layer(std::string &&gcode, size_t layer_id, bool flush);
private: private:
@@ -55,6 +55,7 @@ private:
// the PrintConfig slice of FullPrintConfig is constant, thus no thread synchronization is required. // the PrintConfig slice of FullPrintConfig is constant, thus no thread synchronization is required.
const PrintConfig &m_config; const PrintConfig &m_config;
unsigned int m_current_extruder; unsigned int m_current_extruder;
unsigned int m_current_nozzle;
//BBS: current fan speed //BBS: current fan speed
int m_current_fan_speed; int m_current_fan_speed;
}; };
+2 -2
View File
@@ -1472,7 +1472,7 @@ WipeTower::WipeTower(const PrintConfig& config, int plate_idx, Vec3d plate_origi
m_bridging(10.f), m_bridging(10.f),
m_no_sparse_layers(config.wipe_tower_no_sparse_layers), m_no_sparse_layers(config.wipe_tower_no_sparse_layers),
m_gcode_flavor(config.gcode_flavor), m_gcode_flavor(config.gcode_flavor),
m_travel_speed(config.travel_speed), m_travel_speed(config.travel_speed.get_at(get_extruder_index(config, (unsigned int)initial_tool))),
m_current_tool(initial_tool), m_current_tool(initial_tool),
//wipe_volumes(flush_matrix) //wipe_volumes(flush_matrix)
m_enable_timelapse_print(config.timelapse_type.value == TimelapseType::tlSmooth), m_enable_timelapse_print(config.timelapse_type.value == TimelapseType::tlSmooth),
@@ -1497,7 +1497,7 @@ WipeTower::WipeTower(const PrintConfig& config, int plate_idx, Vec3d plate_origi
// it is taken over following default. Speeds from config are not // it is taken over following default. Speeds from config are not
// easily accessible here. // easily accessible here.
const float default_speed = 60.f; const float default_speed = 60.f;
m_first_layer_speed = config.get_abs_value("initial_layer_speed"); m_first_layer_speed = config.initial_layer_speed.get_at(get_extruder_index(config, (unsigned int)initial_tool));
if (m_first_layer_speed == 0.f) // just to make sure autospeed doesn't break it. if (m_first_layer_speed == 0.f) // just to make sure autospeed doesn't break it.
m_first_layer_speed = default_speed / 2.f; m_first_layer_speed = default_speed / 2.f;
+3 -3
View File
@@ -1262,8 +1262,8 @@ WipeTower2::WipeTower2(const PrintConfig& config, const PrintRegionConfig& defau
m_bridging(float(config.wipe_tower_bridging)), m_bridging(float(config.wipe_tower_bridging)),
m_no_sparse_layers(config.wipe_tower_no_sparse_layers), m_no_sparse_layers(config.wipe_tower_no_sparse_layers),
m_gcode_flavor(config.gcode_flavor), m_gcode_flavor(config.gcode_flavor),
m_travel_speed(config.travel_speed), m_travel_speed(config.travel_speed.get_at(get_extruder_index(config, (unsigned int)initial_tool))),
m_infill_speed(default_region_config.sparse_infill_speed), m_infill_speed(default_region_config.sparse_infill_speed.get_at(get_extruder_index(config, (unsigned int)initial_tool))),
m_perimeter_speed(default_region_config.inner_wall_speed.get_at(get_extruder_index(config, (unsigned int)initial_tool))), m_perimeter_speed(default_region_config.inner_wall_speed.get_at(get_extruder_index(config, (unsigned int)initial_tool))),
m_current_tool(initial_tool), m_current_tool(initial_tool),
wipe_volumes(wiping_matrix), m_wipe_tower_max_purge_speed(float(config.wipe_tower_max_purge_speed)), wipe_volumes(wiping_matrix), m_wipe_tower_max_purge_speed(float(config.wipe_tower_max_purge_speed)),
@@ -1280,7 +1280,7 @@ WipeTower2::WipeTower2(const PrintConfig& config, const PrintRegionConfig& defau
// it is taken over following default. Speeds from config are not // it is taken over following default. Speeds from config are not
// easily accessible here. // easily accessible here.
const float default_speed = 60.f; const float default_speed = 60.f;
m_first_layer_speed = config.initial_layer_speed; m_first_layer_speed = config.initial_layer_speed.get_at(get_extruder_index(config, (unsigned int)initial_tool));
if (m_first_layer_speed == 0.f) // just to make sure autospeed doesn't break it. if (m_first_layer_speed == 0.f) // just to make sure autospeed doesn't break it.
m_first_layer_speed = default_speed / 2.f; m_first_layer_speed = default_speed / 2.f;
+10 -10
View File
@@ -610,7 +610,7 @@ std::string GCodeWriter::travel_to_xy(const Vec2d &point, const std::string &com
GCodeG1Formatter w; GCodeG1Formatter w;
w.emit_xy(point_on_plate); w.emit_xy(point_on_plate);
auto speed = m_is_first_layer auto speed = m_is_first_layer
? this->config.get_abs_value("initial_layer_travel_speed") : this->config.travel_speed.value; ? this->config.get_abs_value_at("initial_layer_travel_speed", get_extruder_index(this->config, filament()->id())) : this->config.travel_speed.get_at(get_extruder_index(this->config, filament()->id()));
w.emit_f(speed * 60.0); w.emit_f(speed * 60.0);
//BBS //BBS
w.emit_comment(GCodeWriter::full_gcode_comment, comment); w.emit_comment(GCodeWriter::full_gcode_comment, comment);
@@ -696,7 +696,7 @@ std::string GCodeWriter::travel_to_xyz(const Vec3d &point, const std::string &co
// BBS // BBS
Vec3d dest_point = point; Vec3d dest_point = point;
auto travel_speed = auto travel_speed =
m_is_first_layer ? this->config.get_abs_value("initial_layer_travel_speed") : this->config.travel_speed.value; m_is_first_layer ? this->config.get_abs_value_at("initial_layer_travel_speed", get_extruder_index(this->config, filament()->id())) : this->config.travel_speed.get_at(get_extruder_index(this->config, filament()->id()));
//BBS: a z_hop need to be handle when travel //BBS: a z_hop need to be handle when travel
if (std::abs(m_to_lift) > EPSILON) { if (std::abs(m_to_lift) > EPSILON) {
assert(std::abs(m_lifted) < EPSILON); assert(std::abs(m_lifted) < EPSILON);
@@ -793,13 +793,13 @@ std::string GCodeWriter::travel_to_xyz(const Vec3d &point, const std::string &co
{ {
//force to move xy first then z after filament change //force to move xy first then z after filament change
w.emit_xy(Vec2d(point_on_plate.x(), point_on_plate.y())); w.emit_xy(Vec2d(point_on_plate.x(), point_on_plate.y()));
w.emit_f(this->config.travel_speed.value * 60.0); w.emit_f(this->config.travel_speed.get_at(get_extruder_index(this->config, filament()->id())) * 60.0);
w.emit_comment(GCodeWriter::full_gcode_comment, comment); w.emit_comment(GCodeWriter::full_gcode_comment, comment);
out_string = w.string() + _travel_to_z(point_on_plate.z(), comment); out_string = w.string() + _travel_to_z(point_on_plate.z(), comment);
} else { } else {
GCodeG1Formatter w; GCodeG1Formatter w;
w.emit_xyz(point_on_plate); w.emit_xyz(point_on_plate);
w.emit_f(this->config.travel_speed.value * 60.0); w.emit_f(this->config.travel_speed.get_at(get_extruder_index(this->config, filament()->id())) * 60.0);
w.emit_comment(GCodeWriter::full_gcode_comment, comment); w.emit_comment(GCodeWriter::full_gcode_comment, comment);
out_string = w.string(); out_string = w.string();
} }
@@ -832,10 +832,10 @@ std::string GCodeWriter::_travel_to_z(double z, const std::string &comment)
{ {
m_pos(2) = z; m_pos(2) = z;
double speed = this->config.travel_speed_z.value; double speed = this->config.travel_speed_z.get_at(get_extruder_index(this->config, filament()->id()));
if (speed == 0.) { if (speed == 0.) {
speed = m_is_first_layer ? this->config.get_abs_value("initial_layer_travel_speed") speed = m_is_first_layer ? this->config.get_abs_value_at("initial_layer_travel_speed", get_extruder_index(this->config, filament()->id()))
: this->config.travel_speed.value; : this->config.travel_speed.get_at(get_extruder_index(this->config, filament()->id()));
} }
GCodeG1Formatter w; GCodeG1Formatter w;
@@ -849,11 +849,11 @@ std::string GCodeWriter::_travel_to_z(double z, const std::string &comment)
std::string GCodeWriter::_spiral_travel_to_z(double z, const Vec2d &ij_offset, const std::string &comment) std::string GCodeWriter::_spiral_travel_to_z(double z, const Vec2d &ij_offset, const std::string &comment)
{ {
std::string output; std::string output;
double speed = this->config.travel_speed_z.value; double speed = this->config.travel_speed_z.get_at(get_extruder_index(this->config, filament()->id()));
if (speed == 0.) { if (speed == 0.) {
speed = m_is_first_layer ? this->config.get_abs_value("initial_layer_travel_speed") speed = m_is_first_layer ? this->config.get_abs_value_at("initial_layer_travel_speed", get_extruder_index(this->config, filament()->id()))
: this->config.travel_speed.value; : this->config.travel_speed.get_at(get_extruder_index(this->config, filament()->id()));
} }
if (!this->config.enable_arc_fitting) { // Orca: if arc fitting is disabled, approximate the arc with small linear segments if (!this->config.enable_arc_fitting) { // Orca: if arc fitting is disabled, approximate the arc with small linear segments
+3 -3
View File
@@ -146,9 +146,9 @@ bool Layer::is_perimeter_compatible(const Print& print, const PrintRegion& a, co
&& config.wall_sequence == other_config.wall_sequence && config.wall_sequence == other_config.wall_sequence
&& config.is_infill_first == other_config.is_infill_first && config.is_infill_first == other_config.is_infill_first
&& config.inner_wall_speed.get_at(print.get_extruder_id(config.wall_filament)) == other_config.inner_wall_speed.get_at(print.get_extruder_id(config.wall_filament)) && config.inner_wall_speed.get_at(print.get_extruder_id(config.wall_filament)) == other_config.inner_wall_speed.get_at(print.get_extruder_id(config.wall_filament))
&& config.outer_wall_speed == other_config.outer_wall_speed && config.outer_wall_speed.get_at(print.get_extruder_id(config.wall_filament)) == other_config.outer_wall_speed.get_at(print.get_extruder_id(config.wall_filament))
&& config.small_perimeter_speed == other_config.small_perimeter_speed && config.small_perimeter_speed.get_at(print.get_extruder_id(config.wall_filament)) == other_config.small_perimeter_speed.get_at(print.get_extruder_id(config.wall_filament))
&& config.gap_infill_speed.value == other_config.gap_infill_speed.value && config.gap_infill_speed.get_at(print.get_extruder_id(config.wall_filament)) == other_config.gap_infill_speed.get_at(print.get_extruder_id(config.wall_filament))
&& config.filter_out_gap_fill.value == other_config.filter_out_gap_fill.value && config.filter_out_gap_fill.value == other_config.filter_out_gap_fill.value
&& config.detect_overhang_wall == other_config.detect_overhang_wall && config.detect_overhang_wall == other_config.detect_overhang_wall
&& config.overhang_reverse == other_config.overhang_reverse && config.overhang_reverse == other_config.overhang_reverse
+1 -1
View File
@@ -1352,7 +1352,7 @@ static inline std::vector<std::vector<ExPolygons>> segmentation_top_and_bottom_l
out.extrusion_width = std::max<float>(out.extrusion_width, outer_wall_line_width); out.extrusion_width = std::max<float>(out.extrusion_width, outer_wall_line_width);
out.top_shell_layers = std::max<int>(out.top_shell_layers, config.top_shell_layers); out.top_shell_layers = std::max<int>(out.top_shell_layers, config.top_shell_layers);
out.bottom_shell_layers = std::max<int>(out.bottom_shell_layers, config.bottom_shell_layers); out.bottom_shell_layers = std::max<int>(out.bottom_shell_layers, config.bottom_shell_layers);
out.small_region_threshold = config.gap_infill_speed.value > 0 ? out.small_region_threshold = config.gap_infill_speed.get_at(print_object.print()->get_extruder_id(config.wall_filament - 1)) > 0 ?
// Gap fill enabled. Enable a single line of 1/2 extrusion width. // Gap fill enabled. Enable a single line of 1/2 extrusion width.
0.5f * outer_wall_line_width : 0.5f * outer_wall_line_width :
// Gap fill disabled. Enable two lines slightly overlapping. // Gap fill disabled. Enable two lines slightly overlapping.
+2 -2
View File
@@ -581,7 +581,7 @@ void PerimeterGenerator::split_top_surfaces(const ExPolygons &orig_polygons, ExP
coord_t ext_perimeter_width = this->ext_perimeter_flow.scaled_width(); coord_t ext_perimeter_width = this->ext_perimeter_flow.scaled_width();
coord_t ext_perimeter_spacing = this->ext_perimeter_flow.scaled_spacing(); coord_t ext_perimeter_spacing = this->ext_perimeter_flow.scaled_spacing();
bool has_gap_fill = this->config->gap_infill_speed.value > 0; bool has_gap_fill = this->config->gap_infill_speed.get_at(get_extruder_index(*print_config, this->config->wall_filament - 1)) > 0;
// split the polygons with top/not_top // split the polygons with top/not_top
// get the offset from solid surface anchor // get the offset from solid surface anchor
@@ -1189,7 +1189,7 @@ void PerimeterGenerator::process_classic()
// internal flow which is unrelated. // internal flow which is unrelated.
coord_t min_spacing = coord_t(perimeter_spacing * (1 - INSET_OVERLAP_TOLERANCE)); coord_t min_spacing = coord_t(perimeter_spacing * (1 - INSET_OVERLAP_TOLERANCE));
coord_t ext_min_spacing = coord_t(ext_perimeter_spacing * (1 - INSET_OVERLAP_TOLERANCE)); coord_t ext_min_spacing = coord_t(ext_perimeter_spacing * (1 - INSET_OVERLAP_TOLERANCE));
bool has_gap_fill = this->config->gap_infill_speed.value > 0; bool has_gap_fill = this->config->gap_infill_speed.get_at(get_extruder_index(*print_config, this->config->wall_filament - 1)) > 0;
// BBS: this flow is for smaller external perimeter for small area // BBS: this flow is for smaller external perimeter for small area
coord_t ext_min_spacing_smaller = coord_t(ext_perimeter_spacing * (1 - SMALLER_EXT_INSET_OVERLAP_TOLERANCE)); coord_t ext_min_spacing_smaller = coord_t(ext_perimeter_spacing * (1 - SMALLER_EXT_INSET_OVERLAP_TOLERANCE));
+9 -4
View File
@@ -1732,6 +1732,7 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
// check if print speed/accel/jerk is higher than the maximum speed of the printer // check if print speed/accel/jerk is higher than the maximum speed of the printer
if (warning) { if (warning) {
try { try {
/* TODO: Orca: fix it
auto check_motion_ability_object_setting = [&](const std::vector<std::string>& keys_to_check, double limit) -> std::string { auto check_motion_ability_object_setting = [&](const std::vector<std::string>& keys_to_check, double limit) -> std::string {
std::string warning_key; std::string warning_key;
for (const auto& key : keys_to_check) { for (const auto& key : keys_to_check) {
@@ -1759,12 +1760,15 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
// check jerk // check jerk
if (!ignore_jerk_validation) { if (!ignore_jerk_validation) {
if (m_default_object_config.default_jerk == 1 || m_default_object_config.outer_wall_jerk == 1 || auto is_jerk_too_low = [](const ConfigOptionFloatsNullable& cfg) {
m_default_object_config.inner_wall_jerk == 1) { return std::any_of(cfg.values.begin(), cfg.values.end(), [](const float v) { return v == 1; });
};
if (is_jerk_too_low(m_default_object_config.default_jerk) || is_jerk_too_low(m_default_object_config.outer_wall_jerk) ||
is_jerk_too_low(m_default_object_config.inner_wall_jerk)) {
warning->string = L("Setting the jerk speed too low could lead to artifacts on curved surfaces"); warning->string = L("Setting the jerk speed too low could lead to artifacts on curved surfaces");
if (m_default_object_config.outer_wall_jerk == 1) if (is_jerk_too_low(m_default_object_config.outer_wall_jerk))
warning_key = "outer_wall_jerk"; warning_key = "outer_wall_jerk";
else if (m_default_object_config.inner_wall_jerk == 1) else if (is_jerk_too_low(m_default_object_config.inner_wall_jerk))
warning_key = "inner_wall_jerk"; warning_key = "inner_wall_jerk";
else else
warning_key = "default_jerk"; warning_key = "default_jerk";
@@ -1856,6 +1860,7 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
} }
} }
} }
*/
// check speed // check speed
// Orca: disable the speed check for now as we don't cap the speed // Orca: disable the speed check for now as we don't cap the speed
+305 -249
View File
@@ -1497,14 +1497,15 @@ void PrintConfigDef::init_fff_params()
def->mode = comAdvanced; def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloatOrPercent(50, true)); def->set_default_value(new ConfigOptionFloatOrPercent(50, true));
def = this->add("enable_overhang_speed", coBool); def = this->add("enable_overhang_speed", coBools);
def->label = L("Slow down for overhang"); def->label = L("Slow down for overhang");
def->category = L("Speed"); def->category = L("Speed");
def->tooltip = L("Enable this option to slow printing down for different overhang degree."); def->tooltip = L("Enable this option to slow printing down for different overhang degree.");
def->mode = comAdvanced; def->mode = comAdvanced;
def->set_default_value(new ConfigOptionBool{ true }); def->nullable = true;
def->set_default_value(new ConfigOptionBoolsNullable{ true });
def = this->add("slowdown_for_curled_perimeters", coBool); def = this->add("slowdown_for_curled_perimeters", coBools);
def->label = L("Slow down for curled perimeters"); def->label = L("Slow down for curled perimeters");
def->category = L("Speed"); def->category = L("Speed");
// xgettext:no-c-format, no-boost-format // xgettext:no-c-format, no-boost-format
@@ -1519,9 +1520,10 @@ void PrintConfigDef::init_fff_params()
"applied even if the overhanging perimeter is part of a bridge. For example, when the perimeters are 100% overhanging" "applied even if the overhanging perimeter is part of a bridge. For example, when the perimeters are 100% overhanging"
", with no wall supporting them from underneath, the 100% overhang speed will be applied."); ", with no wall supporting them from underneath, the 100% overhang speed will be applied.");
def->mode = comAdvanced; def->mode = comAdvanced;
def->set_default_value(new ConfigOptionBool{ true }); def->nullable = true;
def->set_default_value(new ConfigOptionBoolsNullable{ true });
def = this->add("overhang_1_4_speed", coFloatOrPercent); def = this->add("overhang_1_4_speed", coFloatsOrPercents);
def->label = "10%"; def->label = "10%";
def->category = L("Speed"); def->category = L("Speed");
def->full_label = "10%"; def->full_label = "10%";
@@ -1531,9 +1533,10 @@ void PrintConfigDef::init_fff_params()
def->ratio_over = "outer_wall_speed"; def->ratio_over = "outer_wall_speed";
def->min = 0; def->min = 0;
def->mode = comAdvanced; def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloatOrPercent(0, false)); def->nullable = true;
def->set_default_value(new ConfigOptionFloatsOrPercentsNullable{FloatOrPercent(0, false)});
def = this->add("overhang_2_4_speed", coFloatOrPercent); def = this->add("overhang_2_4_speed", coFloatsOrPercents);
def->label = "25%"; def->label = "25%";
def->category = L("Speed"); def->category = L("Speed");
def->full_label = "25%"; def->full_label = "25%";
@@ -1543,9 +1546,10 @@ void PrintConfigDef::init_fff_params()
def->ratio_over = "outer_wall_speed"; def->ratio_over = "outer_wall_speed";
def->min = 0; def->min = 0;
def->mode = comAdvanced; def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloatOrPercent(0, false)); def->nullable = true;
def->set_default_value(new ConfigOptionFloatsOrPercentsNullable{FloatOrPercent(0, false)});
def = this->add("overhang_3_4_speed", coFloatOrPercent); def = this->add("overhang_3_4_speed", coFloatsOrPercents);
def->label = "50%"; def->label = "50%";
def->category = L("Speed"); def->category = L("Speed");
def->full_label = "50%"; def->full_label = "50%";
@@ -1555,9 +1559,10 @@ void PrintConfigDef::init_fff_params()
def->ratio_over = "outer_wall_speed"; def->ratio_over = "outer_wall_speed";
def->min = 0; def->min = 0;
def->mode = comAdvanced; def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloatOrPercent(0, false)); def->nullable = true;
def->set_default_value(new ConfigOptionFloatsOrPercentsNullable{FloatOrPercent(0, false)});
def = this->add("overhang_4_4_speed", coFloatOrPercent); def = this->add("overhang_4_4_speed", coFloatsOrPercents);
def->label = "75%"; def->label = "75%";
def->category = L("Speed"); def->category = L("Speed");
def->full_label = "75%"; def->full_label = "75%";
@@ -1567,9 +1572,10 @@ void PrintConfigDef::init_fff_params()
def->ratio_over = "outer_wall_speed"; def->ratio_over = "outer_wall_speed";
def->min = 0; def->min = 0;
def->mode = comAdvanced; def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloatOrPercent(0, false)); def->nullable = true;
def->set_default_value(new ConfigOptionFloatsOrPercentsNullable{FloatOrPercent(0, false)});
def = this->add("bridge_speed", coFloat); def = this->add("bridge_speed", coFloats);
def->label = L("External"); def->label = L("External");
def->category = L("Speed"); def->category = L("Speed");
def->tooltip = L("Speed of the externally visible bridge extrusions.\n\n" def->tooltip = L("Speed of the externally visible bridge extrusions.\n\n"
@@ -1579,9 +1585,10 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("mm/s"); // millimeters per second, CIS languages need translation def->sidetext = L("mm/s"); // millimeters per second, CIS languages need translation
def->min = 1; def->min = 1;
def->mode = comAdvanced; def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(25)); def->nullable = true;
def->set_default_value(new ConfigOptionFloatsNullable{25});
def = this->add("internal_bridge_speed", coFloatOrPercent); def = this->add("internal_bridge_speed", coFloatsOrPercents);
def->label = L("Internal"); def->label = L("Internal");
def->category = L("Speed"); def->category = L("Speed");
def->tooltip = L("Speed of internal bridges. If the value is expressed as a percentage, it will be calculated based on the bridge_speed. Default value is 150%."); def->tooltip = L("Speed of internal bridges. If the value is expressed as a percentage, it will be calculated based on the bridge_speed. Default value is 150%.");
@@ -1589,7 +1596,8 @@ void PrintConfigDef::init_fff_params()
def->ratio_over = "bridge_speed"; def->ratio_over = "bridge_speed";
def->min = 1; def->min = 1;
def->mode = comAdvanced; def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloatOrPercent(150, true)); def->nullable = true;
def->set_default_value(new ConfigOptionFloatsOrPercentsNullable{FloatOrPercent(150, true)});
def = this->add("brim_width", coFloat); def = this->add("brim_width", coFloat);
def->label = L("Brim width"); def->label = L("Brim width");
@@ -1776,14 +1784,46 @@ void PrintConfigDef::init_fff_params()
"This can improve the cooling quality for needle and small details."); "This can improve the cooling quality for needle and small details.");
def->set_default_value(new ConfigOptionBools { true }); def->set_default_value(new ConfigOptionBools { true });
def = this->add("default_acceleration", coFloat); def = this->add("default_acceleration", coFloats);
def->label = L("Normal printing"); def->label = L("Normal printing");
def->category = L("Speed"); def->category = L("Speed");
def->tooltip = L("The default acceleration of both normal printing and travel except initial layer."); def->tooltip = L("The default acceleration of both normal printing and travel except initial layer.");
def->sidetext = L(u8"mm/s²"); // millimeters per second per second, CIS languages need translation def->sidetext = L(u8"mm/s²"); // millimeters per second per second, CIS languages need translation
def->min = 0; def->min = 0;
def->mode = comAdvanced; def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(500.0)); def->nullable = true;
def->set_default_value(new ConfigOptionFloatsNullable{500.0});
def = this->add("travel_acceleration", coFloats);
def->label = L("Travel");
def->category = L("Speed");
def->tooltip = L("Acceleration of travel moves.");
def->sidetext = L(u8"mm/s²"); // millimeters per second per second, CIS languages need translation
def->min = 0;
def->mode = comAdvanced;
def->nullable = true;
def->set_default_value(new ConfigOptionFloatsNullable{10000.0});
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->min = 0;
def->mode = comAdvanced;
def->ratio_over = "travel_acceleration";
def->nullable = true;
def->set_default_value(new ConfigOptionFloatsOrPercentsNullable{FloatOrPercent(100, true)});
def = this->add("bridge_acceleration", coFloatsOrPercents);
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->min = 0;
def->mode = comAdvanced;
def->ratio_over = "outer_wall_acceleration";
def->nullable = true;
def->set_default_value(new ConfigOptionFloatsOrPercentsNullable{FloatOrPercent(50,true)});
def = this->add("default_filament_profile", coStrings); def = this->add("default_filament_profile", coStrings);
def->label = L("Default filament profile"); def->label = L("Default filament profile");
@@ -2006,6 +2046,18 @@ void PrintConfigDef::init_fff_params()
def->enum_labels.push_back(L("Octagram Spiral")); def->enum_labels.push_back(L("Octagram Spiral"));
def->set_default_value(new ConfigOptionEnum<InfillPattern>(ipMonotonicLine)); def->set_default_value(new ConfigOptionEnum<InfillPattern>(ipMonotonicLine));
def = this->add("top_surface_density", coPercent);
def->label = L("Top surface density");
def->category = L("Strength");
def->tooltip = L("Density of top surface layer. A value of 100% creates a fully solid, smooth top layer. "
"Reducing this value results in a textured top surface, according to the chosen top surface pattern. "
"A value of 0% will result in only the walls on the top layer being created. "
"Intended for aesthetic or functional purposes, not to fix issues such as over-extrusion.");
def->sidetext = ("%");
def->min = 0;
def->max = 100;
def->set_default_value(new ConfigOptionPercent(100));
def = this->add("bottom_surface_pattern", coEnum); def = this->add("bottom_surface_pattern", coEnum);
def->label = L("Bottom surface pattern"); def->label = L("Bottom surface pattern");
def->category = L("Strength"); def->category = L("Strength");
@@ -2015,6 +2067,17 @@ void PrintConfigDef::init_fff_params()
def->enum_labels = def_top_fill_pattern->enum_labels; def->enum_labels = def_top_fill_pattern->enum_labels;
def->set_default_value(new ConfigOptionEnum<InfillPattern>(ipMonotonic)); def->set_default_value(new ConfigOptionEnum<InfillPattern>(ipMonotonic));
def = this->add("bottom_surface_density", coPercent);
def->label = L("Bottom surface density");
def->category = L("Strength");
def->tooltip = L("Density of the bottom surface layer. "
"Intended for aesthetic or functional purposes, not to fix issues such as over-extrusion.\n"
"WARNING: Lowering this value may negatively affect bed adhesion.");
def->sidetext = ("%");
def->min = 10;
def->max = 100;
def->set_default_value(new ConfigOptionPercent(100));
def = this->add("internal_solid_infill_pattern", coEnum); def = this->add("internal_solid_infill_pattern", coEnum);
def->label = L("Internal solid infill pattern"); def->label = L("Internal solid infill pattern");
def->category = L("Strength"); def->category = L("Strength");
@@ -2036,7 +2099,7 @@ void PrintConfigDef::init_fff_params()
def->mode = comAdvanced; def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloatOrPercent(0., false)); def->set_default_value(new ConfigOptionFloatOrPercent(0., false));
def = this->add("outer_wall_speed", coFloat); def = this->add("outer_wall_speed", coFloats);
def->label = L("Outer wall"); def->label = L("Outer wall");
def->category = L("Speed"); def->category = L("Speed");
def->tooltip = L("Speed of outer wall which is outermost and visible. " def->tooltip = L("Speed of outer wall which is outermost and visible. "
@@ -2044,9 +2107,10 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("mm/s"); // millimeters per second, CIS languages need translation def->sidetext = L("mm/s"); // millimeters per second, CIS languages need translation
def->min = 1; def->min = 1;
def->mode = comAdvanced; def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(60)); def->nullable = true;
def->set_default_value(new ConfigOptionFloatsNullable{60});
def = this->add("small_perimeter_speed", coFloatOrPercent); def = this->add("small_perimeter_speed", coFloatsOrPercents);
def->label = L("Small perimeters"); def->label = L("Small perimeters");
def->category = L("Speed"); def->category = L("Speed");
def->tooltip = L("This separate setting will affect the speed of perimeters having radius <= small_perimeter_threshold " def->tooltip = L("This separate setting will affect the speed of perimeters having radius <= small_perimeter_threshold "
@@ -2056,16 +2120,18 @@ void PrintConfigDef::init_fff_params()
def->ratio_over = "outer_wall_speed"; def->ratio_over = "outer_wall_speed";
def->min = 1; def->min = 1;
def->mode = comAdvanced; def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloatOrPercent(50, true)); def->nullable = true;
def->set_default_value(new ConfigOptionFloatsOrPercentsNullable{FloatOrPercent(50, true)});
def = this->add("small_perimeter_threshold", coFloat); def = this->add("small_perimeter_threshold", coFloats);
def->label = L("Small perimeters threshold"); def->label = L("Small perimeters threshold");
def->category = L("Speed"); def->category = L("Speed");
def->tooltip = L("This sets the threshold for small perimeter length. Default threshold is 0mm."); def->tooltip = L("This sets the threshold for small perimeter length. Default threshold is 0mm.");
def->sidetext = L("mm"); // millimeters, CIS languages need translation def->sidetext = L("mm"); // millimeters, CIS languages need translation
def->min = 0; def->min = 0;
def->mode = comAdvanced; def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(0)); def->nullable = true;
def->set_default_value(new ConfigOptionFloatsNullable{0});
def = this->add("wall_sequence", coEnum); def = this->add("wall_sequence", coEnum);
def->label = L("Walls printing order"); def->label = L("Walls printing order");
@@ -2427,18 +2493,6 @@ void PrintConfigDef::init_fff_params()
def->mode = comAdvanced; def->mode = comAdvanced;
def->set_default_value(new ConfigOptionEnum<FilamentMapMode>(fmmAutoForFlush)); def->set_default_value(new ConfigOptionEnum<FilamentMapMode>(fmmAutoForFlush));
def = this->add("enable_filament_dynamic_map", coBool);
def->label = L("Enable filament dynamic map");
def->tooltip = L("Enable dynamic filament mapping during print.");
def->mode = comDevelop;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("has_filament_switcher", coBool);
def->label = L("Has filament switcher");
def->tooltip = L("Printer has a filament switcher hardware (e.g., AMS).");
def->mode = comDevelop;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("filament_flush_temp", coInts); def = this->add("filament_flush_temp", coInts);
def->label = L("Flush temperature"); def->label = L("Flush temperature");
def->tooltip = L("Temperature when flushing filament. 0 indicates the upper bound of the recommended nozzle temperature range."); def->tooltip = L("Temperature when flushing filament. 0 indicates the upper bound of the recommended nozzle temperature range.");
@@ -2984,134 +3038,37 @@ void PrintConfigDef::init_fff_params()
def->enum_labels.push_back(L("Octagram Spiral")); def->enum_labels.push_back(L("Octagram Spiral"));
def->set_default_value(new ConfigOptionEnum<InfillPattern>(ipCrossHatch)); def->set_default_value(new ConfigOptionEnum<InfillPattern>(ipCrossHatch));
def = this->add("lateral_lattice_angle_1", coFloat); def = this->add("top_surface_acceleration", coFloats);
def->label = L("Lateral lattice angle 1");
def->category = L("Strength");
def->tooltip = L("The angle of the first set of Lateral lattice elements in the Z direction. Zero is vertical.");
def->sidetext = u8"°"; // degrees, don't need translation
def->min = -75;
def->max = 75;
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(-45));
def = this->add("lateral_lattice_angle_2", coFloat);
def->label = L("Lateral lattice angle 2");
def->category = L("Strength");
def->tooltip = L("The angle of the second set of Lateral lattice elements in the Z direction. Zero is vertical.");
def->sidetext = u8"°"; // degrees, don't need translation
def->min = -75;
def->max = 75;
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(45));
def = this->add("infill_overhang_angle", coFloat);
def->label = L("Infill overhang angle");
def->category = L("Strength");
def->tooltip = L("The angle of the infill angled lines. 60° will result in a pure honeycomb.");
def->sidetext = u8"°"; // degrees, don't need translation
def->min = 15;
def->max = 75;
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(60));
auto def_infill_anchor_min = def = this->add("infill_anchor", coFloatOrPercent);
def->label = L("Sparse infill anchor length");
def->category = L("Strength");
def->tooltip = L("Connect an infill line to an internal perimeter with a short segment of an additional perimeter. "
"If expressed as percentage (example: 15%) it is calculated over infill extrusion width. "
"Orca Slicer tries to connect two close infill lines to a short perimeter segment. If no such perimeter segment "
"shorter than infill_anchor_max is found, the infill line is connected to a perimeter segment at just one side "
"and the length of the perimeter segment taken is limited to this parameter, but no longer than anchor_length_max.\n"
"Set this parameter to zero to disable anchoring perimeters connected to a single infill line.");
def->sidetext = L("mm or %");
def->ratio_over = "sparse_infill_line_width";
def->max_literal = 1000;
def->gui_type = ConfigOptionDef::GUIType::f_enum_open;
def->enum_values.push_back("0");
def->enum_values.push_back("1");
def->enum_values.push_back("2");
def->enum_values.push_back("5");
def->enum_values.push_back("10");
def->enum_values.push_back("1000");
def->enum_labels.push_back(L("0 (no open anchors)"));
def->enum_labels.push_back("1 mm");
def->enum_labels.push_back("2 mm");
def->enum_labels.push_back("5 mm");
def->enum_labels.push_back("10 mm");
def->enum_labels.push_back(L("1000 (unlimited)"));
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloatOrPercent(400, true));
def = this->add("infill_anchor_max", coFloatOrPercent);
def->label = L("Maximum length of the infill anchor");
def->category = L("Strength");
def->tooltip = L("Connect an infill line to an internal perimeter with a short segment of an additional perimeter. "
"If expressed as percentage (example: 15%) it is calculated over infill extrusion width. "
"Orca Slicer tries to connect two close infill lines to a short perimeter segment. If no such perimeter segment "
"shorter than this parameter is found, the infill line is connected to a perimeter segment at just one side "
"and the length of the perimeter segment taken is limited to infill_anchor, but no longer than this parameter.\n"
"If set to 0, the old algorithm for infill connection will be used, it should create the same result as with 1000 & 0.");
def->sidetext = def_infill_anchor_min->sidetext;
def->ratio_over = def_infill_anchor_min->ratio_over;
def->gui_type = def_infill_anchor_min->gui_type;
def->enum_values = def_infill_anchor_min->enum_values;
def->max_literal = def_infill_anchor_min->max_literal;
def->enum_labels.push_back(L("0 (Simple connect)"));
def->enum_labels.push_back("1 mm");
def->enum_labels.push_back("2 mm");
def->enum_labels.push_back("5 mm");
def->enum_labels.push_back("10 mm");
def->enum_labels.push_back(L("1000 (unlimited)"));
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloatOrPercent(20, false));
def = this->add("inner_wall_acceleration", coFloat);
def->label = L("Inner wall");
def->category = L("Speed");
def->tooltip = L("Acceleration of inner walls.");
def->sidetext = L(u8"mm/s²"); // millimeters per second per second, CIS languages need translation
def->min = 0;
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(10000));
def = this->add("travel_acceleration", coFloat);
def->label = L("Travel");
def->category = L("Speed");
def->tooltip = L("Acceleration of travel moves.");
def->sidetext = L(u8"mm/s²"); // millimeters per second per second, CIS languages need translation
def->min = 0;
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(10000));
def = this->add("top_surface_acceleration", coFloat);
def->label = L("Top surface"); def->label = L("Top surface");
def->category = L("Speed"); def->category = L("Speed");
def->tooltip = L("Acceleration of top surface infill. Using a lower value may improve top surface quality."); def->tooltip = L("Acceleration of top surface infill. Using a lower value may improve top surface quality.");
def->sidetext = L(u8"mm/s²"); // millimeters per second per second, CIS languages need translation def->sidetext = L(u8"mm/s²"); // millimeters per second per second, CIS languages need translation
def->min = 0; def->min = 0;
def->mode = comAdvanced; def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(500)); def->nullable = true;
def->set_default_value(new ConfigOptionFloatsNullable{500});
def = this->add("outer_wall_acceleration", coFloat); def = this->add("outer_wall_acceleration", coFloats);
def->label = L("Outer wall"); def->label = L("Outer wall");
def->category = L("Speed"); def->category = L("Speed");
def->tooltip = L("Acceleration of outer wall. Using a lower value can improve quality."); def->tooltip = L("Acceleration of outer wall. Using a lower value can improve quality.");
def->sidetext = L(u8"mm/s²"); // millimeters per second per second, CIS languages need translation def->sidetext = L(u8"mm/s²"); // millimeters per second per second, CIS languages need translation
def->min = 0; def->min = 0;
def->mode = comAdvanced; def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(500)); def->nullable = true;
def->set_default_value(new ConfigOptionFloatsNullable{500});
def = this->add("bridge_acceleration", coFloatOrPercent); def = this->add("inner_wall_acceleration", coFloats);
def->label = L("Bridge"); def->label = L("Inner wall");
def->category = L("Speed"); 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->tooltip = L("Acceleration of inner walls.");
def->sidetext = L("mm/s² or %"); def->sidetext = L(u8"mm/s²"); // millimeters per second per second, CIS languages need translation
def->min = 0; def->min = 0;
def->mode = comAdvanced; def->mode = comAdvanced;
def->ratio_over = "outer_wall_acceleration"; def->nullable = true;
def->set_default_value(new ConfigOptionFloatOrPercent(50,true)); def->set_default_value(new ConfigOptionFloatsNullable{10000});
def = this->add("sparse_infill_acceleration", coFloatOrPercent); def = this->add("sparse_infill_acceleration", coFloatsOrPercents);
def->label = L("Sparse infill"); def->label = L("Sparse infill");
def->category = L("Speed"); 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->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.");
@@ -3119,9 +3076,10 @@ void PrintConfigDef::init_fff_params()
def->min = 0; def->min = 0;
def->mode = comAdvanced; def->mode = comAdvanced;
def->ratio_over = "default_acceleration"; def->ratio_over = "default_acceleration";
def->set_default_value(new ConfigOptionFloatOrPercent(100, true)); def->nullable = true;
def->set_default_value(new ConfigOptionFloatsOrPercentsNullable{FloatOrPercent(100, true)});
def = this->add("internal_solid_infill_acceleration", coFloatOrPercent); def = this->add("internal_solid_infill_acceleration", coFloatsOrPercents);
def->label = L("Internal solid infill"); def->label = L("Internal solid infill");
def->category = L("Speed"); 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->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.");
@@ -3129,25 +3087,18 @@ void PrintConfigDef::init_fff_params()
def->min = 0; def->min = 0;
def->mode = comAdvanced; def->mode = comAdvanced;
def->ratio_over = "default_acceleration"; def->ratio_over = "default_acceleration";
def->set_default_value(new ConfigOptionFloatOrPercent(100, true)); def->nullable = true;
def->set_default_value(new ConfigOptionFloatsOrPercentsNullable{FloatOrPercent(100, true)});
def = this->add("initial_layer_acceleration", coFloat); def = this->add("initial_layer_acceleration", coFloats);
def->label = L("First layer"); def->label = L("First layer");
def->category = L("Speed"); def->category = L("Speed");
def->tooltip = L("Acceleration of the first layer. Using a lower value can improve build plate adhesion."); def->tooltip = L("Acceleration of the first layer. Using a lower value can improve build plate adhesion.");
def->sidetext = L(u8"mm/s²"); // millimeters per second per second, CIS languages need translation def->sidetext = L(u8"mm/s²"); // millimeters per second per second, CIS languages need translation
def->min = 0; def->min = 0;
def->mode = comAdvanced; def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(300)); def->nullable = true;
def->set_default_value(new ConfigOptionFloatsNullable{300});
def = this->add("initial_layer_travel_acceleration", coFloatOrPercent);
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->min = 0;
def->mode = comAdvanced;
def->ratio_over = "travel_acceleration";
def->set_default_value(new ConfigOptionFloatOrPercent(100, true));
def = this->add("accel_to_decel_enable", coBool); def = this->add("accel_to_decel_enable", coBool);
def->label = L("Enable accel_to_decel"); def->label = L("Enable accel_to_decel");
@@ -3166,16 +3117,17 @@ void PrintConfigDef::init_fff_params()
def->mode = comAdvanced; def->mode = comAdvanced;
def->set_default_value(new ConfigOptionPercent(50)); def->set_default_value(new ConfigOptionPercent(50));
def = this->add("default_jerk", coFloat); def = this->add("default_jerk", coFloats);
def->label = L("Default"); def->label = L("Default");
def->category = L("Speed"); def->category = L("Speed");
def->tooltip = L("Default jerk."); def->tooltip = L("Default jerk.");
def->sidetext = L("mm/s"); // millimeters per second, CIS languages need translation def->sidetext = L("mm/s"); // millimeters per second, CIS languages need translation
def->min = 0; def->min = 0;
def->mode = comAdvanced; def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(0)); def->nullable = true;
def->set_default_value(new ConfigOptionFloatsNullable{0});
def = this->add("default_junction_deviation", coFloat); def = this->add("default_junction_deviation", coFloats);
def->label = L("Junction Deviation"); def->label = L("Junction Deviation");
def->category = L("Speed"); def->category = L("Speed");
def->tooltip = L("Marlin Firmware Junction Deviation (replaces the traditional XY Jerk setting)."); def->tooltip = L("Marlin Firmware Junction Deviation (replaces the traditional XY Jerk setting).");
@@ -3183,70 +3135,78 @@ void PrintConfigDef::init_fff_params()
def->min = 0.f; def->min = 0.f;
def->max = 0.3f; def->max = 0.3f;
def->mode = comAdvanced; def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(0.f)); def->nullable = true;
def->set_default_value(new ConfigOptionFloatsNullable{0.f});
def = this->add("outer_wall_jerk", coFloat); def = this->add("outer_wall_jerk", coFloats);
def->label = L("Outer wall"); def->label = L("Outer wall");
def->category = L("Speed"); def->category = L("Speed");
def->tooltip = L("Jerk of outer walls."); def->tooltip = L("Jerk of outer walls.");
def->sidetext = L("mm/s"); // millimeters per second, CIS languages need translation def->sidetext = L("mm/s"); // millimeters per second, CIS languages need translation
def->min = 0; def->min = 0;
def->mode = comAdvanced; def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(9)); def->nullable = true;
def->set_default_value(new ConfigOptionFloatsNullable{9});
def = this->add("inner_wall_jerk", coFloat); def = this->add("inner_wall_jerk", coFloats);
def->label = L("Inner wall"); def->label = L("Inner wall");
def->category = L("Speed"); def->category = L("Speed");
def->tooltip = L("Jerk of inner walls."); def->tooltip = L("Jerk of inner walls.");
def->sidetext = L("mm/s"); // millimeters per second, CIS languages need translation def->sidetext = L("mm/s"); // millimeters per second, CIS languages need translation
def->min = 0; def->min = 0;
def->mode = comAdvanced; def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(9)); def->nullable = true;
def->set_default_value(new ConfigOptionFloatsNullable{9});
def = this->add("top_surface_jerk", coFloat); def = this->add("top_surface_jerk", coFloats);
def->label = L("Top surface"); def->label = L("Top surface");
def->category = L("Speed"); def->category = L("Speed");
def->nullable = true;
def->tooltip = L("Jerk for top surface."); def->tooltip = L("Jerk for top surface.");
def->sidetext = L("mm/s"); // millimeters per second, CIS languages need translation def->sidetext = L("mm/s"); // millimeters per second, CIS languages need translation
def->min = 0; def->min = 0;
def->mode = comAdvanced; def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(9)); def->set_default_value(new ConfigOptionFloatsNullable{9});
def = this->add("infill_jerk", coFloat); def = this->add("infill_jerk", coFloats);
def->label = L("Infill"); def->label = L("Infill");
def->category = L("Speed"); def->category = L("Speed");
def->tooltip = L("Jerk for infill."); def->tooltip = L("Jerk for infill.");
def->sidetext = L("mm/s"); // millimeters per second, CIS languages need translation def->sidetext = L("mm/s"); // millimeters per second, CIS languages need translation
def->min = 0; def->min = 0;
def->mode = comAdvanced; def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(9)); def->nullable = true;
def->set_default_value(new ConfigOptionFloatsNullable{9});
def = this->add("initial_layer_jerk", coFloat); def = this->add("initial_layer_jerk", coFloats);
def->label = L("First layer"); def->label = L("First layer");
def->category = L("Speed"); def->category = L("Speed");
def->tooltip = L("Jerk for the first layer."); def->tooltip = L("Jerk for the first layer.");
def->sidetext = L("mm/s"); // millimeters per second, CIS languages need translation def->sidetext = L("mm/s"); // millimeters per second, CIS languages need translation
def->min = 0; def->min = 0;
def->mode = comAdvanced; def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(9)); def->nullable = true;
def->set_default_value(new ConfigOptionFloatsNullable{9});
def = this->add("travel_jerk", coFloat); def = this->add("travel_jerk", coFloats);
def->label = L("Travel"); def->label = L("Travel");
def->category = L("Speed"); def->category = L("Speed");
def->tooltip = L("Jerk for travel."); def->tooltip = L("Jerk for travel.");
def->sidetext = L("mm/s"); // millimeters per second, CIS languages need translation def->sidetext = L("mm/s"); // millimeters per second, CIS languages need translation
def->min = 0; def->min = 0;
def->mode = comAdvanced; def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(12)); def->nullable = true;
def->set_default_value(new ConfigOptionFloatsNullable{12});
def = this->add("initial_layer_travel_jerk", coFloatOrPercent); def = this->add("initial_layer_travel_jerk", coFloatsOrPercents);
def->label = L("First layer travel"); def->label = L("First layer travel");
def->tooltip = L("Travel jerk of first layer.\nThe percentage value is relative to Travel Jerk."); def->tooltip = L("Travel jerk of first layer.\nThe percentage value is relative to Travel Jerk.");
def->sidetext = L("mm/s or %"); def->sidetext = L("mm/s or %");
def->min = 0; def->min = 0;
def->mode = comAdvanced; def->mode = comAdvanced;
def->ratio_over = "travel_jerk"; def->ratio_over = "travel_jerk";
def->set_default_value(new ConfigOptionFloatOrPercent(100, true)); def->nullable = true;
def->set_default_value(new ConfigOptionFloatsOrPercentsNullable{FloatOrPercent(100, true)});
def = this->add("initial_layer_line_width", coFloatOrPercent); def = this->add("initial_layer_line_width", coFloatOrPercent);
def->label = L("First layer"); def->label = L("First layer");
@@ -3260,7 +3220,6 @@ void PrintConfigDef::init_fff_params()
def->mode = comAdvanced; def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloatOrPercent(0., false)); def->set_default_value(new ConfigOptionFloatOrPercent(0., false));
def = this->add("initial_layer_print_height", coFloat); def = this->add("initial_layer_print_height", coFloat);
def->label = L("First layer height"); def->label = L("First layer height");
def->category = L("Quality"); def->category = L("Quality");
@@ -3277,23 +3236,25 @@ void PrintConfigDef::init_fff_params()
// "Note that this option only takes effect if no prime tower is generated in current plate."); // "Note that this option only takes effect if no prime tower is generated in current plate.");
//def->set_default_value(new ConfigOptionBool(0)); //def->set_default_value(new ConfigOptionBool(0));
def = this->add("initial_layer_speed", coFloat); def = this->add("initial_layer_speed", coFloats);
def->label = L("First layer"); def->label = L("First layer");
def->tooltip = L("Speed of the first layer except the solid infill part."); def->tooltip = L("Speed of the first layer except the solid infill part.");
def->sidetext = L("mm/s"); // millimeters per second, CIS languages need translation def->sidetext = L("mm/s"); // millimeters per second, CIS languages need translation
def->min = 1; def->min = 1;
def->mode = comAdvanced; def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(30)); def->nullable = true;
def->set_default_value(new ConfigOptionFloatsNullable{30});
def = this->add("initial_layer_infill_speed", coFloat); def = this->add("initial_layer_infill_speed", coFloats);
def->label = L("First layer infill"); def->label = L("First layer infill");
def->tooltip = L("Speed of solid infill part of the first layer."); def->tooltip = L("Speed of solid infill part of the first layer.");
def->sidetext = L("mm/s"); // millimeters per second, CIS languages need translation def->sidetext = L("mm/s"); // millimeters per second, CIS languages need translation
def->min = 1; def->min = 1;
def->mode = comAdvanced; def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(60.0)); def->nullable = true;
def->set_default_value(new ConfigOptionFloatsNullable{60.0});
def = this->add("initial_layer_travel_speed", coFloatOrPercent); def = this->add("initial_layer_travel_speed", coFloatsOrPercents);
def->label = L("First layer travel speed"); def->label = L("First layer travel speed");
def->tooltip = L("Travel speed of the first layer."); def->tooltip = L("Travel speed of the first layer.");
def->category = L("Speed"); def->category = L("Speed");
@@ -3301,7 +3262,8 @@ void PrintConfigDef::init_fff_params()
def->ratio_over = "travel_speed"; def->ratio_over = "travel_speed";
def->min = 1; def->min = 1;
def->mode = comAdvanced; def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloatOrPercent(100, true)); def->nullable = true;
def->set_default_value(new ConfigOptionFloatsOrPercentsNullable{FloatOrPercent(100, true)});
def = this->add("slow_down_layers", coInt); def = this->add("slow_down_layers", coInt);
def->label = L("Number of slow layers"); def->label = L("Number of slow layers");
@@ -3584,14 +3546,15 @@ void PrintConfigDef::init_fff_params()
def->mode = comAdvanced; def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(0)); def->set_default_value(new ConfigOptionFloat(0));
def = this->add("gap_infill_speed", coFloat); def = this->add("gap_infill_speed", coFloats);
def->label = L("Gap infill"); def->label = L("Gap infill");
def->category = L("Speed"); def->category = L("Speed");
def->tooltip = L("Speed of gap infill. Gap usually has irregular line width and should be printed more slowly."); def->tooltip = L("Speed of gap infill. Gap usually has irregular line width and should be printed more slowly.");
def->sidetext = L("mm/s"); // millimeters per second, CIS languages need translation def->sidetext = L("mm/s"); // millimeters per second, CIS languages need translation
def->min = 1; def->min = 1;
def->mode = comAdvanced; def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(30)); def->nullable = true;
def->set_default_value(new ConfigOptionFloatsNullable{30});
// BBS // BBS
def = this->add("precise_z_height", coBool); def = this->add("precise_z_height", coBool);
@@ -4004,6 +3967,87 @@ void PrintConfigDef::init_fff_params()
def->gui_type = ConfigOptionDef::GUIType::one_string; def->gui_type = ConfigOptionDef::GUIType::one_string;
def->set_default_value(new ConfigOptionPoints()); def->set_default_value(new ConfigOptionPoints());
def = this->add("lateral_lattice_angle_1", coFloat);
def->label = L("Lateral lattice angle 1");
def->category = L("Strength");
def->tooltip = L("The angle of the first set of Lateral lattice elements in the Z direction. Zero is vertical.");
def->sidetext = u8"°"; // degrees, don't need translation
def->min = -75;
def->max = 75;
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(-45));
def = this->add("lateral_lattice_angle_2", coFloat);
def->label = L("Lateral lattice angle 2");
def->category = L("Strength");
def->tooltip = L("The angle of the second set of Lateral lattice elements in the Z direction. Zero is vertical.");
def->sidetext = u8"°"; // degrees, don't need translation
def->min = -75;
def->max = 75;
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(45));
def = this->add("infill_overhang_angle", coFloat);
def->label = L("Infill overhang angle");
def->category = L("Strength");
def->tooltip = L("The angle of the infill angled lines. 60° will result in a pure honeycomb.");
def->sidetext = u8"°"; // degrees, don't need translation
def->min = 15;
def->max = 75;
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(60));
auto def_infill_anchor_min = def = this->add("infill_anchor", coFloatOrPercent);
def->label = L("Sparse infill anchor length");
def->category = L("Strength");
def->tooltip = L("Connect an infill line to an internal perimeter with a short segment of an additional perimeter. "
"If expressed as percentage (example: 15%) it is calculated over infill extrusion width. "
"Orca Slicer tries to connect two close infill lines to a short perimeter segment. If no such perimeter segment "
"shorter than infill_anchor_max is found, the infill line is connected to a perimeter segment at just one side "
"and the length of the perimeter segment taken is limited to this parameter, but no longer than anchor_length_max.\n"
"Set this parameter to zero to disable anchoring perimeters connected to a single infill line.");
def->sidetext = L("mm or %");
def->ratio_over = "sparse_infill_line_width";
def->max_literal = 1000;
def->gui_type = ConfigOptionDef::GUIType::f_enum_open;
def->enum_values.push_back("0");
def->enum_values.push_back("1");
def->enum_values.push_back("2");
def->enum_values.push_back("5");
def->enum_values.push_back("10");
def->enum_values.push_back("1000");
def->enum_labels.push_back(L("0 (no open anchors)"));
def->enum_labels.push_back("1 mm");
def->enum_labels.push_back("2 mm");
def->enum_labels.push_back("5 mm");
def->enum_labels.push_back("10 mm");
def->enum_labels.push_back(L("1000 (unlimited)"));
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloatOrPercent(400, true));
def = this->add("infill_anchor_max", coFloatOrPercent);
def->label = L("Maximum length of the infill anchor");
def->category = L("Strength");
def->tooltip = L("Connect an infill line to an internal perimeter with a short segment of an additional perimeter. "
"If expressed as percentage (example: 15%) it is calculated over infill extrusion width. "
"Orca Slicer tries to connect two close infill lines to a short perimeter segment. If no such perimeter segment "
"shorter than this parameter is found, the infill line is connected to a perimeter segment at just one side "
"and the length of the perimeter segment taken is limited to infill_anchor, but no longer than this parameter.\n"
"If set to 0, the old algorithm for infill connection will be used, it should create the same result as with 1000 & 0.");
def->sidetext = def_infill_anchor_min->sidetext;
def->ratio_over = def_infill_anchor_min->ratio_over;
def->gui_type = def_infill_anchor_min->gui_type;
def->enum_values = def_infill_anchor_min->enum_values;
def->max_literal = def_infill_anchor_min->max_literal;
def->enum_labels.push_back(L("0 (Simple connect)"));
def->enum_labels.push_back("1 mm");
def->enum_labels.push_back("2 mm");
def->enum_labels.push_back("5 mm");
def->enum_labels.push_back("10 mm");
def->enum_labels.push_back(L("1000 (unlimited)"));
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloatOrPercent(20, false));
def = this->add("sparse_infill_filament", coInt); def = this->add("sparse_infill_filament", coInt);
def->gui_type = ConfigOptionDef::GUIType::i_enum_open; def->gui_type = ConfigOptionDef::GUIType::i_enum_open;
def->label = L("Infill"); def->label = L("Infill");
@@ -4051,14 +4095,15 @@ void PrintConfigDef::init_fff_params()
def->mode = comAdvanced; def->mode = comAdvanced;
def->set_default_value(new ConfigOptionPercent(25)); def->set_default_value(new ConfigOptionPercent(25));
def = this->add("sparse_infill_speed", coFloat); def = this->add("sparse_infill_speed", coFloats);
def->label = L("Sparse infill"); def->label = L("Sparse infill");
def->category = L("Speed"); def->category = L("Speed");
def->tooltip = L("Speed of internal sparse infill."); def->tooltip = L("Speed of internal sparse infill.");
def->sidetext = L("mm/s"); // millimeters per second, CIS languages need translation def->sidetext = L("mm/s"); // millimeters per second, CIS languages need translation
def->min = 1; def->min = 1;
def->mode = comAdvanced; def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(100)); def->nullable = true;
def->set_default_value(new ConfigOptionFloatsNullable{100});
def = this->add("inherits", coString); def = this->add("inherits", coString);
def->label = L("Inherits profile"); def->label = L("Inherits profile");
@@ -5250,6 +5295,18 @@ void PrintConfigDef::init_fff_params()
def->tooltip = "AMS counts per extruder."; def->tooltip = "AMS counts per extruder.";
def->set_default_value(new ConfigOptionStrings { }); def->set_default_value(new ConfigOptionStrings { });
def = this->add("enable_filament_dynamic_map", coBool);
def->label = L("Enable filament dynamic map");
def->tooltip = L("Enable dynamic filament mapping during print.");
def->mode = comDevelop;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("has_filament_switcher", coBool);
def->label = L("Has filament switcher");
def->tooltip = L("Printer has a filament switcher hardware (e.g., AMS).");
def->mode = comDevelop;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("printer_extruder_id", coInts); def = this->add("printer_extruder_id", coInts);
// internal use only, don't need translation // internal use only, don't need translation
def->label = "Printer extruder id"; def->label = "Printer extruder id";
@@ -5667,14 +5724,15 @@ void PrintConfigDef::init_fff_params()
def->mode = comAdvanced; def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloatOrPercent(0., false)); def->set_default_value(new ConfigOptionFloatOrPercent(0., false));
def = this->add("internal_solid_infill_speed", coFloat); def = this->add("internal_solid_infill_speed", coFloats);
def->label = L("Internal solid infill"); def->label = L("Internal solid infill");
def->category = L("Speed"); def->category = L("Speed");
def->tooltip = L("Speed of internal solid infill, not the top and bottom surface."); def->tooltip = L("Speed of internal solid infill, not the top and bottom surface.");
def->sidetext = L("mm/s"); // millimeters per second, CIS languages need translation def->sidetext = L("mm/s"); // millimeters per second, CIS languages need translation
def->min = 1; def->min = 1;
def->mode = comAdvanced; def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(100)); def->nullable = true;
def->set_default_value(new ConfigOptionFloatsNullable{100});
def = this->add("spiral_mode", coBool); def = this->add("spiral_mode", coBool);
def->label = L("Spiral vase"); def->label = L("Spiral vase");
@@ -6122,14 +6180,15 @@ void PrintConfigDef::init_fff_params()
def->mode = comAdvanced; def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(0.5)); def->set_default_value(new ConfigOptionFloat(0.5));
def = this->add("support_interface_speed", coFloat); def = this->add("support_interface_speed", coFloats);
def->label = L("Support interface"); def->label = L("Support interface");
def->category = L("Speed"); def->category = L("Speed");
def->tooltip = L("Speed of support interface."); def->tooltip = L("Speed of support interface.");
def->sidetext = L("mm/s"); // millimeters per second, CIS languages need translation def->sidetext = L("mm/s"); // millimeters per second, CIS languages need translation
def->min = 1; def->min = 1;
def->mode = comAdvanced; def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(80)); def->nullable = true;
def->set_default_value(new ConfigOptionFloatsNullable{80});
def = this->add("support_base_pattern", coEnum); def = this->add("support_base_pattern", coEnum);
def->label = L("Base pattern"); def->label = L("Base pattern");
@@ -6193,14 +6252,15 @@ void PrintConfigDef::init_fff_params()
def->mode = comAdvanced; def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(0)); def->set_default_value(new ConfigOptionFloat(0));
def = this->add("support_speed", coFloat); def = this->add("support_speed", coFloats);
def->label = L("Support"); def->label = L("Support");
def->category = L("Speed"); def->category = L("Speed");
def->tooltip = L("Speed of support."); def->tooltip = L("Speed of support.");
def->sidetext = L("mm/s"); // millimeters per second, CIS languages need translation def->sidetext = L("mm/s"); // millimeters per second, CIS languages need translation
def->min = 1; def->min = 1;
def->mode = comAdvanced; def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(80)); def->nullable = true;
def->set_default_value(new ConfigOptionFloatsNullable{ 80 });
def = this->add("support_style", coEnum); def = this->add("support_style", coEnum);
def->label = L("Style"); def->label = L("Style");
@@ -6553,14 +6613,15 @@ void PrintConfigDef::init_fff_params()
def->mode = comAdvanced; def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloatOrPercent(0., false)); def->set_default_value(new ConfigOptionFloatOrPercent(0., false));
def = this->add("top_surface_speed", coFloat); def = this->add("top_surface_speed", coFloats);
def->label = L("Top surface"); def->label = L("Top surface");
def->category = L("Speed"); def->category = L("Speed");
def->tooltip = L("Speed of top surface infill which is solid."); def->tooltip = L("Speed of top surface infill which is solid.");
def->sidetext = L("mm/s"); // millimeters per second, CIS languages need translation def->sidetext = L("mm/s"); // millimeters per second, CIS languages need translation
def->min = 1; def->min = 1;
def->mode = comAdvanced; def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(100)); def->nullable = true;
def->set_default_value(new ConfigOptionFloatsNullable{100});
def = this->add("top_shell_layers", coInt); def = this->add("top_shell_layers", coInt);
def->label = L("Top shell layers"); def->label = L("Top shell layers");
@@ -6584,39 +6645,17 @@ void PrintConfigDef::init_fff_params()
def->min = 0; def->min = 0;
def->set_default_value(new ConfigOptionFloat(0.6)); def->set_default_value(new ConfigOptionFloat(0.6));
def = this->add("top_surface_density", coPercent);
def->label = L("Top surface density");
def->category = L("Strength");
def->tooltip = L("Density of top surface layer. A value of 100% creates a fully solid, smooth top layer. "
"Reducing this value results in a textured top surface, according to the chosen top surface pattern. "
"A value of 0% will result in only the walls on the top layer being created. "
"Intended for aesthetic or functional purposes, not to fix issues such as over-extrusion.");
def->sidetext = ("%");
def->min = 0;
def->max = 100;
def->set_default_value(new ConfigOptionPercent(100));
def = this->add("bottom_surface_density", coPercent); def = this->add("travel_speed", coFloats);
def->label = L("Bottom surface density");
def->category = L("Strength");
def->tooltip = L("Density of the bottom surface layer. "
"Intended for aesthetic or functional purposes, not to fix issues such as over-extrusion.\n"
"WARNING: Lowering this value may negatively affect bed adhesion.");
def->sidetext = ("%");
def->min = 10;
def->max = 100;
def->set_default_value(new ConfigOptionPercent(100));
def = this->add("travel_speed", coFloat);
def->label = L("Travel"); def->label = L("Travel");
def->tooltip = L("Speed of travel which is faster and without extrusion."); def->tooltip = L("Speed of travel which is faster and without extrusion.");
def->sidetext = L("mm/s"); // millimeters per second, CIS languages need translation def->sidetext = L("mm/s"); // millimeters per second, CIS languages need translation
def->min = 1; def->min = 1;
def->mode = comAdvanced; def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(120)); def->nullable = true;
def->set_default_value(new ConfigOptionFloatsNullable{120});
def = this->add("travel_speed_z", coFloat); def = this->add("travel_speed_z", coFloats);
//def->label = L("Z travel"); //def->label = L("Z travel");
//def->tooltip = L("Speed of vertical travel along z axis. " //def->tooltip = L("Speed of vertical travel along z axis. "
// "This is typically lower because build plate or gantry is hard to be moved. " // "This is typically lower because build plate or gantry is hard to be moved. "
@@ -6624,7 +6663,8 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("mm/s"); // millimeters per second, CIS languages need translation def->sidetext = L("mm/s"); // millimeters per second, CIS languages need translation
def->min = 0; def->min = 0;
def->mode = comDevelop; def->mode = comDevelop;
def->set_default_value(new ConfigOptionFloat(0.)); def->nullable = true;
def->set_default_value(new ConfigOptionFloatsNullable{0.});
def = this->add("wipe", coBools); def = this->add("wipe", coBools);
def->label = L("Wipe while retracting"); def->label = L("Wipe while retracting");
@@ -8155,32 +8195,48 @@ const PrintConfigDef print_config_def;
//todo //todo
std::set<std::string> print_options_with_variant = { std::set<std::string> print_options_with_variant = {
//"initial_layer_speed", "initial_layer_speed",
//"initial_layer_infill_speed", "initial_layer_infill_speed",
//"outer_wall_speed", "outer_wall_speed",
"inner_wall_speed", "inner_wall_speed",
//"small_perimeter_speed", //coFloatsOrPercents "small_perimeter_speed", //coFloatsOrPercents
//"small_perimeter_threshold", "small_perimeter_threshold",
//"sparse_infill_speed", "sparse_infill_speed",
//"internal_solid_infill_speed", "internal_solid_infill_speed",
//"top_surface_speed", "top_surface_speed",
//"enable_overhang_speed", //coBools "enable_overhang_speed", //coBools
//"overhang_1_4_speed", "overhang_1_4_speed",
//"overhang_2_4_speed", "overhang_2_4_speed",
//"overhang_3_4_speed", "overhang_3_4_speed",
//"overhang_4_4_speed", "overhang_4_4_speed",
//"bridge_speed", "slowdown_for_curled_perimeters",
//"gap_infill_speed", "bridge_speed",
//"support_speed", "internal_bridge_speed",
//"support_interface_speed", "gap_infill_speed",
//"travel_speed", "support_speed",
//"travel_speed_z", "support_interface_speed",
//"default_acceleration", "travel_speed",
//"initial_layer_acceleration", "travel_speed_z",
//"outer_wall_acceleration", "initial_layer_travel_speed",
//"inner_wall_acceleration", "default_acceleration",
//"sparse_infill_acceleration", //coFloatsOrPercents "bridge_acceleration",
//"top_surface_acceleration", "travel_acceleration",
"initial_layer_travel_acceleration",
"initial_layer_acceleration",
"outer_wall_acceleration",
"inner_wall_acceleration",
"sparse_infill_acceleration", //coFloatsOrPercents
"internal_solid_infill_acceleration", //coFloatsOrPercents
"top_surface_acceleration",
"default_jerk",
"outer_wall_jerk",
"inner_wall_jerk",
"infill_jerk",
"top_surface_jerk",
"initial_layer_jerk",
"travel_jerk",
"initial_layer_travel_jerk",
"default_junction_deviation",
"print_extruder_id", //coInts "print_extruder_id", //coInts
"print_extruder_variant" //coStrings "print_extruder_variant" //coStrings
}; };
+42 -42
View File
@@ -976,13 +976,13 @@ PRINT_CONFIG_CLASS_DEFINE(
((ConfigOptionInt, support_interface_bottom_layers)) ((ConfigOptionInt, support_interface_bottom_layers))
// Spacing between interface lines (the hatching distance). Set zero to get a solid interface. // Spacing between interface lines (the hatching distance). Set zero to get a solid interface.
((ConfigOptionFloat, support_interface_spacing)) ((ConfigOptionFloat, support_interface_spacing))
((ConfigOptionFloat, support_interface_speed)) ((ConfigOptionFloatsNullable, support_interface_speed))
((ConfigOptionEnum<SupportMaterialPattern>, support_base_pattern)) ((ConfigOptionEnum<SupportMaterialPattern>, support_base_pattern))
((ConfigOptionEnum<SupportMaterialInterfacePattern>, support_interface_pattern)) ((ConfigOptionEnum<SupportMaterialInterfacePattern>, support_interface_pattern))
// Spacing between support material lines (the hatching distance). // Spacing between support material lines (the hatching distance).
((ConfigOptionFloat, support_base_pattern_spacing)) ((ConfigOptionFloat, support_base_pattern_spacing))
((ConfigOptionFloat, support_expansion)) ((ConfigOptionFloat, support_expansion))
((ConfigOptionFloat, support_speed)) ((ConfigOptionFloatsNullable, support_speed))
((ConfigOptionEnum<SupportMaterialStyle>, support_style)) ((ConfigOptionEnum<SupportMaterialStyle>, support_style))
// Orca: a flag enabling the ability to override flow ratios // Orca: a flag enabling the ability to override flow ratios
@@ -1050,25 +1050,25 @@ PRINT_CONFIG_CLASS_DEFINE(
((ConfigOptionFloat, min_length_factor)) ((ConfigOptionFloat, min_length_factor))
// Move all acceleration and jerk settings to object // Move all acceleration and jerk settings to object
((ConfigOptionFloat, default_acceleration)) ((ConfigOptionFloatsNullable, default_acceleration))
((ConfigOptionFloat, outer_wall_acceleration)) ((ConfigOptionFloatsNullable, outer_wall_acceleration))
((ConfigOptionFloat, inner_wall_acceleration)) ((ConfigOptionFloatsNullable, inner_wall_acceleration))
((ConfigOptionFloat, top_surface_acceleration)) ((ConfigOptionFloatsNullable, top_surface_acceleration))
((ConfigOptionFloat, initial_layer_acceleration)) ((ConfigOptionFloatsNullable, initial_layer_acceleration))
((ConfigOptionFloatOrPercent, bridge_acceleration)) ((ConfigOptionFloatsOrPercentsNullable, bridge_acceleration))
((ConfigOptionFloat, travel_acceleration)) ((ConfigOptionFloatsNullable, travel_acceleration))
((ConfigOptionFloatOrPercent, sparse_infill_acceleration)) ((ConfigOptionFloatsOrPercentsNullable, sparse_infill_acceleration))
((ConfigOptionFloatOrPercent, internal_solid_infill_acceleration)) ((ConfigOptionFloatsOrPercentsNullable, internal_solid_infill_acceleration))
((ConfigOptionFloat, default_jerk)) ((ConfigOptionFloatsNullable, default_jerk))
((ConfigOptionFloat, outer_wall_jerk)) ((ConfigOptionFloatsNullable, outer_wall_jerk))
((ConfigOptionFloat, inner_wall_jerk)) ((ConfigOptionFloatsNullable, inner_wall_jerk))
((ConfigOptionFloat, infill_jerk)) ((ConfigOptionFloatsNullable, infill_jerk))
((ConfigOptionFloat, top_surface_jerk)) ((ConfigOptionFloatsNullable, top_surface_jerk))
((ConfigOptionFloat, initial_layer_jerk)) ((ConfigOptionFloatsNullable, initial_layer_jerk))
((ConfigOptionFloat, travel_jerk)) ((ConfigOptionFloatsNullable, travel_jerk))
((ConfigOptionBool, precise_z_height)) ((ConfigOptionBool, precise_z_height))
((ConfigOptionFloat, default_junction_deviation)) ((ConfigOptionFloatsNullable, default_junction_deviation))
((ConfigOptionBool, interlocking_beam)) ((ConfigOptionBool, interlocking_beam))
((ConfigOptionFloat,interlocking_beam_width)) ((ConfigOptionFloat,interlocking_beam_width))
@@ -1093,8 +1093,8 @@ PRINT_CONFIG_CLASS_DEFINE(
((ConfigOptionFloat, internal_bridge_angle)) // ORCA: Internal bridge angle override ((ConfigOptionFloat, internal_bridge_angle)) // ORCA: Internal bridge angle override
((ConfigOptionFloat, bridge_flow)) ((ConfigOptionFloat, bridge_flow))
((ConfigOptionFloat, internal_bridge_flow)) ((ConfigOptionFloat, internal_bridge_flow))
((ConfigOptionFloat, bridge_speed)) ((ConfigOptionFloatsNullable, bridge_speed))
((ConfigOptionFloatOrPercent, internal_bridge_speed)) ((ConfigOptionFloatsOrPercentsNullable, internal_bridge_speed))
((ConfigOptionEnum<EnsureVerticalShellThickness>, ensure_vertical_shell_thickness)) ((ConfigOptionEnum<EnsureVerticalShellThickness>, ensure_vertical_shell_thickness))
((ConfigOptionPercent, top_surface_density)) ((ConfigOptionPercent, top_surface_density))
((ConfigOptionPercent, bottom_surface_density)) ((ConfigOptionPercent, bottom_surface_density))
@@ -1102,7 +1102,7 @@ PRINT_CONFIG_CLASS_DEFINE(
((ConfigOptionEnum<InfillPattern>, bottom_surface_pattern)) ((ConfigOptionEnum<InfillPattern>, bottom_surface_pattern))
((ConfigOptionEnum<InfillPattern>, internal_solid_infill_pattern)) ((ConfigOptionEnum<InfillPattern>, internal_solid_infill_pattern))
((ConfigOptionFloatOrPercent, outer_wall_line_width)) ((ConfigOptionFloatOrPercent, outer_wall_line_width))
((ConfigOptionFloat, outer_wall_speed)) ((ConfigOptionFloatsNullable, outer_wall_speed))
((ConfigOptionFloat, infill_direction)) ((ConfigOptionFloat, infill_direction))
((ConfigOptionFloat, solid_infill_direction)) ((ConfigOptionFloat, solid_infill_direction))
((ConfigOptionString, solid_infill_rotate_template)) ((ConfigOptionString, solid_infill_rotate_template))
@@ -1128,12 +1128,12 @@ PRINT_CONFIG_CLASS_DEFINE(
((ConfigOptionInt, fuzzy_skin_ripples_per_layer)) ((ConfigOptionInt, fuzzy_skin_ripples_per_layer))
((ConfigOptionPercent, fuzzy_skin_ripple_offset)) ((ConfigOptionPercent, fuzzy_skin_ripple_offset))
((ConfigOptionInt, fuzzy_skin_layers_between_ripple_offset)) ((ConfigOptionInt, fuzzy_skin_layers_between_ripple_offset))
((ConfigOptionFloat, gap_infill_speed)) ((ConfigOptionFloatsNullable, gap_infill_speed))
((ConfigOptionInt, sparse_infill_filament)) ((ConfigOptionInt, sparse_infill_filament))
((ConfigOptionFloatOrPercent, sparse_infill_line_width)) ((ConfigOptionFloatOrPercent, sparse_infill_line_width))
((ConfigOptionPercent, infill_wall_overlap)) ((ConfigOptionPercent, infill_wall_overlap))
((ConfigOptionPercent, top_bottom_infill_wall_overlap)) ((ConfigOptionPercent, top_bottom_infill_wall_overlap))
((ConfigOptionFloat, sparse_infill_speed)) ((ConfigOptionFloatsNullable, sparse_infill_speed))
((ConfigOptionPercent, skeleton_infill_density)) ((ConfigOptionPercent, skeleton_infill_density))
((ConfigOptionPercent, skin_infill_density)) ((ConfigOptionPercent, skin_infill_density))
((ConfigOptionFloat, infill_lock_depth)) ((ConfigOptionFloat, infill_lock_depth))
@@ -1171,19 +1171,19 @@ PRINT_CONFIG_CLASS_DEFINE(
((ConfigOptionFloat, minimum_sparse_infill_area)) ((ConfigOptionFloat, minimum_sparse_infill_area))
((ConfigOptionInt, solid_infill_filament)) ((ConfigOptionInt, solid_infill_filament))
((ConfigOptionFloatOrPercent, internal_solid_infill_line_width)) ((ConfigOptionFloatOrPercent, internal_solid_infill_line_width))
((ConfigOptionFloat, internal_solid_infill_speed)) ((ConfigOptionFloatsNullable, internal_solid_infill_speed))
// Detect thin walls. // Detect thin walls.
((ConfigOptionBool, detect_thin_wall)) ((ConfigOptionBool, detect_thin_wall))
((ConfigOptionFloatOrPercent, top_surface_line_width)) ((ConfigOptionFloatOrPercent, top_surface_line_width))
((ConfigOptionInt, top_shell_layers)) ((ConfigOptionInt, top_shell_layers))
((ConfigOptionFloat, top_shell_thickness)) ((ConfigOptionFloat, top_shell_thickness))
((ConfigOptionFloat, top_surface_speed)) ((ConfigOptionFloatsNullable, top_surface_speed))
//BBS //BBS
((ConfigOptionBool, enable_overhang_speed)) ((ConfigOptionBoolsNullable, enable_overhang_speed))
((ConfigOptionFloatOrPercent, overhang_1_4_speed)) ((ConfigOptionFloatsOrPercentsNullable, overhang_1_4_speed))
((ConfigOptionFloatOrPercent, overhang_2_4_speed)) ((ConfigOptionFloatsOrPercentsNullable, overhang_2_4_speed))
((ConfigOptionFloatOrPercent, overhang_3_4_speed)) ((ConfigOptionFloatsOrPercentsNullable, overhang_3_4_speed))
((ConfigOptionFloatOrPercent, overhang_4_4_speed)) ((ConfigOptionFloatsOrPercentsNullable, overhang_4_4_speed))
((ConfigOptionBool, only_one_wall_top)) ((ConfigOptionBool, only_one_wall_top))
//SoftFever //SoftFever
@@ -1199,8 +1199,8 @@ PRINT_CONFIG_CLASS_DEFINE(
((ConfigOptionBool, precise_outer_wall)) ((ConfigOptionBool, precise_outer_wall))
((ConfigOptionPercent, bridge_density)) ((ConfigOptionPercent, bridge_density))
((ConfigOptionFloat, filter_out_gap_fill)) ((ConfigOptionFloat, filter_out_gap_fill))
((ConfigOptionFloatOrPercent, small_perimeter_speed)) ((ConfigOptionFloatsOrPercentsNullable, small_perimeter_speed))
((ConfigOptionFloat, small_perimeter_threshold)) ((ConfigOptionFloatsNullable, small_perimeter_threshold))
((ConfigOptionFloat, top_solid_infill_flow_ratio)) ((ConfigOptionFloat, top_solid_infill_flow_ratio))
((ConfigOptionFloat, bottom_solid_infill_flow_ratio)) ((ConfigOptionFloat, bottom_solid_infill_flow_ratio))
((ConfigOptionFloatOrPercent, infill_anchor)) ((ConfigOptionFloatOrPercent, infill_anchor))
@@ -1209,7 +1209,7 @@ PRINT_CONFIG_CLASS_DEFINE(
// Orca // Orca
((ConfigOptionBool, make_overhang_printable)) ((ConfigOptionBool, make_overhang_printable))
((ConfigOptionBool, extra_perimeters_on_overhangs)) ((ConfigOptionBool, extra_perimeters_on_overhangs))
((ConfigOptionBool, slowdown_for_curled_perimeters)) ((ConfigOptionBoolsNullable, slowdown_for_curled_perimeters))
((ConfigOptionBool, hole_to_polyhole)) ((ConfigOptionBool, hole_to_polyhole))
((ConfigOptionFloatOrPercent, hole_to_polyhole_threshold)) ((ConfigOptionFloatOrPercent, hole_to_polyhole_threshold))
((ConfigOptionBool, hole_to_polyhole_twisted)) ((ConfigOptionBool, hole_to_polyhole_twisted))
@@ -1372,7 +1372,7 @@ PRINT_CONFIG_CLASS_DEFINE(
((ConfigOptionFloat, max_volumetric_extrusion_rate_slope)) ((ConfigOptionFloat, max_volumetric_extrusion_rate_slope))
((ConfigOptionFloat, max_volumetric_extrusion_rate_slope_segment_length)) ((ConfigOptionFloat, max_volumetric_extrusion_rate_slope_segment_length))
((ConfigOptionBool, extrusion_rate_smoothing_external_perimeter_only)) ((ConfigOptionBool, extrusion_rate_smoothing_external_perimeter_only))
((ConfigOptionPercents, retract_before_wipe)) ((ConfigOptionPercents, retract_before_wipe))
@@ -1404,8 +1404,8 @@ PRINT_CONFIG_CLASS_DEFINE(
((ConfigOptionString, change_extrusion_role_gcode)) ((ConfigOptionString, change_extrusion_role_gcode))
((ConfigOptionString, process_change_extrusion_role_gcode)) ((ConfigOptionString, process_change_extrusion_role_gcode))
((ConfigOptionStrings, filament_change_extrusion_role_gcode)) ((ConfigOptionStrings, filament_change_extrusion_role_gcode))
((ConfigOptionFloat, travel_speed)) ((ConfigOptionFloatsNullable, travel_speed))
((ConfigOptionFloat, travel_speed_z)) ((ConfigOptionFloatsNullable, travel_speed_z))
((ConfigOptionBool, silent_mode)) ((ConfigOptionBool, silent_mode))
((ConfigOptionString, machine_pause_gcode)) ((ConfigOptionString, machine_pause_gcode))
((ConfigOptionString, template_custom_gcode)) ((ConfigOptionString, template_custom_gcode))
@@ -1429,9 +1429,9 @@ PRINT_CONFIG_CLASS_DEFINE(
((ConfigOptionBool, use_relative_e_distances)) ((ConfigOptionBool, use_relative_e_distances))
((ConfigOptionBool, accel_to_decel_enable)) ((ConfigOptionBool, accel_to_decel_enable))
((ConfigOptionPercent, accel_to_decel_factor)) ((ConfigOptionPercent, accel_to_decel_factor))
((ConfigOptionFloatOrPercent, initial_layer_travel_speed)) ((ConfigOptionFloatsOrPercentsNullable, initial_layer_travel_speed))
((ConfigOptionFloatOrPercent, initial_layer_travel_acceleration)) ((ConfigOptionFloatsOrPercentsNullable, initial_layer_travel_acceleration))
((ConfigOptionFloatOrPercent, initial_layer_travel_jerk)) ((ConfigOptionFloatsOrPercentsNullable, initial_layer_travel_jerk))
((ConfigOptionBool, bbl_calib_mark_logo)) ((ConfigOptionBool, bbl_calib_mark_logo))
((ConfigOptionBool, disable_m73)) ((ConfigOptionBool, disable_m73))
@@ -1537,10 +1537,10 @@ PRINT_CONFIG_CLASS_DERIVED_DEFINE(
((ConfigOptionInts, complete_print_exhaust_fan_speed)) ((ConfigOptionInts, complete_print_exhaust_fan_speed))
((ConfigOptionFloatOrPercent, initial_layer_line_width)) ((ConfigOptionFloatOrPercent, initial_layer_line_width))
((ConfigOptionFloat, initial_layer_print_height)) ((ConfigOptionFloat, initial_layer_print_height))
((ConfigOptionFloat, initial_layer_speed)) ((ConfigOptionFloatsNullable, initial_layer_speed))
//BBS //BBS
((ConfigOptionFloat, initial_layer_infill_speed)) ((ConfigOptionFloatsNullable, initial_layer_infill_speed))
((ConfigOptionInts, nozzle_temperature_initial_layer)) ((ConfigOptionInts, nozzle_temperature_initial_layer))
((ConfigOptionInts, full_fan_speed_layer)) ((ConfigOptionInts, full_fan_speed_layer))
((ConfigOptionFloats, fan_max_speed)) ((ConfigOptionFloats, fan_max_speed))
+11 -11
View File
@@ -567,7 +567,7 @@ void ConfigManipulation::apply_null_fff_config(DynamicPrintConfig *config, std::
} }
} }
void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, const bool is_global_config) void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, int variant_index, const bool is_global_config)
{ {
PresetBundle *preset_bundle = wxGetApp().preset_bundle; PresetBundle *preset_bundle = wxGetApp().preset_bundle;
@@ -669,7 +669,7 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, co
for (auto el : { "top_surface_line_width", "top_surface_speed" }) for (auto el : { "top_surface_line_width", "top_surface_speed" })
toggle_field(el, has_top_shell); toggle_field(el, has_top_shell);
bool have_default_acceleration = config->opt_float("default_acceleration") > 0; bool have_default_acceleration = config->opt_float_nullable("default_acceleration", variant_index) > 0;
for (auto el : {"outer_wall_acceleration", "inner_wall_acceleration", "initial_layer_acceleration", "initial_layer_travel_acceleration", for (auto el : {"outer_wall_acceleration", "inner_wall_acceleration", "initial_layer_acceleration", "initial_layer_travel_acceleration",
"top_surface_acceleration", "travel_acceleration", "bridge_acceleration", "sparse_infill_acceleration", "internal_solid_infill_acceleration"}) "top_surface_acceleration", "travel_acceleration", "bridge_acceleration", "sparse_infill_acceleration", "internal_solid_infill_acceleration"})
@@ -683,17 +683,17 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, co
} }
toggle_line("default_junction_deviation", gcflavor == gcfMarlinFirmware); toggle_line("default_junction_deviation", gcflavor == gcfMarlinFirmware);
if (machine_supports_junction_deviation) { if (machine_supports_junction_deviation) {
toggle_field("default_junction_deviation", true); toggle_field("default_junction_deviation", true, variant_index);
toggle_field("default_jerk", false); toggle_field("default_jerk", false, variant_index);
for (auto el : { "outer_wall_jerk", "inner_wall_jerk", "initial_layer_jerk", "initial_layer_travel_jerk", "top_surface_jerk", "travel_jerk", "infill_jerk"}) for (auto el : { "outer_wall_jerk", "inner_wall_jerk", "initial_layer_jerk", "initial_layer_travel_jerk", "top_surface_jerk", "travel_jerk", "infill_jerk"})
toggle_line(el, false); toggle_line(el, false, variant_index);
} else { } else {
toggle_field("default_junction_deviation", false); toggle_field("default_junction_deviation", false);
toggle_field("default_jerk", true); toggle_field("default_jerk", true);
bool have_default_jerk = config->has("default_jerk") && config->opt_float("default_jerk") > 0; bool have_default_jerk = config->has("default_jerk") && config->opt_float_nullable("default_jerk", variant_index) > 0;
for (auto el : { "outer_wall_jerk", "inner_wall_jerk", "initial_layer_jerk", "initial_layer_travel_jerk", "top_surface_jerk", "travel_jerk", "infill_jerk"}) { for (auto el : { "outer_wall_jerk", "inner_wall_jerk", "initial_layer_jerk", "initial_layer_travel_jerk", "top_surface_jerk", "travel_jerk", "infill_jerk"}) {
toggle_line(el, true); toggle_line(el, true, variant_index);
toggle_field(el, have_default_jerk); toggle_field(el, have_default_jerk, variant_index);
} }
} }
@@ -869,11 +869,11 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, co
for (auto el : {"first_layer_flow_ratio", "outer_wall_flow_ratio", "inner_wall_flow_ratio", "overhang_flow_ratio", "sparse_infill_flow_ratio", "internal_solid_infill_flow_ratio", "gap_fill_flow_ratio", "support_flow_ratio", "support_interface_flow_ratio"}) for (auto el : {"first_layer_flow_ratio", "outer_wall_flow_ratio", "inner_wall_flow_ratio", "overhang_flow_ratio", "sparse_infill_flow_ratio", "internal_solid_infill_flow_ratio", "gap_fill_flow_ratio", "support_flow_ratio", "support_interface_flow_ratio"})
toggle_line(el, has_set_other_flow_ratios); toggle_line(el, has_set_other_flow_ratios);
bool has_overhang_speed = config->opt_bool("enable_overhang_speed"); bool has_overhang_speed = config->opt_bool_nullable("enable_overhang_speed", variant_index);
for (auto el : {"overhang_1_4_speed", "overhang_2_4_speed", "overhang_3_4_speed", "overhang_4_4_speed"}) for (auto el : {"overhang_1_4_speed", "overhang_2_4_speed", "overhang_3_4_speed", "overhang_4_4_speed"})
toggle_line(el, has_overhang_speed); toggle_line(el, has_overhang_speed, variant_index);
toggle_line("slowdown_for_curled_perimeters", has_overhang_speed); toggle_line("slowdown_for_curled_perimeters", has_overhang_speed, variant_index);
toggle_line("flush_into_objects", !is_global_config); toggle_line("flush_into_objects", !is_global_config);
+1 -1
View File
@@ -70,7 +70,7 @@ public:
// FFF print // FFF print
void update_print_fff_config(DynamicPrintConfig* config, const bool is_global_config = false, const bool is_plate_config = false); void update_print_fff_config(DynamicPrintConfig* config, const bool is_global_config = false, const bool is_plate_config = false);
void toggle_print_fff_options(DynamicPrintConfig* config, const bool is_global_config = false); void toggle_print_fff_options(DynamicPrintConfig* config, int variant_index, const bool is_global_config = false);
void apply_null_fff_config(DynamicPrintConfig *config, std::vector<std::string> const &keys, std::map<ObjectBase*, ModelConfig*> const & configs); void apply_null_fff_config(DynamicPrintConfig *config, std::vector<std::string> const &keys, std::map<ObjectBase*, ModelConfig*> const & configs);
//BBS: FFF filament nozzle temperature range //BBS: FFF filament nozzle temperature range
+1 -1
View File
@@ -406,7 +406,7 @@ void ObjectSettings::update_config_values(ModelConfig* config)
printer_technology == ptFFF ? config_manipulation.update_print_fff_config(&main_config) : printer_technology == ptFFF ? config_manipulation.update_print_fff_config(&main_config) :
config_manipulation.update_print_sla_config(&main_config) ; config_manipulation.update_print_sla_config(&main_config) ;
printer_technology == ptFFF ? config_manipulation.toggle_print_fff_options(&main_config) : printer_technology == ptFFF ? config_manipulation.toggle_print_fff_options(&main_config, 0) :
config_manipulation.toggle_print_sla_options(&main_config) ; config_manipulation.toggle_print_sla_options(&main_config) ;
} }
+2 -2
View File
@@ -300,7 +300,7 @@ bool ObjectTableSettings::update_settings_list(bool is_object, bool is_multiple_
bool is_BBL_printer = wxGetApp().preset_bundle->is_bbl_vendor(); bool is_BBL_printer = wxGetApp().preset_bundle->is_bbl_vendor();
config_manipulation.set_is_BBL_Printer(is_BBL_printer); config_manipulation.set_is_BBL_Printer(is_BBL_printer);
printer_technology == ptFFF ? config_manipulation.toggle_print_fff_options(&m_current_config) : printer_technology == ptFFF ? config_manipulation.toggle_print_fff_options(&m_current_config, 0) :
config_manipulation.toggle_print_sla_options(&m_current_config) ; config_manipulation.toggle_print_sla_options(&m_current_config) ;
optgroup->update_visibility(wxGetApp().get_mode()); optgroup->update_visibility(wxGetApp().get_mode());
} }
@@ -406,7 +406,7 @@ void ObjectTableSettings::update_config_values(bool is_object, ModelObject* obje
printer_technology == ptFFF ? config_manipulation.update_print_fff_config(&main_config) : printer_technology == ptFFF ? config_manipulation.update_print_fff_config(&main_config) :
config_manipulation.update_print_sla_config(&main_config) ; config_manipulation.update_print_sla_config(&main_config) ;
printer_technology == ptFFF ? config_manipulation.toggle_print_fff_options(&main_config) : printer_technology == ptFFF ? config_manipulation.toggle_print_fff_options(&main_config, 0) :
config_manipulation.toggle_print_sla_options(&main_config) ; config_manipulation.toggle_print_sla_options(&main_config) ;
for (auto og : m_og_settings) { for (auto og : m_og_settings) {
og->update_visibility(wxGetApp().get_mode()); og->update_visibility(wxGetApp().get_mode());
+1
View File
@@ -59,6 +59,7 @@ const t_field& OptionsGroup::build_field(const t_config_option_key& id, const Co
default: default:
switch (opt.type) { switch (opt.type) {
case coFloatOrPercent: case coFloatOrPercent:
case coFloatsOrPercents:
case coFloat: case coFloat:
case coFloats: case coFloats:
case coPercent: case coPercent:
+93 -55
View File
@@ -511,8 +511,6 @@ void Tab::create_preset_tab()
m_actual_nozzle_volumes[extruder_id] = nozzle_type; m_actual_nozzle_volumes[extruder_id] = nozzle_type;
switch_excluder(extruder_id); switch_excluder(extruder_id);
reload_config();
update_changed_ui();
}); });
m_extruder_sync_box = new wxPanel(panel, wxID_ANY); m_extruder_sync_box = new wxPanel(panel, wxID_ANY);
m_extruder_sync_box->SetBackgroundColour(panel->GetBackgroundColour()); m_extruder_sync_box->SetBackgroundColour(panel->GetBackgroundColour());
@@ -2166,15 +2164,12 @@ void Tab::on_value_change(const std::string& opt_key, const boost::any& value)
int extruder_idx = std::atoi(opt_key.substr(opt_key.find_last_of('#') + 1).c_str()); int extruder_idx = std::atoi(opt_key.substr(opt_key.find_last_of('#') + 1).c_str());
for (auto tab : wxGetApp().tabs_list) { for (auto tab : wxGetApp().tabs_list) {
tab->update_extruder_variants(extruder_idx); tab->update_extruder_variants(extruder_idx);
tab->reload_config();
} }
if (auto tab = wxGetApp().plate_tab) { if (auto tab = wxGetApp().plate_tab) {
tab->update_extruder_variants(extruder_idx); tab->update_extruder_variants(extruder_idx);
tab->reload_config();
} }
for (auto tab : wxGetApp().model_tabs_list) { for (auto tab : wxGetApp().model_tabs_list) {
tab->update_extruder_variants(extruder_idx); tab->update_extruder_variants(extruder_idx);
tab->reload_config();
} }
if (wxGetApp().app_config->get("auto_calculate_flush") == "all") { if (wxGetApp().app_config->get("auto_calculate_flush") == "all") {
wxGetApp().plater()->sidebar().auto_calc_flushing_volumes(-1,extruder_idx); wxGetApp().plater()->sidebar().auto_calc_flushing_volumes(-1,extruder_idx);
@@ -2756,66 +2751,66 @@ void TabPrint::build()
page = add_options_page(L("Speed"), "custom-gcode_speed"); // ORCA: icon only visible on placeholders page = add_options_page(L("Speed"), "custom-gcode_speed"); // ORCA: icon only visible on placeholders
optgroup = page->new_optgroup(L("First layer speed"), L"param_speed_first", 15); optgroup = page->new_optgroup(L("First layer speed"), L"param_speed_first", 15);
optgroup->append_single_option_line("initial_layer_speed", "speed_settings_initial_layer_speed#initial-layer"); optgroup->append_single_option_line("initial_layer_speed", "speed_settings_initial_layer_speed#initial-layer", 0);
optgroup->append_single_option_line("initial_layer_infill_speed", "speed_settings_initial_layer_speed#initial-layer-infill"); optgroup->append_single_option_line("initial_layer_infill_speed", "speed_settings_initial_layer_speed#initial-layer-infill", 0);
optgroup->append_single_option_line("initial_layer_travel_speed", "speed_settings_initial_layer_speed#initial-layer-travel-speed"); optgroup->append_single_option_line("initial_layer_travel_speed", "speed_settings_initial_layer_speed#initial-layer-travel-speed", 0);
optgroup->append_single_option_line("slow_down_layers", "speed_settings_initial_layer_speed#number-of-slow-layers"); optgroup->append_single_option_line("slow_down_layers", "speed_settings_initial_layer_speed#number-of-slow-layers");
optgroup = page->new_optgroup(L("Other layers speed"), L"param_speed", 15); optgroup = page->new_optgroup(L("Other layers speed"), L"param_speed", 15);
optgroup->append_single_option_line("outer_wall_speed", "speed_settings_other_layers_speed#outer-wall"); optgroup->append_single_option_line("outer_wall_speed", "speed_settings_other_layers_speed#outer-wall", 0);
optgroup->append_single_option_line("inner_wall_speed", "speed_settings_other_layers_speed#inner-wall", 0); optgroup->append_single_option_line("inner_wall_speed", "speed_settings_other_layers_speed#inner-wall", 0);
optgroup->append_single_option_line("small_perimeter_speed", "speed_settings_other_layers_speed#small-perimeters"); optgroup->append_single_option_line("small_perimeter_speed", "speed_settings_other_layers_speed#small-perimeters", 0);
optgroup->append_single_option_line("small_perimeter_threshold", "speed_settings_other_layers_speed#small-perimeters-threshold"); optgroup->append_single_option_line("small_perimeter_threshold", "speed_settings_other_layers_speed#small-perimeters-threshold", 0);
optgroup->append_single_option_line("sparse_infill_speed", "speed_settings_other_layers_speed#sparse-infill"); optgroup->append_single_option_line("sparse_infill_speed", "speed_settings_other_layers_speed#sparse-infill", 0);
optgroup->append_single_option_line("internal_solid_infill_speed", "speed_settings_other_layers_speed#internal-solid-infill"); optgroup->append_single_option_line("internal_solid_infill_speed", "speed_settings_other_layers_speed#internal-solid-infill", 0);
optgroup->append_single_option_line("top_surface_speed", "speed_settings_other_layers_speed#top-surface"); optgroup->append_single_option_line("top_surface_speed", "speed_settings_other_layers_speed#top-surface", 0);
optgroup->append_single_option_line("gap_infill_speed", "speed_settings_other_layers_speed#gap-infill"); optgroup->append_single_option_line("gap_infill_speed", "speed_settings_other_layers_speed#gap-infill", 0);
optgroup->append_single_option_line("ironing_speed", "speed_settings_other_layers_speed#ironing-speed"); optgroup->append_single_option_line("ironing_speed", "speed_settings_other_layers_speed#ironing-speed");
optgroup->append_single_option_line("support_speed", "speed_settings_other_layers_speed#support"); optgroup->append_single_option_line("support_speed", "speed_settings_other_layers_speed#support", 0);
optgroup->append_single_option_line("support_interface_speed", "speed_settings_other_layers_speed#support-interface"); optgroup->append_single_option_line("support_interface_speed", "speed_settings_other_layers_speed#support-interface", 0);
optgroup = page->new_optgroup(L("Overhang speed"), L"param_overhang_speed", 15); optgroup = page->new_optgroup(L("Overhang speed"), L"param_overhang_speed", 15);
optgroup->append_single_option_line("enable_overhang_speed", "speed_settings_overhang_speed#slow-down-for-overhang"); optgroup->append_single_option_line("enable_overhang_speed", "speed_settings_overhang_speed#slow-down-for-overhang", 0);
optgroup->append_single_option_line("slowdown_for_curled_perimeters", "speed_settings_overhang_speed#slow-down-for-curled-perimeters"); optgroup->append_single_option_line("slowdown_for_curled_perimeters", "speed_settings_overhang_speed#slow-down-for-curled-perimeters", 0);
Line line = { L("Overhang speed"), L("This is the speed for various overhang degrees. Overhang degrees are expressed as a percentage of line width. 0 speed means no slowing down for the overhang degree range and wall speed is used") }; Line line = { L("Overhang speed"), L("This is the speed for various overhang degrees. Overhang degrees are expressed as a percentage of line width. 0 speed means no slowing down for the overhang degree range and wall speed is used") };
line.label_path = "speed_settings_overhang_speed#speed"; line.label_path = "speed_settings_overhang_speed#speed";
line.append_option(optgroup->get_option("overhang_1_4_speed")); line.append_option(optgroup->get_option("overhang_1_4_speed", 0));
line.append_option(optgroup->get_option("overhang_2_4_speed")); line.append_option(optgroup->get_option("overhang_2_4_speed", 0));
line.append_option(optgroup->get_option("overhang_3_4_speed")); line.append_option(optgroup->get_option("overhang_3_4_speed", 0));
line.append_option(optgroup->get_option("overhang_4_4_speed")); line.append_option(optgroup->get_option("overhang_4_4_speed", 0));
optgroup->append_line(line); optgroup->append_line(line);
optgroup->append_separator(); optgroup->append_separator();
line = { L("Bridge"), L("Set speed for external and internal bridges") }; line = { L("Bridge"), L("Set speed for external and internal bridges") };
line.append_option(optgroup->get_option("bridge_speed")); line.append_option(optgroup->get_option("bridge_speed", 0));
line.append_option(optgroup->get_option("internal_bridge_speed")); line.append_option(optgroup->get_option("internal_bridge_speed", 0));
optgroup->append_line(line); optgroup->append_line(line);
optgroup = page->new_optgroup(L("Travel speed"), L"param_travel_speed", 15); optgroup = page->new_optgroup(L("Travel speed"), L"param_travel_speed", 15);
optgroup->append_single_option_line("travel_speed", "speed_settings_travel"); optgroup->append_single_option_line("travel_speed", "speed_settings_travel", 0);
optgroup = page->new_optgroup(L("Acceleration"), L"param_acceleration", 15); optgroup = page->new_optgroup(L("Acceleration"), L"param_acceleration", 15);
optgroup->append_single_option_line("default_acceleration", "speed_settings_acceleration#normal-printing"); optgroup->append_single_option_line("default_acceleration", "speed_settings_acceleration#normal-printing", 0);
optgroup->append_single_option_line("outer_wall_acceleration", "speed_settings_acceleration#outer-wall"); optgroup->append_single_option_line("outer_wall_acceleration", "speed_settings_acceleration#outer-wall", 0);
optgroup->append_single_option_line("inner_wall_acceleration", "speed_settings_acceleration#inner-wall"); optgroup->append_single_option_line("inner_wall_acceleration", "speed_settings_acceleration#inner-wall", 0);
optgroup->append_single_option_line("bridge_acceleration", "speed_settings_acceleration#bridge"); optgroup->append_single_option_line("bridge_acceleration", "speed_settings_acceleration#bridge", 0);
optgroup->append_single_option_line("sparse_infill_acceleration", "speed_settings_acceleration#sparse-infill"); optgroup->append_single_option_line("sparse_infill_acceleration", "speed_settings_acceleration#sparse-infill", 0);
optgroup->append_single_option_line("internal_solid_infill_acceleration", "speed_settings_acceleration#internal-solid-infill"); optgroup->append_single_option_line("internal_solid_infill_acceleration", "speed_settings_acceleration#internal-solid-infill", 0);
optgroup->append_single_option_line("initial_layer_acceleration", "speed_settings_acceleration#initial-layer"); optgroup->append_single_option_line("initial_layer_acceleration", "speed_settings_acceleration#initial-layer", 0);
optgroup->append_single_option_line("initial_layer_travel_acceleration", "speed_settings_acceleration#initial-layer-travel"); optgroup->append_single_option_line("initial_layer_travel_acceleration", "speed_settings_acceleration#initial-layer-travel", 0);
optgroup->append_single_option_line("top_surface_acceleration", "speed_settings_acceleration#top-surface"); optgroup->append_single_option_line("top_surface_acceleration", "speed_settings_acceleration#top-surface", 0);
optgroup->append_single_option_line("travel_acceleration", "speed_settings_acceleration#travel"); optgroup->append_single_option_line("travel_acceleration", "speed_settings_acceleration#travel", 0);
optgroup->append_single_option_line("accel_to_decel_enable", "speed_settings_acceleration"); optgroup->append_single_option_line("accel_to_decel_enable", "speed_settings_acceleration");
optgroup->append_single_option_line("accel_to_decel_factor", "speed_settings_acceleration"); optgroup->append_single_option_line("accel_to_decel_factor", "speed_settings_acceleration");
optgroup = page->new_optgroup(L("Jerk(XY)"), L"param_jerk", 15); optgroup = page->new_optgroup(L("Jerk(XY)"), L"param_jerk", 15);
optgroup->append_single_option_line("default_junction_deviation", "speed_settings_jerk_xy#junction-deviation"); optgroup->append_single_option_line("default_junction_deviation", "speed_settings_jerk_xy#junction-deviation", 0);
optgroup->append_single_option_line("default_jerk", "speed_settings_jerk_xy#default"); optgroup->append_single_option_line("default_jerk", "speed_settings_jerk_xy#default", 0);
optgroup->append_single_option_line("outer_wall_jerk", "speed_settings_jerk_xy#outer-wall"); optgroup->append_single_option_line("outer_wall_jerk", "speed_settings_jerk_xy#outer-wall", 0);
optgroup->append_single_option_line("inner_wall_jerk", "speed_settings_jerk_xy#inner-wall"); optgroup->append_single_option_line("inner_wall_jerk", "speed_settings_jerk_xy#inner-wall", 0);
optgroup->append_single_option_line("infill_jerk", "speed_settings_jerk_xy#infill"); optgroup->append_single_option_line("infill_jerk", "speed_settings_jerk_xy#infill", 0);
optgroup->append_single_option_line("top_surface_jerk", "speed_settings_jerk_xy#top-surface"); optgroup->append_single_option_line("top_surface_jerk", "speed_settings_jerk_xy#top-surface", 0);
optgroup->append_single_option_line("initial_layer_jerk", "speed_settings_jerk_xy#initial-layer"); optgroup->append_single_option_line("initial_layer_jerk", "speed_settings_jerk_xy#initial-layer", 0);
optgroup->append_single_option_line("initial_layer_travel_jerk", "speed_settings_jerk_xy#initial-layer-travel"); optgroup->append_single_option_line("initial_layer_travel_jerk", "speed_settings_jerk_xy#initial-layer-travel", 0);
optgroup->append_single_option_line("travel_jerk", "speed_settings_jerk_xy#travel"); optgroup->append_single_option_line("travel_jerk", "speed_settings_jerk_xy#travel", 0);
optgroup = page->new_optgroup(L("Advanced"), L"param_advanced", 15); optgroup = page->new_optgroup(L("Advanced"), L"param_advanced", 15);
optgroup->append_single_option_line("max_volumetric_extrusion_rate_slope", "speed_settings_advanced"); optgroup->append_single_option_line("max_volumetric_extrusion_rate_slope", "speed_settings_advanced");
@@ -3075,7 +3070,7 @@ void TabPrint::toggle_options()
m_config_manipulation.set_is_BBL_Printer(is_BBL_printer); m_config_manipulation.set_is_BBL_Printer(is_BBL_printer);
} }
m_config_manipulation.toggle_print_fff_options(m_config, m_type < Preset::TYPE_COUNT); m_config_manipulation.toggle_print_fff_options(m_config, int(intptr_t(m_extruder_switch->GetClientData())), m_type < Preset::TYPE_COUNT);
Field *field = m_active_page->get_field("support_style"); Field *field = m_active_page->get_field("support_style");
auto support_type = m_config->opt_enum<SupportType>("support_type"); auto support_type = m_config->opt_enum<SupportType>("support_type");
@@ -4653,6 +4648,40 @@ wxSizer* Tab::description_line_widget(wxWindow* parent, ogStaticText* *StaticTex
return sizer; return sizer;
} }
void Tab::update_pages_with_multi_variant()
{
if (!m_active_page) {
return;
}
// TODO: Orca: support multi variant field
//for (auto optgroup : m_active_page->m_optgroups) {
// Field *multi_variant_field = nullptr;
// std::string opt_key;
// for (const auto& opt : multi_variant_text_ctrl_options) {
// Field* field = optgroup->get_fieldc(opt, 0);
// if (field) {
// auto *multi_variant = dynamic_cast<MultiVariantTextCtrl *>(field);
// if (multi_variant) {;
// multi_variant_field = field;
// opt_key = opt;
// }
// break;
// }
// }
// if (multi_variant_field) {
// auto * multi_variant_ctrl = dynamic_cast<MultiVariantTextCtrl*>(multi_variant_field);
// multi_variant_ctrl->refresh_text_ctrls_layout(optgroup->ctrl_parent());
// if (optgroup->custom_ctrl) {
// optgroup->custom_ctrl->update_line_height_for_field(opt_key);
// }
// }
// m_page_view->GetParent()->Layout();
// m_parent->Layout();
//}
update_changed_ui();
}
bool Tab::saved_preset_is_dirty() const { return m_presets->saved_is_dirty(); } bool Tab::saved_preset_is_dirty() const { return m_presets->saved_is_dirty(); }
void Tab::update_saved_preset_from_current_preset() { m_presets->update_saved_preset_from_current_preset(); } void Tab::update_saved_preset_from_current_preset() { m_presets->update_saved_preset_from_current_preset(); }
bool Tab::current_preset_is_dirty() const { return m_presets->current_is_dirty(); } bool Tab::current_preset_is_dirty() const { return m_presets->current_is_dirty(); }
@@ -5927,7 +5956,6 @@ void Tab::load_current_preset()
update_btns_enabling(); update_btns_enabling();
update();
if (m_type == Slic3r::Preset::TYPE_PRINTER) { if (m_type == Slic3r::Preset::TYPE_PRINTER) {
// For the printer profile, generate the extruder pages. // For the printer profile, generate the extruder pages.
if (preset.printer_technology() == ptFFF) { if (preset.printer_technology() == ptFFF) {
@@ -5938,21 +5966,20 @@ void Tab::load_current_preset()
else else
wxGetApp().obj_list()->update_objects_list_filament_column(1); wxGetApp().obj_list()->update_objects_list_filament_column(1);
} }
// Reload preset pages with the new configuration values.
update_extruder_variants();
if (m_type == Preset::TYPE_PRINT) { if (m_type == Preset::TYPE_PRINT) {
if (auto tab = wxGetApp().plate_tab) { if (auto tab = wxGetApp().plate_tab) {
tab->m_config->apply(*m_config); tab->m_config->apply(*m_config);
tab->update_extruder_variants(); tab->update_extruder_variants();
tab->reload_config();
} }
for (auto tab : wxGetApp().model_tabs_list) { for (auto tab : wxGetApp().model_tabs_list) {
tab->m_config->apply(*m_config); tab->m_config->apply(*m_config);
tab->update_extruder_variants(); tab->update_extruder_variants();
tab->reload_config();
} }
} }
update();
// Reload preset pages with the new configuration values.
update_extruder_variants(-1, false);
reload_config(); reload_config();
update_ui_items_related_on_parent_preset(m_presets->get_selected_preset_parent()); update_ui_items_related_on_parent_preset(m_presets->get_selected_preset_parent());
@@ -7559,7 +7586,7 @@ void Tab::set_just_edit(bool just_edit)
/// </summary> /// </summary>
/// <param name="extruder_id"></param> /// <param name="extruder_id"></param>
void Tab::update_extruder_variants(int extruder_id) void Tab::update_extruder_variants(int extruder_id, bool reload)
{ {
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << extruder_id; BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << extruder_id;
if (m_extruder_switch) { if (m_extruder_switch) {
@@ -7601,7 +7628,10 @@ void Tab::update_extruder_variants(int extruder_id)
m_variant_combo->Enable(options.size() > 1); m_variant_combo->Enable(options.size() > 1);
} }
switch_excluder(extruder_id); switch_excluder(extruder_id, reload);
if (m_type == Preset::TYPE_PRINT) {
update_pages_with_multi_variant();
}
if (m_variant_sizer) { if (m_variant_sizer) {
wxWindow *variant_ctrl = m_extruder_switch ? (wxWindow *) m_extruder_switch : m_variant_combo; wxWindow *variant_ctrl = m_extruder_switch ? (wxWindow *) m_extruder_switch : m_variant_combo;
m_main_sizer->Show(m_variant_sizer, variant_ctrl->IsThisEnabled() && m_active_page && !m_active_page->m_opt_id_map.empty() && !m_active_page->title().StartsWith("Extruder ")); m_main_sizer->Show(m_variant_sizer, variant_ctrl->IsThisEnabled() && m_active_page && !m_active_page->m_opt_id_map.empty() && !m_active_page->title().StartsWith("Extruder "));
@@ -7756,7 +7786,7 @@ bool Tab::get_extruder_sync_enable_state(int extruder_id)
return false; return false;
} }
void Tab::switch_excluder(int extruder_id) void Tab::switch_excluder(int extruder_id, bool reload)
{ {
Preset & printer_preset = m_preset_bundle->printers.get_edited_preset(); Preset & printer_preset = m_preset_bundle->printers.get_edited_preset();
auto nozzle_volumes = m_preset_bundle->project_config.option<ConfigOptionEnumsGeneric>("nozzle_volume_type"); auto nozzle_volumes = m_preset_bundle->project_config.option<ConfigOptionEnumsGeneric>("nozzle_volume_type");
@@ -7826,6 +7856,14 @@ void Tab::switch_excluder(int extruder_id)
} }
} }
} }
if (reload) {
reload_config();
update_changed_ui();
toggle_options();
if (m_active_page)
m_active_page->update_visibility(m_mode, true);
m_page_view->GetParent()->Layout();
}
} }
void Tab::sync_excluder() void Tab::sync_excluder()
+3 -2
View File
@@ -405,6 +405,7 @@ public:
bool current_preset_is_dirty() const; bool current_preset_is_dirty() const;
bool saved_preset_is_dirty() const; bool saved_preset_is_dirty() const;
void update_saved_preset_from_current_preset(); void update_saved_preset_from_current_preset();
void update_pages_with_multi_variant();
DynamicPrintConfig* get_config() { return m_config; } DynamicPrintConfig* get_config() { return m_config; }
PresetCollection * get_presets() { return m_presets; } PresetCollection * get_presets() { return m_presets; }
@@ -437,8 +438,8 @@ public:
virtual const std::string& get_custom_gcode(const t_config_option_key& opt_key); virtual const std::string& get_custom_gcode(const t_config_option_key& opt_key);
virtual void set_custom_gcode(const t_config_option_key& opt_key, const std::string& value); virtual void set_custom_gcode(const t_config_option_key& opt_key, const std::string& value);
void update_extruder_variants(int extruder_id = -1); void update_extruder_variants(int extruder_id = -1, bool reload = true);
void switch_excluder(int extruder_id = -1); void switch_excluder(int extruder_id = -1, bool reload = true);
void sync_excluder(); void sync_excluder();
void parse_extruder_selection(int selection, int &extruder_id, NozzleVolumeType &nozzle_type); void parse_extruder_selection(int selection, int &extruder_id, NozzleVolumeType &nozzle_type);
int calculate_selection_index_for_extruder(int extruder_id, NozzleVolumeType nozzle_type); int calculate_selection_index_for_extruder(int extruder_id, NozzleVolumeType nozzle_type);