Skip to content

Commit

Permalink
Merge branch 'SoftFever:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Stevetm2 authored May 10, 2024
2 parents a55038d + 46b7a29 commit a59f46e
Show file tree
Hide file tree
Showing 17 changed files with 70 additions and 36 deletions.
19 changes: 0 additions & 19 deletions deps/wxWidgets/wxWidgets.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
set(_wx_version 3.1.5)
set(_wx_git_tag v${_wx_version})

set(_wx_toolkit "")
set(_wx_private_font "-DwxUSE_PRIVATE_FONTS=1")

Expand All @@ -20,26 +17,10 @@ else ()
set(_wx_edge "-DwxUSE_WEBVIEW_EDGE=OFF")
endif ()


# Note: for anybody wanting to switch to tarball fetching - this won't just work as
# git apply expects a git repo. Either git init empty repo, or change patching method.
# if (WIN32)
# # Windows requires a different tarball because of configured line endings as stated in docs.
# set(_wx_tarball_url https://github.com/wxWidgets/wxWidgets/releases/download/${_wx_git_tag}/wxWidgets-${_wx_version}.7z)
# set(_wx_tarball_hash 99f5382312e4a4aea444ada07341a72c5d4a69b58d8e76586d4b94ede7f5ef4d)
# else()
# set(_wx_tarball_url https://github.com/wxWidgets/wxWidgets/releases/download/${_wx_git_tag}/wxWidgets-${_wx_version}.tar.bz2)
# set(_wx_tarball_hash d7b3666de33aa5c10ea41bb9405c40326e1aeb74ee725bb88f90f1d50270a224)
# endif()

