Merge main and fixed conflicts

This commit is contained in:
Lam Wei Lun
2026-09-03 10:55:01 +08:00
122 changed files with 3445 additions and 1959 deletions
+1
View File
@@ -1440,6 +1440,7 @@ void AppConfig::set_mouse_device(const std::string& name, double translation_spe
it->second["invert_yaw"] = invert_yaw ? "1" : "0";
it->second["invert_pitch"] = invert_pitch ? "1" : "0";
it->second["invert_roll"] = invert_roll ? "1" : "0";
m_dirty = true;
}
std::vector<std::string> AppConfig::get_mouse_device_names() const
+1 -1
View File
@@ -797,7 +797,7 @@ public:
}
});
m_pck.unfitIndicator([this](std::string name) {
m_pck.unfitIndicator([](std::string name) {
BOOST_LOG_TRIVIAL(debug) << "arrange progress: " + name;
});
+1 -6
View File
@@ -2395,12 +2395,7 @@ static std::vector<MonotonicRegionLink> chain_monotonic_regions(
}
// Probability (unnormalized) of traversing a link between two monotonic regions.
auto path_probability = [
#ifndef __APPLE__
// clang complains when capturing constexpr constants.
pheromone_alpha, pheromone_beta
#endif // __APPLE__
](AntPath &path) {
auto path_probability = [](AntPath &path) {
return pow(path.pheromone, pheromone_alpha) * pow(path.visibility, pheromone_beta);
};
+4 -4
View File
@@ -1273,7 +1273,7 @@ void GCodeProcessor::run_post_process()
// add lines M73 to exported gcode
auto process_line_move = [
// Lambdas, mostly for string formatting, all with an empty capture block.
time_in_minutes, format_time_float, format_line_M73_main, format_line_M73_stop_int, format_line_M73_stop_float, time_in_last_minute,format_line_exhaust_fan_control,
time_in_minutes, format_time_float, format_line_M73_main, format_line_M73_stop_int, format_line_M73_stop_float, time_in_last_minute,
&self = std::as_const(m_time_processor),
// Caches, to be modified
&g1_times_cache_it, &last_exported_main, &last_exported_stop,
@@ -5304,7 +5304,7 @@ void GCodeProcessor::process_VG1(const GCodeReader::GCodeLine& line)
float filament_radius = 0.5f * filament_diameter;
float area_filament_cross_section = static_cast<float>(M_PI) * sqr(filament_radius);
auto absolute_position = [this, area_filament_cross_section](Axis axis, const GCodeReader::GCodeLine& lineG1) {
auto absolute_position = [this](Axis axis, const GCodeReader::GCodeLine& lineG1) {
bool is_relative = (m_global_positioning_type == EPositioningType::Relative);
if (axis == E)
is_relative |= (m_e_local_positioning_type == EPositioningType::Relative);
@@ -5755,7 +5755,7 @@ void GCodeProcessor::process_G2_G3(const GCodeReader::GCodeLine& line, bool cloc
if (travel_length < 0.001)
return;
auto adjust_target = [this, area_filament_cross_section](const AxisCoords& target, const AxisCoords& prev_position) {
auto adjust_target = [this](const AxisCoords& target, const AxisCoords& prev_position) {
AxisCoords ret = target;
if (m_global_positioning_type == EPositioningType::Relative) {
for (unsigned char a = X; a <= E; ++a) {
@@ -7006,7 +7006,7 @@ void GCodeProcessor::store_move_vertex(EMoveType type, EMovePathType path_type,
get_acceleration(normal_mode));
const float junction_deviation = get_option_value(m_time_processor.machine_limits.machine_max_junction_deviation, normal_mode_id);
const bool use_jd_jerk = (m_flavor == gcfMarlinFirmware && junction_deviation > 0.0f);
const auto axis_jerk_for_preview = [this, normal_mode, use_jd_jerk, move_acceleration](Axis axis) {
const auto axis_jerk_for_preview = [this, use_jd_jerk, move_acceleration](Axis axis) {
return use_jd_jerk ? get_axis_max_jerk_with_jd(normal_mode, axis, move_acceleration) : get_axis_max_jerk(normal_mode, axis);
};
const float jerk_x = axis_jerk_for_preview(X);
+2 -2
View File
@@ -4083,7 +4083,7 @@ void WipeTower::toolchange_wipe_new(WipeTowerWriter &writer, const box_coordinat
}
return time * 60.f;
};
auto estimate_wipe_time = [&estimate_time_kernel, & cleaning_box, &target_speed, &x_to_wipe, &xr, &xl, &dy, &WipeSpeedMap, &solid_tool_toolchange](int begin_line) -> float {
auto estimate_wipe_time = [&estimate_time_kernel, & cleaning_box, &x_to_wipe, &xr, &xl, &dy, &solid_tool_toolchange](int begin_line) -> float {
int n = std::ceil(x_to_wipe / (xr - xl));
if (solid_tool_toolchange) n = (cleaning_box.lu[1] - cleaning_box.ld[1]) / dy;
float total_time = estimate_time_kernel(n);
@@ -5111,7 +5111,7 @@ Polygon WipeTower::generate_rib_polygon(const box_coordinates &wt_box)
Polygon WipeTower::generate_support_wall_new(WipeTowerWriter &writer, const box_coordinates &wt_box, double feedrate, bool first_layer,bool rib_wall, bool extrude_perimeter, bool skip_points)
{
auto get_closet_idx = [this, &writer](Polylines &pls) -> std::pair<int,int> {
auto get_closet_idx = [&writer](Polylines &pls) -> std::pair<int,int> {
Vec2f anchor{writer.x(), writer.y()};
int closestIndex = -1;
int closestPl = -1;
+1 -1
View File
@@ -877,7 +877,7 @@ void Model::convert_multipart_object(unsigned int max_extruders)
// Revert the centering operation.
trafo_volume.set_offset(trafo_volume.get_offset() - o->origin_translation);
int counter = 1;
auto copy_volume = [o, v, max_extruders, &counter, &extruder_counter](ModelVolume *new_v) {
auto copy_volume = [o, v, &counter](ModelVolume *new_v) {
assert(new_v != nullptr);
new_v->name = (counter > 1) ? o->name + "_" + std::to_string(counter++) : o->name;
//BBS: Use extruder priority: volumn > object > default
+6 -11
View File
@@ -2217,15 +2217,11 @@ int PresetBundle::validate_presets(const std::string& file_name, DynamicPrintCon
void PresetBundle::remove_users_preset(AppConfig& config, std::map<std::string, std::map<std::string, std::string>>* my_presets)
{
auto check_removed = [my_presets, this](Preset& preset) -> bool {
if (my_presets == nullptr)
return true;
if (my_presets->find(preset.name) != my_presets->end())
return false;
if (!preset.sync_info.empty())
return false; // syncing, not remove
if (preset.setting_id.empty())
return false; // no id, not remove
auto check_removed = [my_presets](Preset &preset) -> bool {
if (my_presets == nullptr) return true;
if (my_presets->find(preset.name) != my_presets->end()) return false;
if (!preset.sync_info.empty()) return false; // syncing, not remove
if (preset.setting_id.empty()) return false; // no id, not remove
// Saved preset is removed by another session
if (preset.is_dirty) {
preset.setting_id.clear();
@@ -3533,8 +3529,7 @@ void PresetBundle::get_ams_cobox_infos(AMSComboInfo& combox_info)
combox_info.ams_names.push_back(ams_name);
continue;
}
iter = std::find_if(filaments.begin(), filaments.end(),
[&filament_type](auto& f) { return f.is_compatible && f.is_system; });
iter = std::find_if(filaments.begin(), filaments.end(), [](auto &f) { return f.is_compatible && f.is_system; });
if (iter == filaments.end())
continue;
}
+2 -2
View File
@@ -2288,7 +2288,7 @@ void Print::process(long long *time_cost_with_cache, bool use_cache)
obj->clear_shared_object();
//add the print_object share check logic
auto is_print_object_the_same = [this](const PrintObject* object1, const PrintObject* object2) -> bool{
auto is_print_object_the_same = [](const PrintObject* object1, const PrintObject* object2) -> bool{
if (object1->trafo().matrix() != object2->trafo().matrix())
return false;
const ModelObject* model_obj1 = object1->model_object();
@@ -5699,7 +5699,7 @@ int Print::load_cached_data(const std::string& directory)
return CLI_IMPORT_CACHE_NOT_FOUND;
}
auto find_region = [this](PrintObject* object, size_t config_hash) -> const PrintRegion* {
auto find_region = [](PrintObject* object, size_t config_hash) -> const PrintRegion* {
int regions_count = object->num_printing_regions();
for (int index = 0; index < regions_count; index++ )
{
+5 -3
View File
@@ -560,9 +560,11 @@ static inline bool model_volume_solid_or_modifier(const ModelVolume &mv)
static inline Transform3f trafo_for_bbox(const Transform3d &object_trafo, const Transform3d &volume_trafo)
{
Transform3d m = object_trafo * volume_trafo;
m.translation().x() = 0.;
m.translation().y() = 0.;
// Orca: Keep the volume's local XY offset for multipart overlap checks, but remove the object's bed placement.
Transform3d object_trafo_local = object_trafo;
object_trafo_local.translation().x() = 0.;
object_trafo_local.translation().y() = 0.;
Transform3d m = object_trafo_local * volume_trafo;
return m.cast<float>();
}
+19 -20
View File
@@ -1130,8 +1130,7 @@ void PrintConfigDef::init_fff_params()
// BBS
def = this->add("supertack_plate_temp", coInts);
def->label = L("Other layers");
def->tooltip = L("Bed temperature for layers except the initial one. "
"A value of 0 means the filament does not support printing on the Cool Plate SuperTack.");
def->tooltip = L("This is the bed temperature for layers except for the first one. A value of 0 means the filament does not support printing on the Cool Plate SuperTack.");
def->sidetext = L(u8"\u2103" /* °C */); // degrees Celsius, CIS languages need translation
def->full_label = L("Bed temperature");
def->min = 0;
@@ -2770,7 +2769,7 @@ void PrintConfigDef::init_fff_params()
def = this->add("fan_cooling_layer_time", coFloats);
def->label = L("Layer time");
def->tooltip = L("The part cooling fan will be enabled for layers where the estimated time is shorter than this value. Fan speed is interpolated between the minimum and maximum fan speeds according to layer printing time.");
def->sidetext = L("s"); // seconds, CIS languages need translation
def->sidetext = L_CONTEXT("s", "second"); // seconds, CIS languages need translation
def->min = 0;
def->max = 1000;
def->mode = comSimple;
@@ -2923,7 +2922,7 @@ void PrintConfigDef::init_fff_params()
def->label = L("Filament load time");
def->tooltip = L("Time to load new filament when switch filament. It's usually applicable for single-extruder multi-material machines. "
"For tool changers or multi-tool machines, it's typically 0. For statistics only.");
def->sidetext = L("s"); // seconds, CIS languages need translation
def->sidetext = L_CONTEXT("s", "second"); // seconds, CIS languages need translation
def->min = 0;
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(0.0));
@@ -2932,7 +2931,7 @@ void PrintConfigDef::init_fff_params()
def->label = L("Filament unload time");
def->tooltip = L("Time to unload old filament when switch filament. It's usually applicable for single-extruder multi-material machines. "
"For tool changers or multi-tool machines, it's typically 0. For statistics only.");
def->sidetext = L("s"); // seconds, CIS languages need translation
def->sidetext = L_CONTEXT("s", "second"); // seconds, CIS languages need translation
def->min = 0;
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(0.0));
@@ -2941,7 +2940,7 @@ void PrintConfigDef::init_fff_params()
def->label = L("Tool change time");
def->tooltip = L("Time taken to switch tools. It's usually applicable for tool changers or multi-tool machines. "
"For single-extruder multi-material machines, it's typically 0. For statistics only.");
def->sidetext = L("s"); // seconds, CIS languages need translation
def->sidetext = L_CONTEXT("s", "second"); // seconds, CIS languages need translation
def->min = 0;
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat { 0. });
@@ -3087,7 +3086,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("Time to wait after the filament is unloaded. "
"May help to get reliable tool changes with flexible materials "
"that may need more time to shrink to original dimensions.");
def->sidetext = L("s"); // seconds, CIS languages need translation
def->sidetext = L_CONTEXT("s", "second"); // seconds, CIS languages need translation
def->min = 0;
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloats { 0. });
@@ -4206,7 +4205,7 @@ void PrintConfigDef::init_fff_params()
"\nIt won't move fan commands from custom G-code (they act as a sort of 'barrier')."
"\nIt won't move fan commands into the start G-code if the 'only custom start G-code' is activated."
"\nUse 0 to deactivate.");
def->sidetext = L("s"); // seconds, CIS languages need translation
def->sidetext = L_CONTEXT("s", "second"); // seconds, CIS languages need translation
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(0));
@@ -4222,7 +4221,7 @@ void PrintConfigDef::init_fff_params()
"\nThis is useful for fans where a low PWM/power may be insufficient to get the fan started spinning from a stop, or to "
"get the fan up to speed faster."
"\nSet to 0 to deactivate.");
def->sidetext = L("s"); // seconds, CIS languages need translation
def->sidetext = L_CONTEXT("s", "second"); // seconds, CIS languages need translation
def->min = 0;
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(0));
@@ -4866,7 +4865,7 @@ void PrintConfigDef::init_fff_params()
def->label = L("Ironing expansion");
def->category = L("Quality");
def->tooltip = L("Expand or contract the ironing area.");
def->sidetext = L("mm");
def->sidetext = L("mm"); // millimeters, CIS languages need translation
def->min = -100;
def->max = 100;
def->mode = comExpert;
@@ -4903,7 +4902,7 @@ void PrintConfigDef::init_fff_params()
def->category = L("Quality");
def->tooltip = L("Minimum Z-layer height.\n"
"Also controls the slicing plane.");
def->sidetext = L("mm");
def->sidetext = L("mm"); // millimeters, CIS languages need translation
def->min = 0;
def->max = 100;
def->mode = comExpert;
@@ -5102,7 +5101,7 @@ void PrintConfigDef::init_fff_params()
def->category = L("Machine limits");
def->readonly = false;
def->tooltip = L("The allowed maximum output force of Y axis");
def->sidetext = L("N");
def->sidetext = L_CONTEXT("N", "Newton"); // Newtons, CIS languages need translation
def->min = 0;
def->mode = comDevelop;
def->set_default_value(new ConfigOptionFloat(0));
@@ -5112,7 +5111,7 @@ void PrintConfigDef::init_fff_params()
def->category = L("Machine limits");
def->readonly = false;
def->tooltip = L("The machine bed mass load of Y axis");
def->sidetext = L("g");
def->sidetext = L_CONTEXT("g", "gram"); // grams, CIS languages need translation
def->min = 0;
def->mode = comDevelop;
def->set_default_value(new ConfigOptionFloat(0));
@@ -5122,7 +5121,7 @@ void PrintConfigDef::init_fff_params()
def->category = L("Machine limits");
def->readonly = false;
def->tooltip = L("The allowed max printed mass on a plate");
def->sidetext = L("g");
def->sidetext = L_CONTEXT("g", "gram"); // grams, CIS languages need translation
def->min = 0;
def->mode = comDevelop;
def->set_default_value(new ConfigOptionFloat(0));
@@ -5481,7 +5480,7 @@ void PrintConfigDef::init_fff_params()
def = this->add("reduce_infill_retraction", coBool);
def->label = L("Reduce infill retraction");
def->tooltip = L("Don\'t retract when the travel is entirely within an infill area. That means the oozing can\'t been seen. This can reduce times of retraction for complex model and save printing time, but make slicing and G-code generating slower. Note that z-hop is also not performed in areas where retraction is skipped.");
def->tooltip = L("Don\'t retract when the travel is entirely within an infill area. That means the oozing can\'t been seen. This can reduce times of retraction for complex model and save printing time, but make slicing and G-code generating slower. Note that Z-hop is also not performed in areas where retraction is skipped.");
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionBool(false));
@@ -5736,7 +5735,7 @@ void PrintConfigDef::init_fff_params()
def = this->add("retract_after_wipe", coPercents);
def->label = L("Retract amount after wipe");
// xgettext:no-c-format, no-boost-format
def->tooltip = L("The length of fast retraction after wipe, relative to retraction length.\n"
def->tooltip = L("This is the length of fast retraction after wipe, relative to retraction length.\n"
"The value will be clamped by 100% minus the retract amount before the wipe value.");
def->sidetext = "%";
def->mode = comExpert;
@@ -5802,7 +5801,7 @@ void PrintConfigDef::init_fff_params()
def = this->add("z_hop", coFloats);
def->label = L("Z-hop height");
def->tooltip = L("Whenever there is a retraction, the nozzle is lifted a little to create clearance between the nozzle and the print. This prevents the nozzle from hitting the print when traveling more. Using spiral lines to lift z can prevent stringing.");
def->tooltip = L("Whenever there is a retraction, the nozzle is lifted a little to create clearance between the nozzle and the print. This prevents the nozzle from hitting the print when traveling more. Using spiral lines to lift Z can prevent stringing.");
def->sidetext = L("mm"); // millimeters, CIS languages need translation
def->mode = comSimple;
def->min = 0;
@@ -6380,7 +6379,7 @@ void PrintConfigDef::init_fff_params()
def->label = L("Layer time");
def->tooltip = L("The printing speed in exported G-code will be slowed down when the estimated layer time is "
"shorter than this value in order to get better cooling for these layers.");
def->sidetext = L("s"); // seconds, CIS languages need translation
def->sidetext = L_CONTEXT("s", "second"); // seconds, CIS languages need translation
def->min = 0;
def->max = 1000;
def->mode = comSimple;
@@ -6533,7 +6532,7 @@ void PrintConfigDef::init_fff_params()
def->label = L("Preheat time");
def->tooltip = L("To reduce the waiting time after tool change, Orca can preheat the next tool while the current tool is still in use. "
"This setting specifies the time in seconds to preheat the next tool. Orca will insert a M104 command to preheat the tool in advance.");
def->sidetext = L("s"); // seconds, CIS languages need translation
def->sidetext = L_CONTEXT("s", "second"); // seconds, CIS languages need translation
def->min = 0;
def->max = 120;
def->mode = comAdvanced;
@@ -8025,7 +8024,7 @@ void PrintConfigDef::init_fff_params()
def = this->add("machine_hotend_change_time", coFloat);
def->label = L("Hotend change time");
def->tooltip = L("Time to change hotend.");
def->sidetext = L("s");
def->sidetext = L_CONTEXT("s", "second");
def->min = 0;
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(0.0));
+1 -1
View File
@@ -2666,7 +2666,7 @@ void PrintObject::bridge_over_infill()
// SECTION to gather and filter surfaces for expanding, and then cluster them by layer
{
tbb::concurrent_vector<CandidateSurface> candidate_surfaces;
tbb::parallel_for(tbb::blocked_range<size_t>(0, this->layers().size()), [po = static_cast<const PrintObject *>(this), &candidate_surfaces, has_lightning_infill](tbb::blocked_range<size_t> r) {
tbb::parallel_for(tbb::blocked_range<size_t>(0, this->layers().size()), [po = static_cast<const PrintObject *>(this), &candidate_surfaces](tbb::blocked_range<size_t> r) {
PRINT_OBJECT_TIME_LIMIT_MILLIS(PRINT_OBJECT_TIME_LIMIT_DEFAULT);
for (size_t lidx = r.begin(); lidx < r.end(); lidx++) {
const Layer *layer = po->get_layer(lidx);
+12 -5
View File
@@ -304,11 +304,16 @@ static std::vector<std::vector<ExPolygons>> slices_to_regions(
float z = zs[z_idx];
int idx_first_printable_region = -1;
bool complex = false;
std::vector<int> printable_region_ids;
for (int idx_region = 0; idx_region < int(layer_range.volume_regions.size()); ++ idx_region) {
const PrintObjectRegions::VolumeRegion &region = layer_range.volume_regions[idx_region];
if (region.bbox->min().z() <= z && region.bbox->max().z() >= z) {
if (idx_first_printable_region == -1 && region.model_volume->is_model_part())
if (region.model_volume->is_model_part())
printable_region_ids.push_back(idx_region);
if (idx_first_printable_region == -1 && region.model_volume->is_model_part()) {
idx_first_printable_region = idx_region;
}
else if (idx_first_printable_region != -1) {
// Test for overlap with some other region.
for (int idx_region2 = idx_first_printable_region; idx_region2 < idx_region; ++ idx_region2) {
@@ -324,8 +329,10 @@ static std::vector<std::vector<ExPolygons>> slices_to_regions(
if (complex)
zs_complex.push_back({ z_idx, z });
else if (idx_first_printable_region >= 0) {
const PrintObjectRegions::VolumeRegion &region = layer_range.volume_regions[idx_first_printable_region];
slices_by_region[region.region->print_object_region_id()][z_idx] = std::move(volume_slices_find_by_id(volume_slices, region.model_volume->id()).slices[z_idx]);
for (int printable_region_id : printable_region_ids) {
const PrintObjectRegions::VolumeRegion &region = layer_range.volume_regions[printable_region_id];
append(slices_by_region[region.region->print_object_region_id()][z_idx], std::move(volume_slices_find_by_id(volume_slices, region.model_volume->id()).slices[z_idx]));
}
}
}
}
@@ -527,7 +534,7 @@ bool groupingVolumes(std::vector<VolumeSlices> objSliceByVolume, std::vector<gro
}
tbb::parallel_for(tbb::blocked_range<int>(0, osvIndex.size()),
[&osvIndex, &objSliceByVolume, &offsetValue, &resolution](const tbb::blocked_range<int>& range) {
[&osvIndex, &objSliceByVolume, &resolution](const tbb::blocked_range<int>& range) {
for (auto k = range.begin(); k != range.end(); ++k) {
for (ExPolygon& poly_ex : objSliceByVolume[osvIndex[k][0]].slices[osvIndex[k][1]])
poly_ex.douglas_peucker(resolution);
@@ -535,7 +542,7 @@ bool groupingVolumes(std::vector<VolumeSlices> objSliceByVolume, std::vector<gro
});
tbb::parallel_for(tbb::blocked_range<int>(0, osvIndex.size()),
[&osvIndex, &objSliceByVolume,&offsetValue, &resolution](const tbb::blocked_range<int>& range) {
[&osvIndex, &objSliceByVolume,&offsetValue](const tbb::blocked_range<int>& range) {
for (auto k = range.begin(); k != range.end(); ++k) {
objSliceByVolume[osvIndex[k][0]].slices[osvIndex[k][1]] = offset_ex(objSliceByVolume[osvIndex[k][0]].slices[osvIndex[k][1]], offsetValue);
}
+1 -1
View File
@@ -132,7 +132,7 @@ std::pair<SupportGeneratorLayersPtr, SupportGeneratorLayersPtr> generate_interfa
return nullptr;
};
tbb::parallel_for(tbb::blocked_range<int>(0, int(intermediate_layers.size())),
[&bottom_contacts, &top_contacts, &top_interface_layers, &top_base_interface_layers, &intermediate_layers, &insert_layer, &support_params,
[&bottom_contacts, &top_contacts, &top_interface_layers, &top_base_interface_layers, &intermediate_layers, &insert_layer,
num_top_interface_layers, num_bottom_interface_layers, num_top_base_interface_layers, num_bottom_base_interface_layers,
num_top_interface_layers_only, num_bottom_interface_layers_only,
snug_supports, &interface_layers, &base_interface_layers](const tbb::blocked_range<int>& range) {
+1 -1
View File
@@ -1588,7 +1588,7 @@ static inline std::tuple<Polygons, Polygons, double> detect_contacts(
// Cache support trimming polygons derived from lower layer polygons, possible merged with "on build plate only" trimming polygons.
auto slices_margin_update =
[&slices_margin, &layer, &lower_layer, &lower_layer_polygons, buildplate_only, has_enforcer, &annotations, layer_id]
[&slices_margin, &lower_layer, &lower_layer_polygons, buildplate_only, has_enforcer, &annotations, layer_id]
(float slices_margin_offset, float no_interface_offset) {
if (slices_margin.offset != slices_margin_offset) {
slices_margin.offset = slices_margin_offset;
+1 -1
View File
@@ -2667,7 +2667,7 @@ void TreeSupport::drop_nodes()
SupportNode::diameter_angle_scale_factor = diameter_angle_scale_factor;
float DO_NOT_MOVER_UNDER_MM = is_slim ? 0 : 5; // do not move contact points under 5mm
auto get_max_move_dist = [this, &config, tan_angle, wall_count, support_extrusion_width](const SupportNode *node, int power = 1) {
auto get_max_move_dist = [this, tan_angle, support_extrusion_width](const SupportNode *node, int power = 1) {
if (node->max_move_dist == 0) {
node->radius = get_radius(node);
node->max_move_dist = std::min(tan_angle * node->height, support_extrusion_width);
+2 -2
View File
@@ -28,9 +28,9 @@ std::string CalibPressureAdvance::move_to(Vec2d pt, GCodeWriter &writer, std::st
gcode << writer.retract(); // retract before z move or move
if(z > EPSILON && layer_height >= 0){
gcode << writer.travel_to_z(z, "z-hop"); // Perform z hop
gcode << writer.travel_to_z(z, "Z-hop"); // Perform z hop
gcode << writer.travel_to_xy(pt, comment); // Travel with z move
gcode << writer.travel_to_z(layer_height, "undo z-hop"); // Undo z hop
gcode << writer.travel_to_z(layer_height, "undo Z-hop"); // Undo z hop
}else {
gcode << writer.travel_to_xy(pt, comment);
}