Merge remote-tracking branch 'upstream/main' into belt/baseChanges

Conflicts resolved in src/libslic3r/GCode.cpp and src/slic3r/GUI/GUI_Factories.cpp.

GCode.cpp: combined upstream's air-filtration per-extruder gating
(activate_air_filtration_during_print / _on_completion), the new
extrusion-role-change gcode lambda, ZAA's path.z_contoured arc-fit
disable, raft-aware slow_down_layers branch, and Vec3d/Line3 ZAA
plumbing with the local belt-printer changes (path_on_first_layer,
effective_layer_index_for_point, should_disable_arc_fitting). All
auto-merged m_writer.X() calls converted to m_writer->X() to match
the local unique_ptr<GCodeWriter> refactor.

GUI_Factories.cpp: inserted brim_flow_ratio in the Support category
list and renumbered around the local build_plate_tilt_x/y entries.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
harrierpigeon
2026-05-09 16:23:41 -05:00
co-authored by Claude Opus 4.7
1592 changed files with 98534 additions and 8651 deletions
+25 -10
View File
@@ -537,9 +537,20 @@ std::string GCodeWriter::update_progress(unsigned int num, unsigned int tot, boo
std::string GCodeWriter::toolchange_prefix() const
{
return config.manual_filament_change ? ";" + GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Manual_Tool_Change) + "T":
FLAVOR_IS(gcfMakerWare) ? "M135 T" :
FLAVOR_IS(gcfSailfish) ? "M108 T" : "T";
std::string gcode = "T";
if (config.manual_filament_change)
gcode = ";" + GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Manual_Tool_Change) + "T";
else {
if (m_is_bbl_printers)
gcode = "M1020 S";
else {
if (FLAVOR_IS(gcfMakerWare))
gcode = "M135 T";
else if (FLAVOR_IS(gcfSailfish))
gcode = "M108 T";
}
}
return gcode;
}
std::string GCodeWriter::toolchange(unsigned int filament_id)
@@ -554,12 +565,8 @@ std::string GCodeWriter::toolchange(unsigned int filament_id)
// if we are running a single-extruder setup, just set the extruder and return nothing
std::ostringstream gcode;
if (this->multiple_extruders || (this->config.filament_diameter.values.size() > 1 && !is_bbl_printers())) {
// BBS
if (this->m_is_bbl_printers)
gcode << "M1020 S" << filament_id;
else
gcode << this->toolchange_prefix() << filament_id;
//BBS
// Orca: call toolchange_prefix() to get the correct command prefix based on the configuration and flavor.
gcode << this->toolchange_prefix() << filament_id;
if (GCodeWriter::full_gcode_comment)
gcode << " ; change extruder";
gcode << "\n";
@@ -978,6 +985,11 @@ std::string GCodeWriter::extrude_arc_to_xy(const Vec2d& point, const Vec2d& cent
std::string GCodeWriter::extrude_to_xyz(const Vec3d &point, double dE, const std::string &comment, bool force_no_extrusion)
{
// Check if Z actually changes (at export precision) before emitting it.
// ZAA sloped extrusions call this for every segment, but many consecutive
// segments share the same quantized Z — emitting it every time is redundant.
bool z_changed = (GCodeG1Formatter::quantize_xyzf(point(2)) != GCodeG1Formatter::quantize_xyzf(m_pos(2)));
m_pos = point;
m_lifted = 0;
if (!force_no_extrusion)
@@ -990,7 +1002,10 @@ std::string GCodeWriter::extrude_to_xyz(const Vec3d &point, double dE, const std
point_on_plate = apply_axis_remap(point_on_plate);
GCodeG1Formatter w;
w.emit_xyz(point_on_plate);
if (z_changed)
w.emit_xyz(point_on_plate);
else
w.emit_xy(Vec2d(point_on_plate.x(), point_on_plate.y()));
if (!force_no_extrusion)
w.emit_e(filament()->E());
//BBS