orcaslicer_add_cmake_project(
wxWidgets
GIT_REPOSITORY "https://github.com/SoftFever/Orca-deps-wxWidgets"
# GIT_TAG ${_wx_git_tag}
GIT_SHALLOW ON
# URL ${_wx_tarball_url}
# URL_HASH SHA256=${_wx_tarball_hash}
# PATCH_COMMAND ${_patch_cmd}
DEPENDS ${PNG_PKG} ${ZLIB_PKG} ${EXPAT_PKG} dep_TIFF dep_JPEG
CMAKE_ARGS
-DwxBUILD_PRECOMP=ON
Expand Down
10 changes: 8 additions & 2 deletions src/libslic3r/GCode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2352,11 +2352,17 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
auto probe_dist_y = std::max(1., m_config.bed_mesh_probe_distance.value.y());
int probe_count_x = std::max(3, (int) std::ceil(mesh_bbox.size().x() / probe_dist_x));
int probe_count_y = std::max(3, (int) std::ceil(mesh_bbox.size().y() / probe_dist_y));
this->placeholder_parser().set("bed_mesh_probe_count", new ConfigOptionInts({probe_count_x, probe_count_y}));
auto bed_mesh_algo = "bicubic";
if (probe_count_x < 4 || probe_count_y < 4) {
if (probe_count_x * probe_count_y <= 6) { // lagrange needs up to a total of 6 mesh points
bed_mesh_algo = "lagrange";
}
else
if(print.config().gcode_flavor == gcfKlipper){
// bicubic needs 4 probe points per axis
probe_count_x = std::max(probe_count_x,4);
probe_count_y = std::max(probe_count_y,4);
}
this->placeholder_parser().set("bed_mesh_probe_count", new ConfigOptionInts({probe_count_x, probe_count_y}));
this->placeholder_parser().set("bed_mesh_algo", bed_mesh_algo);
// get center without wipe tower
BoundingBoxf bbox_wo_wt; // bounding box without wipe tower
Expand Down
5 changes: 3 additions & 2 deletions src/libslic3r/GCode/WipeTower2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,8 @@ WipeTower2::WipeTower2(const PrintConfig& config, const PrintRegionConfig& defau
m_infill_speed(default_region_config.sparse_infill_speed),
m_perimeter_speed(default_region_config.inner_wall_speed),
m_current_tool(initial_tool),
wipe_volumes(wiping_matrix)
wipe_volumes(wiping_matrix),
m_wipe_tower_max_purge_speed(float(config.wipe_tower_max_purge_speed))
{
// Read absolute value of first layer speed, if given as percentage,
// it is taken over following default. Speeds from config are not
Expand Down Expand Up @@ -1099,7 +1100,7 @@ void WipeTower2::toolchange_Wipe(
// All the calculations in all other places take the spacing into account for all the layers.

// If spare layers are excluded->if 1 or less toolchange has been done, it must be sill the first layer, too.So slow down.
const float target_speed = is_first_layer() || (m_num_tool_changes <= 1 && m_no_sparse_layers) ? m_first_layer_speed * 60.f : std::min(5400.f, m_infill_speed * 60.f);
const float target_speed = is_first_layer() || (m_num_tool_changes <= 1 && m_no_sparse_layers) ? m_first_layer_speed * 60.f : std::min(m_wipe_tower_max_purge_speed * 60.f, m_infill_speed * 60.f);
float wipe_speed = 0.33f * target_speed;

// if there is less than 2.5*m_perimeter_width to the edge, advance straightaway (there is likely a blob anyway)
Expand Down
1 change: 1 addition & 0 deletions src/libslic3r/GCode/WipeTower2.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ class WipeTower2
int m_old_temperature = -1; // To keep track of what was the last temp that we set (so we don't issue the command when not neccessary)
float m_travel_speed = 0.f;
float m_infill_speed = 0.f;
float m_wipe_tower_max_purge_speed = 90.f;
float m_perimeter_speed = 0.f;
float m_first_layer_speed = 0.f;
size_t m_first_layer_idx = size_t(-1);
Expand Down
1 change: 1 addition & 0 deletions src/libslic3r/Layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ void Layer::make_perimeters()
&& config.opt_serialize("outer_wall_line_width") == other_config.opt_serialize("outer_wall_line_width")
&& config.detect_thin_wall == other_config.detect_thin_wall
&& config.infill_wall_overlap == other_config.infill_wall_overlap
&& config.top_bottom_infill_wall_overlap == other_config.top_bottom_infill_wall_overlap
&& config.fuzzy_skin == other_config.fuzzy_skin
&& config.fuzzy_skin_thickness == other_config.fuzzy_skin_thickness
&& config.fuzzy_skin_point_distance == other_config.fuzzy_skin_point_distance
Expand Down
23 changes: 18 additions & 5 deletions src/libslic3r/PerimeterGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2138,10 +2138,17 @@ void PerimeterGenerator::process_classic()
ext_perimeter_spacing / 2 :
// two or more loops?
perimeter_spacing / 2;

// only apply infill overlap if we actually have one perimeter
coord_t infill_peri_overlap = 0;
coord_t top_infill_peri_overlap = 0;
if (inset > 0) {
infill_peri_overlap = coord_t(scale_(this->config->infill_wall_overlap.get_abs_value(unscale<double>(inset + solid_infill_spacing / 2))));
if(this->layer_id == 0 || this->upper_slices == nullptr){
infill_peri_overlap = coord_t(scale_(this->config->top_bottom_infill_wall_overlap.get_abs_value(unscale<double>(inset + solid_infill_spacing / 2))));
}else{
infill_peri_overlap = coord_t(scale_(this->config->infill_wall_overlap.get_abs_value(unscale<double>(inset + solid_infill_spacing / 2))));
top_infill_peri_overlap = coord_t(scale_(this->config->top_bottom_infill_wall_overlap.get_abs_value(unscale<double>(inset + solid_infill_spacing / 2))));
}
inset -= infill_peri_overlap;
}
// simplify infill contours according to resolution
Expand All @@ -2160,7 +2167,7 @@ void PerimeterGenerator::process_classic()
//if any top_fills, grow them by ext_perimeter_spacing/2 to have the real un-anchored fill
ExPolygons top_infill_exp = intersection_ex(fill_clip, offset_ex(top_fills, double(ext_perimeter_spacing / 2)));
if (!top_fills.empty()) {
infill_exp = union_ex(infill_exp, offset_ex(top_infill_exp, double(infill_peri_overlap)));
infill_exp = union_ex(infill_exp, offset_ex(top_infill_exp, double(top_infill_peri_overlap)));
}
this->fill_surfaces->append(infill_exp, stInternal);

Expand Down Expand Up @@ -2866,8 +2873,14 @@ ExPolygons infill_contour = union_ex(wallToolPaths.getInnerContour());
ext_perimeter_spacing :
// two or more loops?
perimeter_spacing;

inset = coord_t(scale_(this->config->infill_wall_overlap.get_abs_value(unscale<double>(inset))));
coord_t top_inset = inset;

top_inset = coord_t(scale_(this->config->top_bottom_infill_wall_overlap.get_abs_value(unscale<double>(inset))));
if(is_topmost_layer || is_bottom_layer)
inset = coord_t(scale_(this->config->top_bottom_infill_wall_overlap.get_abs_value(unscale<double>(inset))));
else
inset = coord_t(scale_(this->config->infill_wall_overlap.get_abs_value(unscale<double>(inset))));

// simplify infill contours according to resolution
Polygons pp;
for (ExPolygon& ex : infill_contour)
Expand All @@ -2882,7 +2895,7 @@ ExPolygons infill_contour = union_ex(wallToolPaths.getInnerContour());
float(inset + min_perimeter_infill_spacing / 2.));
// append infill areas to fill_surfaces
if (!top_fills.empty()) {
infill_exp = union_ex(infill_exp, offset_ex(top_fills, double(inset)));
infill_exp = union_ex(infill_exp, offset_ex(top_fills, double(top_inset)));
}
this->fill_surfaces->append(infill_exp, stInternal);

Expand Down
4 changes: 2 additions & 2 deletions src/libslic3r/Preset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,7 @@ static std::vector<std::string> s_Preset_print_options {
"sparse_infill_filament", "solid_infill_filament", "support_filament", "support_interface_filament","support_interface_not_for_body",
"ooze_prevention", "standby_temperature_delta", "interface_shells", "line_width", "initial_layer_line_width",
"inner_wall_line_width", "outer_wall_line_width", "sparse_infill_line_width", "internal_solid_infill_line_width",
"top_surface_line_width", "support_line_width", "infill_wall_overlap", "bridge_flow", "internal_bridge_flow",
"top_surface_line_width", "support_line_width", "infill_wall_overlap","top_bottom_infill_wall_overlap", "bridge_flow", "internal_bridge_flow",
"elefant_foot_compensation", "elefant_foot_compensation_layers", "xy_contour_compensation", "xy_hole_compensation", "resolution", "enable_prime_tower",
"prime_tower_width", "prime_tower_brim_width", "prime_volume",
"wipe_tower_no_sparse_layers", "compatible_printers", "compatible_printers_condition", "inherits",
Expand All @@ -816,7 +816,7 @@ static std::vector<std::string> s_Preset_print_options {
"tree_support_brim_width", "gcode_comments", "gcode_label_objects",
"initial_layer_travel_speed", "exclude_object", "slow_down_layers", "infill_anchor", "infill_anchor_max","initial_layer_min_bead_width",
"make_overhang_printable", "make_overhang_printable_angle", "make_overhang_printable_hole_size" ,"notes",
"wipe_tower_cone_angle", "wipe_tower_extra_spacing", "wipe_tower_extruder", "wiping_volumes_extruders","wipe_tower_bridging", "single_extruder_multi_material_priming",
"wipe_tower_cone_angle", "wipe_tower_extra_spacing","wipe_tower_max_purge_speed", "wipe_tower_extruder", "wiping_volumes_extruders","wipe_tower_bridging", "single_extruder_multi_material_priming",
"wipe_tower_rotation_angle", "tree_support_branch_distance_organic", "tree_support_branch_diameter_organic", "tree_support_branch_angle_organic",
"hole_to_polyhole", "hole_to_polyhole_threshold", "hole_to_polyhole_twisted", "mmu_segmented_region_max_width", "mmu_segmented_region_interlocking_depth",
"small_area_infill_flow_compensation", "small_area_infill_flow_compensation_model",
Expand Down
1 change: 1 addition & 0 deletions src/libslic3r/Print.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver & /* n
|| opt_key == "slow_down_layers"
|| opt_key == "wipe_tower_cone_angle"
|| opt_key == "wipe_tower_extra_spacing"
|| opt_key == "wipe_tower_max_purge_speed"
|| opt_key == "wipe_tower_extruder"
|| opt_key == "wiping_volumes_extruders"
|| opt_key == "enable_filament_ramming"
Expand Down
23 changes: 22 additions & 1 deletion src/libslic3r/PrintConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2680,11 +2680,20 @@ def = this->add("filament_loading_speed", coFloats);
def = this->add("infill_wall_overlap", coPercent);
def->label = L("Infill/Wall overlap");
def->category = L("Strength");
def->tooltip = L("Infill area is enlarged slightly to overlap with wall for better bonding. The percentage value is relative to line width of sparse infill");
def->tooltip = L("Infill area is enlarged slightly to overlap with wall for better bonding. The percentage value is relative to line width of sparse infill. Set this value to ~10-15% to minimize potential over extrusion and accumulation of material resulting in rough top surfaces.");
def->sidetext = L("%");
def->ratio_over = "inner_wall_line_width";
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionPercent(15));

def = this->add("top_bottom_infill_wall_overlap", coPercent);
def->label = L("Top/Bottom solid infill/wall overlap");
def->category = L("Strength");
def->tooltip = L("Top solid infill area is enlarged slightly to overlap with wall for better bonding and to minimize the appearance of pinholes where the top infill meets the walls. A value of 25-30% is a good starting point, minimising the appearance of pinholes. The percentage value is relative to line width of sparse infill");
def->sidetext = L("%");
def->ratio_over = "inner_wall_line_width";
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionPercent(25));

def = this->add("sparse_infill_speed", coFloat);
def->label = L("Sparse infill");
Expand Down Expand Up @@ -4757,6 +4766,18 @@ def = this->add("filament_loading_speed", coFloats);
def->min = 100.;
def->max = 300.;
def->set_default_value(new ConfigOptionPercent(100.));

def = this->add("wipe_tower_max_purge_speed", coFloat);
def->label = L("Maximum print speed when purging");
def->tooltip = L("The maximum print speed when purging in the wipe tower. If the sparse infill speed "
"or calculated speed from the filament max volumetric speed is lower, the lowest speed will be used instead.\n"
"Increasing this speed may affect the tower's stability, as purging can be performed over "
"sparse layers. Before increasing this parameter beyond the default of 90mm/sec, make sure your printer can reliably "
"bridge at the increased speeds.");
def->sidetext = L("mm/s");
def->mode = comAdvanced;
def->min = 10;
def->set_default_value(new ConfigOptionFloat(90.));

def = this->add("wipe_tower_extruder", coInt);
def->label = L("Wipe tower extruder");
Expand Down
2 changes: 2 additions & 0 deletions src/libslic3r/PrintConfig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -894,6 +894,7 @@ PRINT_CONFIG_CLASS_DEFINE(
((ConfigOptionInt, sparse_infill_filament))
((ConfigOptionFloatOrPercent, sparse_infill_line_width))
((ConfigOptionPercent, infill_wall_overlap))
((ConfigOptionPercent, top_bottom_infill_wall_overlap))
((ConfigOptionFloat, sparse_infill_speed))
//BBS
((ConfigOptionBool, infill_combination))
Expand Down Expand Up @@ -1240,6 +1241,7 @@ PRINT_CONFIG_CLASS_DERIVED_DEFINE(
// Orca: mmu support
((ConfigOptionFloat, wipe_tower_cone_angle))
((ConfigOptionPercent, wipe_tower_extra_spacing))
((ConfigOptionFloat, wipe_tower_max_purge_speed))
((ConfigOptionInt, wipe_tower_extruder))
((ConfigOptionFloats, wiping_volumes_extruders))

Expand Down
1 change: 1 addition & 0 deletions src/libslic3r/PrintObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -926,6 +926,7 @@ bool PrintObject::invalidate_state_by_config_options(
|| opt_key == "initial_layer_line_width"
|| opt_key == "inner_wall_line_width"
|| opt_key == "infill_wall_overlap"
|| opt_key == "top_bottom_infill_wall_overlap"
|| opt_key == "seam_gap"
|| opt_key == "role_based_wipe_speed"
|| opt_key == "wipe_on_loops"
Expand Down
2 changes: 1 addition & 1 deletion src/slic3r/GUI/ConfigManipulation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, co

bool purge_in_primetower = preset_bundle->printers.get_edited_preset().config.opt_bool("purge_in_prime_tower");

for (auto el : {"wipe_tower_rotation_angle", "wipe_tower_cone_angle", "wipe_tower_extra_spacing", "wipe_tower_bridging", "wipe_tower_no_sparse_layers"})
for (auto el : {"wipe_tower_rotation_angle", "wipe_tower_cone_angle", "wipe_tower_extra_spacing", "wipe_tower_max_purge_speed", "wipe_tower_bridging", "wipe_tower_no_sparse_layers"})
toggle_line(el, have_prime_tower && purge_in_primetower);

toggle_line("prime_volume",have_prime_tower && !purge_in_primetower);
Expand Down
1 change: 0 additions & 1 deletion src/slic3r/GUI/DeviceManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1382,7 +1382,6 @@ void MachineObject::parse_status(int flag)
}

is_support_filament_tangle_detect = ((flag >> 19) & 0x1) != 0;
is_support_user_preset = ((flag >> 22) & 0x1) != 0;
if (xcam_filament_tangle_detect_count > 0)
xcam_filament_tangle_detect_count--;
else {
Expand Down
1 change: 1 addition & 0 deletions src/slic3r/GUI/GLCanvas3D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6387,6 +6387,7 @@ bool GLCanvas3D::_init_main_toolbar()
item.icon_filename = m_is_dark ? "toolbar_variable_layer_height_dark.svg" : "toolbar_variable_layer_height.svg";
item.tooltip = _utf8(L("Variable layer height"));
item.sprite_id++;
item.left.toggable = true; // ORCA Closes popup if other toolbar icon clicked and it allows closing popup when clicked its button
item.left.action_callback = [this]() { if (m_canvas != nullptr) wxPostEvent(m_canvas, SimpleEvent(EVT_GLTOOLBAR_LAYERSEDITING)); };
item.visibility_callback = [this]()->bool {
bool res = current_printer_technology() == ptFFF;
Expand Down
2 changes: 1 addition & 1 deletion src/slic3r/GUI/GUI_Factories.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ std::map<std::string, std::vector<SimpleSettingData>> SettingsFactory::PART_CAT
{ L("Strength"), {{"wall_loops", "",1},{"top_shell_layers", L("Top Solid Layers"),1},{"top_shell_thickness", L("Top Minimum Shell Thickness"),1},
{"bottom_shell_layers", L("Bottom Solid Layers"),1}, {"bottom_shell_thickness", L("Bottom Minimum Shell Thickness"),1},
{"sparse_infill_density", "",1},{"sparse_infill_pattern", "",1},{"infill_anchor", "",1},{"infill_anchor_max", "",1},{"top_surface_pattern", "",1},{"bottom_surface_pattern", "",1}, {"internal_solid_infill_pattern", "",1},
{"infill_combination", "",1}, {"infill_wall_overlap", "",1}, {"solid_infill_direction", "",1}, {"rotate_solid_infill_direction", "",1}, {"infill_direction", "",1}, {"bridge_angle", "",1}, {"minimum_sparse_infill_area", "",1}
{"infill_combination", "",1}, {"infill_wall_overlap", "",1},{"top_bottom_infill_wall_overlap", "",1}, {"solid_infill_direction", "",1}, {"rotate_solid_infill_direction", "",1}, {"infill_direction", "",1}, {"bridge_angle", "",1}, {"minimum_sparse_infill_area", "",1}
}},
{ L("Speed"), {{"outer_wall_speed", "",1},{"inner_wall_speed", "",2},{"sparse_infill_speed", "",3},{"top_surface_speed", "",4}, {"internal_solid_infill_speed", "",5},
{"enable_overhang_speed", "",6}, {"overhang_speed_classic", "",6}, {"overhang_1_4_speed", "",7}, {"overhang_2_4_speed", "",8}, {"overhang_3_4_speed", "",9}, {"overhang_4_4_speed", "",10},
Expand Down
2 changes: 1 addition & 1 deletion src/slic3r/GUI/Plater.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2706,7 +2706,7 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame)
"brim_width", "wall_loops", "wall_filament", "sparse_infill_density", "sparse_infill_filament", "top_shell_layers",
"enable_support", "support_filament", "support_interface_filament",
"support_top_z_distance", "support_bottom_z_distance", "raft_layers",
"wipe_tower_rotation_angle", "wipe_tower_cone_angle", "wipe_tower_extra_spacing", "wipe_tower_extruder",
"wipe_tower_rotation_angle", "wipe_tower_cone_angle", "wipe_tower_extra_spacing","wipe_tower_max_purge_speed", "wipe_tower_extruder",
"best_object_pos"
}))
, sidebar(new Sidebar(q))
Expand Down
Loading

0 comments on commit a59f46e

Please sign in to comment.