diff --git a/scripts/linux.d/gentoo b/scripts/linux.d/gentoo new file mode 100644 index 0000000000..017c9c6254 --- /dev/null +++ b/scripts/linux.d/gentoo @@ -0,0 +1,75 @@ +#!/bin/bash + +if ! command -v qlist > /dev/null 2>&1; then + echo "app-portage/portage-utils is required but not installed. Installing..." + sudo emerge --ask --verbose app-portage/portage-utils +fi + +REQUIRED_DEV_PACKAGES=( + app-crypt/libsecret + dev-build/autoconf + dev-build/cmake + dev-build/libtool + dev-build/ninja + dev-cpp/gstreamermm + dev-libs/libmspack + dev-libs/libspnav + dev-libs/openssl + dev-vcs/git + gui-libs/eglexternalplatform + kde-frameworks/extra-cmake-modules + media-libs/glew + media-libs/gst-plugins-base:1.0 + media-libs/gstreamer:1.0 + net-misc/curl + net-misc/wget + sys-apps/dbus + sys-apps/file + sys-apps/texinfo + sys-devel/gcc + sys-devel/gettext + sys-devel/m4 + virtual/libudev + x11-libs/gtk+:3 +) + +if [[ -n "$UPDATE_LIB" ]] +then + echo -e "Updating Gentoo ...\n" + + # Check which version of webkit-gtk is available/preferred + if qlist -I net-libs/webkit-gtk:4 > /dev/null 2>&1; then + REQUIRED_DEV_PACKAGES+=(net-libs/webkit-gtk:4) + elif qlist -I net-libs/webkit-gtk:4.1 > /dev/null 2>&1; then + REQUIRED_DEV_PACKAGES+=(net-libs/webkit-gtk:4.1) + else + # Default to 4.1 if neither is installed + REQUIRED_DEV_PACKAGES+=(net-libs/webkit-gtk:4.1) + fi + + if [[ -n "$BUILD_DEBUG" ]] + then + REQUIRED_DEV_PACKAGES+=(dev-libs/openssl net-misc/curl) + fi + + # Filter out packages that are already installed + packages_to_install=() + for pkg in "${REQUIRED_DEV_PACKAGES[@]}"; do + if ! qlist -I "$pkg" > /dev/null 2>&1; then + packages_to_install+=("$pkg") + fi + done + + # Install them if there are any to install + if [ ${#packages_to_install[@]} -gt 0 ]; then + sudo emerge --ask --verbose --noreplace "${packages_to_install[@]}" + else + echo "All required packages are already installed." + fi + + echo -e "done\n" + exit 0 +fi + +export FOUND_GTK3_DEV +FOUND_GTK3_DEV=$(qlist -I x11-libs/gtk+:3 2>/dev/null || find /usr/lib64/libgtk-3.so 2>/dev/null || true) diff --git a/src/libslic3r/GCode/CoolingBuffer.cpp b/src/libslic3r/GCode/CoolingBuffer.cpp index 53c17422f3..41e612fdab 100644 --- a/src/libslic3r/GCode/CoolingBuffer.cpp +++ b/src/libslic3r/GCode/CoolingBuffer.cpp @@ -879,8 +879,8 @@ std::string CoolingBuffer::apply_layer_cooldown( fan_speed_change_requests[CoolingLine::TYPE_IRONING_FAN_START] = true; need_set_fan = true; } - } else if (line->type & CoolingLine::TYPE_IRONING_FAN_END && fan_speed_change_requests[CoolingLine::TYPE_IRONING_FAN_START]) { - if (ironing_fan_control) { + } else if (line->type & CoolingLine::TYPE_IRONING_FAN_END) { + if (ironing_fan_control && fan_speed_change_requests[CoolingLine::TYPE_IRONING_FAN_START]) { fan_speed_change_requests[CoolingLine::TYPE_IRONING_FAN_START] = false; } need_set_fan = true; diff --git a/src/libslic3r/GCode/PressureEqualizer.cpp b/src/libslic3r/GCode/PressureEqualizer.cpp index 2d15f64340..3db54ca2af 100644 --- a/src/libslic3r/GCode/PressureEqualizer.cpp +++ b/src/libslic3r/GCode/PressureEqualizer.cpp @@ -541,10 +541,17 @@ void PressureEqualizer::output_gcode_line(const size_t line_idx) // We don't have enough time to accel to max possible extrusion rate // now we calculate the actual possible value target_max_extrusion_rate = std::sqrt((2 * max_sloped_extrusion * sp * sn + sn * e0_2 + sp * e1_2) / (sp + sn)); + + // Worst case: we don't have enough time to do an accl-steady-decel movement at all, fallback to the old fashion + // single slope mode + if (target_max_extrusion_rate <= line.volumetric_extrusion_rate_start || + target_max_extrusion_rate <= line.volumetric_extrusion_rate_end) { + goto single_slope_fallback; // TODO: FIXIT: better way than a goto? + } } assert(target_max_extrusion_rate > line.volumetric_extrusion_rate_start); assert(target_max_extrusion_rate > line.volumetric_extrusion_rate_end); - assert(target_max_extrusion_rate >= line.volumetric_extrusion_rate); + assert(target_max_extrusion_rate <= line.volumetric_extrusion_rate); // if the extrusion rate change is trivial, then ignore this algorithm and use the single sloped version instead delta_volumetric_rate = std::round(std::min({ // important! it's MIN here not max! @@ -626,7 +633,7 @@ void PressureEqualizer::output_gcode_line(const size_t line_idx) return; } } - +single_slope_fallback: bool accelerating = line.volumetric_extrusion_rate_start < line.volumetric_extrusion_rate_end; float feed_avg = 0.5f * (line.pos_start[4] + line.pos_end[4]); // Limiting volumetric extrusion rate slope for this segment.