mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-22 04:35:17 +00:00
Compare commits
1 Commits
fix/linux-
...
fix/remove
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f179df525d |
@@ -357,29 +357,9 @@ cat << EOF >@SLIC3R_APP_CMD@
|
|||||||
DIR=\$(dirname "\$(readlink -f "\$0")")
|
DIR=\$(dirname "\$(readlink -f "\$0")")
|
||||||
export APPDIR="\${APPDIR:-\$DIR}"
|
export APPDIR="\${APPDIR:-\$DIR}"
|
||||||
|
|
||||||
# FIXME: OrcaSlicer segfault workarounds
|
# OrcaSlicer may segfault on systems where locale info is not as expected (i.e. Holo-ISO arch-based distro)
|
||||||
# 1) OrcaSlicer will segfault on systems where locale info is not as expected (i.e. Holo-ISO arch-based distro)
|
|
||||||
export LC_ALL=C
|
export LC_ALL=C
|
||||||
|
|
||||||
if [ "\$XDG_SESSION_TYPE" = "wayland" ] && [ "\$ZINK_DISABLE_OVERRIDE" != "1" ]; then
|
|
||||||
if command -v glxinfo >/dev/null 2>&1; then
|
|
||||||
RENDERER=\$(glxinfo | grep "OpenGL renderer string:" | sed 's/.*: //')
|
|
||||||
if echo "\$RENDERER" | grep -qi "NVIDIA"; then
|
|
||||||
if command -v nvidia-smi >/dev/null 2>&1; then
|
|
||||||
DRIVER_VERSION=\$(nvidia-smi --query-gpu=driver_version --format=csv,noheader | head -n1)
|
|
||||||
DRIVER_MAJOR=\$(echo "\$DRIVER_VERSION" | cut -d. -f1)
|
|
||||||
[ "\$DRIVER_MAJOR" -gt 555 ] && ZINK_FORCE_OVERRIDE=1
|
|
||||||
fi
|
|
||||||
if [ "\$ZINK_FORCE_OVERRIDE" = "1" ]; then
|
|
||||||
export __GLX_VENDOR_LIBRARY_NAME=mesa
|
|
||||||
export __EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/50_mesa.json
|
|
||||||
export MESA_LOADER_DRIVER_OVERRIDE=zink
|
|
||||||
export GALLIUM_DRIVER=zink
|
|
||||||
export WEBKIT_DISABLE_DMABUF_RENDERER=1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
exec "\$DIR/libexec/@SLIC3R_APP_CMD@-env" "\$DIR/bin/@SLIC3R_APP_CMD@" "\$@"
|
exec "\$DIR/libexec/@SLIC3R_APP_CMD@-env" "\$DIR/bin/@SLIC3R_APP_CMD@" "\$@"
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|||||||
@@ -1754,11 +1754,7 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
|
|||||||
};
|
};
|
||||||
std::string warning_key;
|
std::string warning_key;
|
||||||
|
|
||||||
const auto max_junction_deviation = m_config.machine_max_junction_deviation.values[0];
|
|
||||||
const bool ignore_jerk_validation = m_config.gcode_flavor == gcfMarlinFirmware && max_junction_deviation > 0;
|
|
||||||
|
|
||||||
// check jerk
|
// check jerk
|
||||||
if (!ignore_jerk_validation) {
|
|
||||||
if (m_default_object_config.default_jerk == 1 || m_default_object_config.outer_wall_jerk == 1 ||
|
if (m_default_object_config.default_jerk == 1 || m_default_object_config.outer_wall_jerk == 1 ||
|
||||||
m_default_object_config.inner_wall_jerk == 1) {
|
m_default_object_config.inner_wall_jerk == 1) {
|
||||||
warning->string = L("Setting the jerk speed too low could lead to artifacts on curved surfaces");
|
warning->string = L("Setting the jerk speed too low could lead to artifacts on curved surfaces");
|
||||||
@@ -1777,24 +1773,27 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
|
|||||||
"top_surface_jerk", "initial_layer_jerk", "travel_jerk"};
|
"top_surface_jerk", "initial_layer_jerk", "travel_jerk"};
|
||||||
const auto max_jerk = std::min(m_config.machine_max_jerk_x.values[0], m_config.machine_max_jerk_y.values[0]);
|
const auto max_jerk = std::min(m_config.machine_max_jerk_x.values[0], m_config.machine_max_jerk_y.values[0]);
|
||||||
warning_key.clear();
|
warning_key.clear();
|
||||||
|
if (m_default_object_config.default_jerk > 0)
|
||||||
warning_key = check_motion_ability_object_setting(jerk_to_check, max_jerk);
|
warning_key = check_motion_ability_object_setting(jerk_to_check, max_jerk);
|
||||||
if (!warning_key.empty()) {
|
if (!warning_key.empty()) {
|
||||||
warning->string = L(
|
warning->string = L(
|
||||||
"The jerk setting exceeds the printer's maximum jerk (machine_max_jerk_x/machine_max_jerk_y).\n"
|
"The jerk setting exceeds the printer's maximum jerk (machine_max_jerk_x/machine_max_jerk_y).\nOrca will "
|
||||||
"Orca will automatically cap the jerk speed to ensure it doesn't surpass the printer's capabilities.\n"
|
"automatically cap the jerk speed to ensure it doesn't surpass the printer's capabilities.\nYou can adjust the "
|
||||||
"You can adjust the maximum jerk setting in your printer's configuration to get higher speeds.");
|
"maximum jerk setting in your printer's configuration to get higher speeds.");
|
||||||
warning->opt_key = warning_key;
|
warning->opt_key = warning_key;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Check junction deviation
|
// Check junction deviation
|
||||||
|
const auto max_junction_deviation = m_config.machine_max_junction_deviation.values[0];
|
||||||
// Orca: Only marlin FW supports max junction deviation. Dont display warning if firmware is not supporting it.
|
// Orca: Only marlin FW supports max junction deviation. Dont display warning if firmware is not supporting it.
|
||||||
const bool support_max_junction_deviation = ( m_config.gcode_flavor == gcfMarlinFirmware);
|
const bool support_max_junction_deviation = ( m_config.gcode_flavor == gcfMarlinFirmware);
|
||||||
if (warning_key.empty() && m_default_object_config.default_junction_deviation.value > max_junction_deviation && support_max_junction_deviation) {
|
if (warning_key.empty() && m_default_object_config.default_junction_deviation.value > max_junction_deviation && support_max_junction_deviation) {
|
||||||
warning->string = L( "Junction deviation setting exceeds the printer's maximum value (machine_max_junction_deviation).\n"
|
warning->string = L( "Junction deviation setting exceeds the printer's maximum value "
|
||||||
"Orca will automatically cap the junction deviation to ensure it doesn't surpass the printer's capabilities.\n"
|
"(machine_max_junction_deviation).\nOrca will "
|
||||||
"You can adjust the machine_max_junction_deviation value in your printer's configuration to get higher limits.");
|
"automatically cap the junction deviation to ensure it doesn't surpass the printer's "
|
||||||
|
"capabilities.\nYou can adjust the "
|
||||||
|
"machine_max_junction_deviation value in your printer's configuration to get higher limits.");
|
||||||
warning->opt_key = warning_key;
|
warning->opt_key = warning_key;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -786,20 +786,9 @@ void GUI_App::post_init()
|
|||||||
mainframe->select_tab(size_t(MainFrame::tp3DEditor));
|
mainframe->select_tab(size_t(MainFrame::tp3DEditor));
|
||||||
plater_->select_view_3D("3D");
|
plater_->select_view_3D("3D");
|
||||||
//BBS init the opengl resource here
|
//BBS init the opengl resource here
|
||||||
if (!plater_->canvas3D()->get_wxglcanvas()->IsShownOnScreen() ||
|
//#ifdef __linux__
|
||||||
!plater_->canvas3D()->make_current_for_postinit()) {
|
if (plater_->canvas3D()->get_wxglcanvas()->IsShownOnScreen()&&plater_->canvas3D()->make_current_for_postinit()) {
|
||||||
BOOST_LOG_TRIVIAL(warning) << __FUNCTION__ << ": glcontext not ready, postpone init";
|
//#endif
|
||||||
plater_->canvas3D()->enable_render(true);
|
|
||||||
plater_->canvas3D()->set_as_dirty();
|
|
||||||
#ifdef __linux__
|
|
||||||
// Wayland/EGL may not have committed the GL surface yet; ask the
|
|
||||||
// idle loop to retry post_init when the canvas is actually mapped.
|
|
||||||
// Without this, GL function pointers stay null and the first
|
|
||||||
// Preview focus crashes in Camera::apply_viewport.
|
|
||||||
m_post_initialized = false;
|
|
||||||
return;
|
|
||||||
#endif
|
|
||||||
} else {
|
|
||||||
Size canvas_size = plater_->canvas3D()->get_canvas_size();
|
Size canvas_size = plater_->canvas3D()->get_canvas_size();
|
||||||
wxGetApp().imgui()->set_display_size(static_cast<float>(canvas_size.get_width()), static_cast<float>(canvas_size.get_height()));
|
wxGetApp().imgui()->set_display_size(static_cast<float>(canvas_size.get_width()), static_cast<float>(canvas_size.get_height()));
|
||||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ", start to init opengl";
|
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ", start to init opengl";
|
||||||
@@ -819,7 +808,14 @@ void GUI_App::post_init()
|
|||||||
plater_->canvas3D()->render(false);
|
plater_->canvas3D()->render(false);
|
||||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ", finished rendering a first frame for test";
|
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ", finished rendering a first frame for test";
|
||||||
}
|
}
|
||||||
|
//#ifdef __linux__
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
BOOST_LOG_TRIVIAL(warning) << __FUNCTION__ << "Found glcontext not ready, postpone the init";
|
||||||
|
plater_->canvas3D()->enable_render(true);
|
||||||
|
plater_->canvas3D()->set_as_dirty();
|
||||||
|
}
|
||||||
|
//#endif
|
||||||
if (is_editor())
|
if (is_editor())
|
||||||
mainframe->select_tab(size_t(0));
|
mainframe->select_tab(size_t(0));
|
||||||
if (app_config->get("default_page") == "1")
|
if (app_config->get("default_page") == "1")
|
||||||
|
|||||||
Reference in New Issue
Block a user