mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 19:33:47 +00:00
Revert "Fix wipe tower loaded outside of plate boundaries (#12191)"
This reverts commit e14e186bb7.
This commit is contained in:
@@ -38,7 +38,6 @@
|
|||||||
#include "slic3r/Utils/UndoRedo.hpp"
|
#include "slic3r/Utils/UndoRedo.hpp"
|
||||||
#include "slic3r/Utils/MacDarkMode.hpp"
|
#include "slic3r/Utils/MacDarkMode.hpp"
|
||||||
|
|
||||||
#include <libslic3r/BoundingBox.hpp>
|
|
||||||
#include <slic3r/GUI/GUI_Utils.hpp>
|
#include <slic3r/GUI/GUI_Utils.hpp>
|
||||||
|
|
||||||
#if ENABLE_RETINA_GL
|
#if ENABLE_RETINA_GL
|
||||||
@@ -2837,7 +2836,6 @@ void GLCanvas3D::reload_scene(bool refresh_immediately, bool force_full_scene_re
|
|||||||
float y = dynamic_cast<const ConfigOptionFloats*>(proj_cfg.option("wipe_tower_y"))->get_at(plate_id);
|
float y = dynamic_cast<const ConfigOptionFloats*>(proj_cfg.option("wipe_tower_y"))->get_at(plate_id);
|
||||||
float w = dynamic_cast<const ConfigOptionFloat*>(m_config->option("prime_tower_width"))->value;
|
float w = dynamic_cast<const ConfigOptionFloat*>(m_config->option("prime_tower_width"))->value;
|
||||||
float a = dynamic_cast<const ConfigOptionFloat*>(proj_cfg.option("wipe_tower_rotation_angle"))->value;
|
float a = dynamic_cast<const ConfigOptionFloat*>(proj_cfg.option("wipe_tower_rotation_angle"))->value;
|
||||||
|
|
||||||
// BBS
|
// BBS
|
||||||
float v = dynamic_cast<const ConfigOptionFloat*>(m_config->option("prime_volume"))->value;
|
float v = dynamic_cast<const ConfigOptionFloat*>(m_config->option("prime_volume"))->value;
|
||||||
Vec3d plate_origin = ppl.get_plate(plate_id)->get_origin();
|
Vec3d plate_origin = ppl.get_plate(plate_id)->get_origin();
|
||||||
@@ -2864,29 +2862,9 @@ void GLCanvas3D::reload_scene(bool refresh_immediately, bool force_full_scene_re
|
|||||||
}
|
}
|
||||||
|
|
||||||
coordf_t plate_bbox_x_min_local_coord = plate_bbox_2d.min(0) - plate_origin(0);
|
coordf_t plate_bbox_x_min_local_coord = plate_bbox_2d.min(0) - plate_origin(0);
|
||||||
coordf_t plate_bbox_y_min_local_coord = plate_bbox_2d.min(1) - plate_origin(1);
|
|
||||||
coordf_t plate_bbox_x_max_local_coord = plate_bbox_2d.max(0) - plate_origin(0);
|
coordf_t plate_bbox_x_max_local_coord = plate_bbox_2d.max(0) - plate_origin(0);
|
||||||
coordf_t plate_bbox_y_max_local_coord = plate_bbox_2d.max(1) - plate_origin(1);
|
coordf_t plate_bbox_y_max_local_coord = plate_bbox_2d.max(1) - plate_origin(1);
|
||||||
|
|
||||||
const float tower_w = (float) wipe_tower_size(0);
|
|
||||||
const float tower_h = (float) wipe_tower_size(1);
|
|
||||||
const float min_x = (float) plate_bbox_x_min_local_coord + margin;
|
|
||||||
const float max_x = (float) plate_bbox_x_max_local_coord - margin;
|
|
||||||
const float min_y = (float) plate_bbox_y_min_local_coord + margin;
|
|
||||||
const float max_y = (float) plate_bbox_y_max_local_coord - margin;
|
|
||||||
|
|
||||||
// snap wipe tower back to nearest edge if it was initially loaded outside the plate boundary
|
|
||||||
float new_x = (x < min_x) ? min_x : ((x + tower_w > max_x) ? (max_x - tower_w) : x);
|
|
||||||
float new_y = (y < min_y) ? min_y : ((y + tower_h > max_y) ? (max_y - tower_h) : y);
|
|
||||||
|
|
||||||
if (new_x != x || new_y != y) {
|
|
||||||
// do notification
|
|
||||||
_set_warning_notification(EWarning::PreviewPrimeTowerOutside, true);
|
|
||||||
x = new_x;
|
|
||||||
y = new_y;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (!current_print->is_step_done(psWipeTower) || !current_print->wipe_tower_data().wipe_tower_mesh_data) {
|
if (!current_print->is_step_done(psWipeTower) || !current_print->wipe_tower_data().wipe_tower_mesh_data) {
|
||||||
// update for wipe tower position
|
// update for wipe tower position
|
||||||
{
|
{
|
||||||
@@ -9665,9 +9643,6 @@ void GLCanvas3D::_set_warning_notification(EWarning warning, bool state)
|
|||||||
case EWarning::PrimeTowerOutside:
|
case EWarning::PrimeTowerOutside:
|
||||||
text = _u8L("The prime tower extends beyond the plate boundary.");
|
text = _u8L("The prime tower extends beyond the plate boundary.");
|
||||||
break;
|
break;
|
||||||
case EWarning::PreviewPrimeTowerOutside:
|
|
||||||
text = _u8L("Prime tower position exceeded build plate boundaries and was repositioned to the nearest valid edge.");
|
|
||||||
break;
|
|
||||||
case EWarning::NozzleFilamentIncompatible: {
|
case EWarning::NozzleFilamentIncompatible: {
|
||||||
text = _u8L(get_nozzle_filament_incompatible_text());
|
text = _u8L(get_nozzle_filament_incompatible_text());
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -381,14 +381,13 @@ class GLCanvas3D
|
|||||||
ToolHeightOutside,
|
ToolHeightOutside,
|
||||||
TPUPrintableError,
|
TPUPrintableError,
|
||||||
FilamentPrintableError,
|
FilamentPrintableError,
|
||||||
LeftExtruderPrintableError, // before slice
|
LeftExtruderPrintableError, // before slice
|
||||||
RightExtruderPrintableError, // before slice
|
RightExtruderPrintableError, // before slice
|
||||||
MultiExtruderPrintableError, // after slice
|
MultiExtruderPrintableError, // after slice
|
||||||
MultiExtruderHeightOutside, // after slice
|
MultiExtruderHeightOutside, // after slice
|
||||||
FilamentUnPrintableOnFirstLayer,
|
FilamentUnPrintableOnFirstLayer,
|
||||||
MixUsePLAAndPETG,
|
MixUsePLAAndPETG,
|
||||||
PrimeTowerOutside, // after slice
|
PrimeTowerOutside,
|
||||||
PreviewPrimeTowerOutside, // before slice
|
|
||||||
NozzleFilamentIncompatible,
|
NozzleFilamentIncompatible,
|
||||||
MixtureFilamentIncompatible,
|
MixtureFilamentIncompatible,
|
||||||
FlushingVolumeZero
|
FlushingVolumeZero
|
||||||
|
|||||||
Reference in New Issue
Block a user