Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
877fcdc
feat:add total length mm
iesteem May 22, 2026
561bd57
Fix estimated first layer printing time using wrong data source
iesteem May 22, 2026
7ce1df2
Fix wall speed stuck at defaults by applying full print config to GCo…
iesteem May 27, 2026
e345b76
Fix auto-brim overriding user-configured brim_width to zero
iesteem May 27, 2026
25e3fa7
Fix first layer height deviation when model has Z offset in 3MF
iesteem May 27, 2026
3512fd4
Add exception boundary around process_plate to prevent crashes from p…
iesteem May 27, 2026
64a294e
Add centralized report_error() helper to prevent error-handling drift
iesteem May 27, 2026
0c1516d
Add architecture documentation, named constants, and config flow comm…
iesteem May 27, 2026
253ecde
Fix pressure advance not emitted - gate on pressure_advance>0 instead…
iesteem May 27, 2026
333c293
Fix filament temperature loss for non-standard filaments using generi…
iesteem May 27, 2026
b364d1c
Fix crash when slicing 3MF files with missing filament_diameter and u…
iesteem May 27, 2026
025e883
Reduce SliceEngine header dependencies with forward declarations
iesteem May 27, 2026
43a14ed
Block slicing on config validation errors to match desktop red-popup …
iesteem May 27, 2026
aa1e50d
Fix bed temperature always defaulting to 60°C in cloud engine
iesteem May 28, 2026
8eed0a3
Replace printer G-code blocks with official U1 preset values
iesteem May 28, 2026
11b558d
fix(slice-engine): preserve JSON filename on early exit and support c…
iesteem May 28, 2026
5d1c6a3
refactor(slice-engine): clean up code smells in preset config handling
iesteem May 28, 2026
44ed90d
fix(slice-engine): enforce U1 printer preset, fail if not found
iesteem May 28, 2026
2283450
fix(slice-engine): reject slicing when printer params remain at defaults
iesteem May 28, 2026
4e6f54e
Refactor cloud engine preset substitution: add printer preset enforce…
iesteem May 29, 2026
6ce4898
Fix filament file check: add @System suffix for OrcaFilamentLibrary p…
iesteem May 29, 2026
f8755c2
Fix multi-plate extruder mapping: stop truncating filament arrays for…
iesteem May 29, 2026
7280aed
Refactor: extract shared helpers, RAII log suppressor, doc config mut…
iesteem May 29, 2026
6742109
bugfix: Mixed filament — 3MF persistence, Local-Z settings, dialog pa…
zhangzhend0ng May 29, 2026
df35d8e
Fix filament preset validation: linear scan fallback + suffix heurist…
iesteem May 29, 2026
bd14f61
Replace suffix-stripping heuristic with longest-prefix matching
iesteem May 29, 2026
fce739a
Improve FILAMENT_SUBSTITUTED warning message clarity
iesteem May 29, 2026
7566d89
Improve clarity of engine warning/error messages
iesteem May 29, 2026
d545199
Add prefix matching heuristic for printer presets
iesteem May 29, 2026
9921461
Fix painted region rebuild after mixed filament edits (#408)
zhangzhend0ng May 31, 2026
1b50a62
Merge branch 'Snapmaker:main' into feature_slicer_engine
iesteem Jun 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions localization/i18n/zh_CN/Snapmaker_Orca_zh_CN.po
Original file line number Diff line number Diff line change
Expand Up @@ -15151,8 +15151,8 @@ msgstr "编辑混色"
msgid "Order"
msgstr "顺序"

msgid "Target Color:"
msgstr "目标色:"
msgid "Target Color"
msgstr "目标色"

msgid "Swap filaments"
msgstr "切换方向"
Expand Down Expand Up @@ -15205,6 +15205,9 @@ msgstr "参与混色耗材颜色一致,无法混出更多颜色,请选用不
msgid "Full domain"
msgstr "全域生效"

msgid "Apply subdivision to infill"
msgstr "应用到填充"

msgid "Invalid characters found. Only digits, square brackets ([ and ]), and commas (,) are allowed."
msgstr "包含无效字符。仅允许输入数字、方括号([ 和])和逗号(,)。"

Expand Down
6 changes: 5 additions & 1 deletion src/libslic3r/Brim.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -964,7 +964,11 @@ static ExPolygons outer_inner_brim_area(const Print& print,
// config brim width in auto-brim mode
if (has_brim_auto) {
double brimWidthRaw = configBrimWidthByVolumeGroups(adhesion, maxSpeed, groupVolumePtrs, volumeGroup.slices, groupHeight);
brim_width = scale_(floor(brimWidthRaw / flowWidth / 2) * flowWidth * 2);
double auto_brim = scale_(floor(brimWidthRaw / flowWidth / 2) * flowWidth * 2);
// Only use auto-calculated width if the algorithm determined brim is needed.
// Otherwise fall back to the user-configured brim_width.
if (auto_brim > 0)
brim_width = auto_brim;
}
for (const ExPolygon& ex_poly : volumeGroup.slices) {
// BBS: additional brim width will be added if part's adhesion area is too small and brim is not generated
Expand Down
15 changes: 8 additions & 7 deletions src/libslic3r/GCode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ std::string WipeTowerIntegration::append_tcr(GCode& gcodegen, const WipeTower::T
check_add_eol(toolchange_gcode_str);

// SoftFever: set new PA for new filament
if (gcodegen.config().enable_pressure_advance.get_at(new_extruder_id)) {
if (gcodegen.config().pressure_advance.get_at(new_extruder_id) > 0) {
gcode += gcodegen.writer().set_pressure_advance(gcodegen.config().pressure_advance.get_at(new_extruder_id));
// Orca: Adaptive PA
// Reset Adaptive PA processor last PA value
Expand Down Expand Up @@ -804,7 +804,7 @@ std::string WipeTowerIntegration::append_tcr2(GCode& gcodegen, const WipeTower::
check_add_eol(toolchange_gcode_str);

// SoftFever: set new PA for new filament
if (new_extruder_id != -1 && gcodegen.config().enable_pressure_advance.get_at(new_extruder_id)) {
if (new_extruder_id != -1 && gcodegen.config().pressure_advance.get_at(new_extruder_id) > 0) {
gcode += gcodegen.writer().set_pressure_advance(gcodegen.config().pressure_advance.get_at(new_extruder_id));
// Orca: Adaptive PA
// Reset Adaptive PA processor last PA value
Expand Down Expand Up @@ -2212,6 +2212,7 @@ void GCode::_do_export(Print& print, GCodeOutputStream& file, ThumbnailsGenerato

m_enable_cooling_markers = true;
this->apply_print_config(print.config());
m_config.apply(print.full_print_config(), true);

// m_volumetric_speed = DoExport::autospeed_volumetric_limit(print);
print.throw_if_canceled();
Expand Down Expand Up @@ -7566,7 +7567,7 @@ std::string GCode::_extrude(const ExtrusionPath& path, std::string description,
m_curr_print->calib_mode() == CalibMode::Calib_PA_Pattern || m_curr_print->calib_mode() == CalibMode::Calib_PA_Tower;
bool evaluate_adaptive_pa = false;
bool role_change = (m_last_extrusion_role != path.role());
if (!is_pa_calib && EXTRUDER_CONFIG(adaptive_pressure_advance) && EXTRUDER_CONFIG(enable_pressure_advance)) {
if (!is_pa_calib && EXTRUDER_CONFIG(adaptive_pressure_advance) && EXTRUDER_CONFIG(pressure_advance) > 0) {
evaluate_adaptive_pa = true;
// If we have already emmited a PA change because the m_multi_flow_segment_path_pa_set is set
// skip re-issuing the PA change tag.
Expand Down Expand Up @@ -7738,7 +7739,7 @@ std::string GCode::_extrude(const ExtrusionPath& path, std::string description,
// or a flow change, so emit the flag to evaluate PA for the upcomming extrusion
// Emit tag before new speed is set so the post processor reads the next speed immediately and uses it.
// Dont emit tag if it has just already been emitted from a role change above
if (_mm3_per_mm > 0 && EXTRUDER_CONFIG(adaptive_pressure_advance) && EXTRUDER_CONFIG(enable_pressure_advance) &&
if (_mm3_per_mm > 0 && EXTRUDER_CONFIG(adaptive_pressure_advance) && EXTRUDER_CONFIG(pressure_advance) > 0 &&
EXTRUDER_CONFIG(adaptive_pressure_advance_overhangs) && !evaluate_adaptive_pa) {
if (writer().get_current_speed() >
F) { // Ramping down speed - use overhang logic where the minimum speed is used between current and upcoming extrusion
Expand Down Expand Up @@ -7937,7 +7938,7 @@ std::string GCode::_extrude(const ExtrusionPath& path, std::string description,
// ORCA: Adaptive PA code segment when adjusting PA within the same feature
// There is a speed change or flow change so emit the flag to evaluate PA for the upcomming extrusion
// Emit tag before new speed is set so the post processor reads the next speed immediately and uses it.
if (_mm3_per_mm > 0 && EXTRUDER_CONFIG(adaptive_pressure_advance) && EXTRUDER_CONFIG(enable_pressure_advance) &&
if (_mm3_per_mm > 0 && EXTRUDER_CONFIG(adaptive_pressure_advance) && EXTRUDER_CONFIG(pressure_advance) > 0 &&
EXTRUDER_CONFIG(adaptive_pressure_advance_overhangs)) {
if (last_set_speed > new_speed) { // Ramping down speed - use overhang logic where the minimum speed is used between
// current and upcoming extrusion
Expand Down Expand Up @@ -8436,7 +8437,7 @@ std::string GCode::set_extruder(unsigned int extruder_id, double print_z, bool b
gcode += this->placeholder_parser_process("filament_start_gcode", filament_start_gcode, extruder_id, &config);
check_add_eol(gcode);
}
if (m_config.enable_pressure_advance.get_at(extruder_id)) {
if (m_config.pressure_advance.get_at(extruder_id) > 0) {
gcode += m_writer.set_pressure_advance(m_config.pressure_advance.get_at(extruder_id));
// Orca: Adaptive PA
// Reset Adaptive PA processor last PA value
Expand Down Expand Up @@ -8651,7 +8652,7 @@ std::string GCode::set_extruder(unsigned int extruder_id, double print_z, bool b
if (m_ooze_prevention.enable)
gcode += m_ooze_prevention.post_toolchange(*this);

if (m_config.enable_pressure_advance.get_at(extruder_id)) {
if (m_config.pressure_advance.get_at(extruder_id) > 0) {
gcode += m_writer.set_pressure_advance(m_config.pressure_advance.get_at(extruder_id));
}
// Orca: tool changer or IDEX's firmware may change Z position, so we set it to unknown/undefined
Expand Down
8 changes: 4 additions & 4 deletions src/libslic3r/GCode/AdaptivePAProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ AdaptivePAProcessor::AdaptivePAProcessor(GCode &gcodegen, const std::vector<unsi
// Constructor body can be used for further initialization if necessary
for (unsigned int tool : tools_used) {
// Only enable model for the tool if both PA and adaptive PA options are enabled
if(m_config.adaptive_pressure_advance.get_at(tool) && m_config.enable_pressure_advance.get_at(tool)){
if(m_config.adaptive_pressure_advance.get_at(tool) && m_config.pressure_advance.get_at(tool) > 0){
auto interpolator = std::make_unique<AdaptivePAInterpolator>();
// Get calibration values from extruder
std::string pa_calibration_values = m_config.adaptive_pressure_advance_model.get_at(tool);
Expand Down Expand Up @@ -218,7 +218,7 @@ std::string AdaptivePAProcessor::process_layer(std::string &&gcode) {

if(!interpolator){ // Tool not found in the interpolator map
// Tool not found in the PA interpolator to tool map
predicted_pa = m_config.enable_pressure_advance.get_at(m_last_extruder_id) ? m_config.pressure_advance.get_at(m_last_extruder_id) : 0;
predicted_pa = m_config.pressure_advance.get_at(m_last_extruder_id) > 0 ? m_config.pressure_advance.get_at(m_last_extruder_id) : 0;
if(m_config.gcode_comments) output << "; APA: Tool doesnt have APA enabled\n";
} else if (!interpolator->isInitialised() || (!m_config.adaptive_pressure_advance.get_at(m_last_extruder_id)) )
// Check if the model is not initialised by the constructor for the active extruder
Expand All @@ -227,7 +227,7 @@ std::string AdaptivePAProcessor::process_layer(std::string &&gcode) {
// however check for robustness sake.
{
// Model failed or adaptive pressure advance not enabled - use default value from m_config
predicted_pa = m_config.enable_pressure_advance.get_at(m_last_extruder_id) ? m_config.pressure_advance.get_at(m_last_extruder_id) : 0;
predicted_pa = m_config.pressure_advance.get_at(m_last_extruder_id) > 0 ? m_config.pressure_advance.get_at(m_last_extruder_id) : 0;
if(m_config.gcode_comments) output << "; APA: Interpolator setup failed, using default pressure advance\n";
} else { // Model setup succeeded
// Proceed to identify the print speed to use to calculate the adaptive PA value
Expand All @@ -252,7 +252,7 @@ std::string AdaptivePAProcessor::process_layer(std::string &&gcode) {
predicted_pa = m_config.adaptive_pressure_advance_bridges.get_at(m_last_extruder_id);

if (predicted_pa < 0) { // If extrapolation fails, fall back to the default PA for the extruder.
predicted_pa = m_config.enable_pressure_advance.get_at(m_last_extruder_id) ? m_config.pressure_advance.get_at(m_last_extruder_id) : 0;
predicted_pa = m_config.pressure_advance.get_at(m_last_extruder_id) > 0 ? m_config.pressure_advance.get_at(m_last_extruder_id) : 0;
if(m_config.gcode_comments) output << "; APA: Interpolation failed, using fallback pressure advance value\n";
}
}
Expand Down
6 changes: 5 additions & 1 deletion src/libslic3r/GCode/GCodeProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4454,9 +4454,13 @@ void GCodeProcessor::run_post_process()
PrintEstimatedStatistics::ETimeMode mode = static_cast<PrintEstimatedStatistics::ETimeMode>(i);
if (mode == PrintEstimatedStatistics::ETimeMode::Normal || machine.enabled) {
char buf[128];
// First layer actual print time = layer 0 total time - start gcode (prepare) time
float first_layer_time = 0.0f;
if (!machine.layers_time.empty())
first_layer_time = std::max(0.0f, machine.layers_time[0] - machine.prepare_time);
sprintf(buf, "; estimated first layer printing time (%s mode) = %s\n",
(mode == PrintEstimatedStatistics::ETimeMode::Normal) ? "normal" : "silent",
get_time_dhms(machine.prepare_time).c_str());
get_time_dhms(first_layer_time).c_str());
export_lines.append_line(buf);
processed = true;
}
Expand Down
1 change: 1 addition & 0 deletions src/libslic3r/Preset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -907,6 +907,7 @@ static std::vector<std::string> s_Preset_print_options {
"seam_slope_type", "seam_slope_conditional", "scarf_angle_threshold", "scarf_joint_speed", "scarf_joint_flow_ratio", "seam_slope_start_height", "seam_slope_entire_loop", "seam_slope_min_length", "seam_slope_steps", "seam_slope_inner_walls", "scarf_overhang_threshold",
"interlocking_beam", "interlocking_orientation", "interlocking_beam_layer_count", "interlocking_depth", "interlocking_boundary_avoidance", "interlocking_beam_width",
"dithering_local_z_mode",
"dithering_local_z_whole_objects",
"dithering_local_z_infill",
"calib_flowrate_topinfill_special_order",
};
Expand Down
9 changes: 8 additions & 1 deletion src/libslic3r/PresetBundle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ static std::vector<std::string> s_project_options {
"mixed_filament_definitions",
"mixed_color_layer_height_a",
"mixed_color_layer_height_b",
"dithering_z_step_size",
"dithering_local_z_mode",
"dithering_local_z_whole_objects",
"dithering_local_z_infill",
"dithering_local_z_direct_multicolor",
"dithering_step_painted_zones_only",
};

// SM_FEATURE: add Snapmaker machine as default
Expand Down Expand Up @@ -1096,7 +1102,8 @@ int PresetBundle::validate_presets(const std::string &file_name, DynamicPrintCon
different_values = config.option<ConfigOptionStrings>("different_settings_to_system", true)->values;

//PrinterTechnology printer_technology = Preset::printer_technology(config);
size_t filament_count = config.option<ConfigOptionFloats>("filament_diameter")->values.size();
const auto* filament_diameter_opt = config.option<ConfigOptionFloats>("filament_diameter");
size_t filament_count = filament_diameter_opt ? filament_diameter_opt->values.size() : 0;
inherits_values.resize(filament_count + 2, std::string());
different_values.resize(filament_count + 2, std::string());
filament_preset_name.resize(filament_count, std::string());
Expand Down
45 changes: 44 additions & 1 deletion src/libslic3r/PrintApply.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,12 @@ static std::vector<PrintObjectTrafoAndInstances> print_objects_from_model_object
trafo.trafo = model_instance_transformation.get_matrix_with_applied_shrinkage_compensation(shrinkage_compensation);

auto shift = Point::new_scale(trafo.trafo.data()[12], trafo.trafo.data()[13]);
// Reset the XY axes of the transformation.
// Reset the XYZ translation axes of the transformation.
// XY offsets are stored in shift for per-instance positioning;
// Z offset is discarded to ensure first layer starts at Z=0.
trafo.trafo.data()[12] = 0;
trafo.trafo.data()[13] = 0;
trafo.trafo.data()[14] = 0;
// Search or insert a trafo.
auto it = trafos.emplace(trafo).first;
const_cast<PrintObjectTrafoAndInstances&>(*it).instances.emplace_back(PrintInstance{ nullptr, model_instance, shift });
Expand Down Expand Up @@ -1177,8 +1180,44 @@ static void append_mixed_component_extruders(const MixedFilamentManager &mixed_m
}
}

static bool painted_region_targets_match(const PrintObjectRegions &print_object_regions,
const std::vector<unsigned int> &painting_extruders)
{
std::vector<unsigned int> expected_extruders = painting_extruders;
std::sort(expected_extruders.begin(), expected_extruders.end());
expected_extruders.erase(std::unique(expected_extruders.begin(), expected_extruders.end()), expected_extruders.end());

for (const PrintObjectRegions::LayerRangeRegions &layer_range : print_object_regions.layer_ranges) {
std::vector<std::pair<int, unsigned int>> expected_targets;
expected_targets.reserve(layer_range.volume_regions.size() * expected_extruders.size());

for (int parent_region_id = 0; parent_region_id < int(layer_range.volume_regions.size()); ++parent_region_id) {
const PrintObjectRegions::VolumeRegion &parent_region = layer_range.volume_regions[parent_region_id];
if (parent_region.region != nullptr &&
(parent_region.model_volume->is_model_part() || parent_region.model_volume->is_modifier()) &&
mm_paint_applies_to_parent_region(layer_range, parent_region_id)) {
for (unsigned int extruder_id : expected_extruders)
expected_targets.emplace_back(parent_region_id, extruder_id);
}
}

std::vector<std::pair<int, unsigned int>> actual_targets;
actual_targets.reserve(layer_range.painted_regions.size());
for (const PrintObjectRegions::PaintedRegion &painted_region : layer_range.painted_regions)
actual_targets.emplace_back(painted_region.parent, painted_region.extruder_id);

std::sort(expected_targets.begin(), expected_targets.end());
std::sort(actual_targets.begin(), actual_targets.end());
if (actual_targets != expected_targets)
return false;
}

return true;
}

static bool same_layer_pointillism_enabled(const MixedFilamentManager &mixed_mgr)
{
// Deprecated: same-layer pointillism is disabled and will be removed.
#if 0
for (const MixedFilament &mf : mixed_mgr.mixed_filaments())
if (mf.enabled && mf.distribution_mode == int(MixedFilament::SameLayerPointillisme))
Expand Down Expand Up @@ -1897,6 +1936,10 @@ Print::ApplyStatus Print::apply(const Model &model, DynamicPrintConfig new_full_
print_object_regions->clear();
model_object_status.print_object_regions_status = ModelObjectStatus::PrintObjectRegionsStatus::Invalid;
print_regions_reshuffled = true;
} else if (print_object_regions && !painted_region_targets_match(*print_object_regions, painting_extruders)) {
invalidate();
model_object_status.print_object_regions_status = ModelObjectStatus::PrintObjectRegionsStatus::PartiallyValid;
print_regions_reshuffled = true;
} else if (print_object_regions &&
verify_update_print_object_regions(
print_object.model_object()->volumes,
Expand Down
8 changes: 4 additions & 4 deletions src/libslic3r/PrintConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4362,7 +4362,7 @@ void PrintConfigDef::init_fff_params()
"This is enabled automatically with Subdivide Mix Layer. Turn it off to keep infill on the normal layer height.\n\n"
"It can improve internal color mixing, but may add toolchanges and affect infill behavior.");
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionBool(true));
def->set_default_value(new ConfigOptionBool(false));

def = this->add("dithering_local_z_direct_multicolor", coBool);
def->label = L("Use direct multicolor Local-Z solver");
Expand Down Expand Up @@ -6430,10 +6430,12 @@ void PrintConfigDef::init_extruder_option_keys()
"deretraction_speed",
"long_retractions_when_cut",
"retract_before_wipe",
"retract_length_toolchange",
"retract_lift_above",
"retract_lift_below",
"retract_lift_enforce",
"retract_restart_extra",
"retract_restart_extra_toolchange",
"retract_when_changing_layer",
"retraction_distances_when_cut",
"retraction_length",
Expand All @@ -6444,9 +6446,7 @@ void PrintConfigDef::init_extruder_option_keys()
"wipe_distance",
"z_hop",
"z_hop_types",
"z_hop_when_prime",
"retract_length_toolchange",
"retract_restart_extra_toolchange"
"z_hop_when_prime"
};
assert(std::is_sorted(m_extruder_retract_keys.begin(), m_extruder_retract_keys.end()));
}
Expand Down
Loading
Loading