mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-09 18:27:00 +00:00
ENH: calib support multi_extruder
1. backend support multi_extrude data structure 2. Compatible with third-party calibration 3. fix bug when get extruder in gocde export process Change-Id: I5dac9abdd9907a521a1ba9b480f9e05640591bc1 (cherry picked from commit 21e6271e59ea8e4924866275566617d14a4b2b6e)
This commit is contained in:
@@ -3097,7 +3097,7 @@ static bool custom_gcode_sets_temperature(const std::string &gcode, const int mc
|
||||
// Do not process this piece of G-code by the time estimator, it already knows the values through another sources.
|
||||
void GCode::print_machine_envelope(GCodeOutputStream &file, Print &print, int extruder_id)
|
||||
{
|
||||
int matched_machine_limit_idx = extruder_id * 2;
|
||||
int matched_machine_limit_idx = get_extruder_id(extruder_id) * 2;
|
||||
const auto flavor = print.config().gcode_flavor.value;
|
||||
if ((flavor == gcfMarlinLegacy || flavor == gcfMarlinFirmware || flavor == gcfRepRapFirmware) &&
|
||||
print.config().emit_machine_limits_to_gcode.value == true) {
|
||||
|
||||
@@ -1195,7 +1195,7 @@ void ToolOrdering::reorder_extruders_for_minimum_flush_volume()
|
||||
return;
|
||||
|
||||
size_t nozzle_nums = print_config->nozzle_diameter.values.size();
|
||||
if (nozzle_nums > 1) {
|
||||
if (nozzle_nums > 1 && print_config->option<ConfigOptionEnum<FilamentMapMode>>("filament_map_mode")->value == FilamentMapMode::fmmAuto) {
|
||||
std::vector<int> filament_maps = m_print->get_filament_maps();
|
||||
|
||||
if (print_config->print_sequence != PrintSequence::ByObject) {
|
||||
|
||||
@@ -7,12 +7,12 @@
|
||||
namespace Slic3r {
|
||||
|
||||
// Calculate the optimal Pressure Advance speed
|
||||
float CalibPressureAdvance::find_optimal_PA_speed(const DynamicPrintConfig &config, double line_width, double layer_height, int filament_idx)
|
||||
float CalibPressureAdvance::find_optimal_PA_speed(const DynamicPrintConfig &config, double line_width, double layer_height, int extruder_id, int filament_idx)
|
||||
{
|
||||
const double general_suggested_min_speed = 100.0;
|
||||
double filament_max_volumetric_speed = config.option<ConfigOptionFloats>("filament_max_volumetric_speed")->get_at(filament_idx);
|
||||
// todo multi_extruders:
|
||||
const float nozzle_diameter = config.option<ConfigOptionFloats>("nozzle_diameter")->get_at(0/*get_extruder_index(filament_idx)*/);
|
||||
const float nozzle_diameter = config.option<ConfigOptionFloats>("nozzle_diameter")->get_at(extruder_id);
|
||||
if (line_width <= 0.) line_width = Flow::auto_extrusion_width(frPerimeter, nozzle_diameter);
|
||||
Flow pattern_line = Flow(line_width, layer_height, nozzle_diameter);
|
||||
auto pa_speed = std::min(std::max(general_suggested_min_speed, config.option<ConfigOptionFloat>("outer_wall_speed")->value),
|
||||
|
||||
@@ -177,7 +177,7 @@ struct DrawBoxOptArgs
|
||||
class CalibPressureAdvance
|
||||
{
|
||||
public:
|
||||
static float find_optimal_PA_speed(const DynamicPrintConfig &config, double line_width, double layer_height, int filament_idx = 0);
|
||||
static float find_optimal_PA_speed(const DynamicPrintConfig &config, double line_width, double layer_height, int extruder_id = 0, int filament_idx = 0);
|
||||
|
||||
protected:
|
||||
CalibPressureAdvance() = default;
|
||||
|
||||
Reference in New Issue
Block a user