mirror of
https://git.mirrors.martin98.com/https://github.com/bambulab/BambuStudio.git
synced 2025-09-28 11:53:15 +08:00
FIX: the wipe tower out of bounds prompt is incorrect when there are multiple plates,
jira: STUDIO-11817 Change-Id: Ie0b9ac36d568f6d4d6cd134056e4d850612c1961
This commit is contained in:
parent
bbcda3bbba
commit
5f624b7248
@ -1884,10 +1884,13 @@ void GLVolumeCollection::only_render_sinking(GUI::ERenderPipelineStage
|
|||||||
glsafe(::glDisable(GL_BLEND));
|
glsafe(::glDisable(GL_BLEND));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GLVolumeCollection::check_wipe_tower_outside_state(const Slic3r::BuildVolume &build_volume) const
|
bool GLVolumeCollection::check_wipe_tower_outside_state(const Slic3r::BuildVolume &build_volume, int plate_id) const
|
||||||
{
|
{
|
||||||
for (GLVolume *volume : this->volumes) {
|
for (GLVolume *volume : this->volumes) {
|
||||||
if (volume->is_wipe_tower) {
|
if (volume->is_wipe_tower) {
|
||||||
|
int wipe_tower_plate_id = volume->composite_id.object_id - 1000;
|
||||||
|
if (wipe_tower_plate_id != plate_id)
|
||||||
|
continue;
|
||||||
const std::vector<Vec2d>& printable_area = build_volume.printable_area();
|
const std::vector<Vec2d>& printable_area = build_volume.printable_area();
|
||||||
Polygon printable_poly = Polygon::new_scale(printable_area);
|
Polygon printable_poly = Polygon::new_scale(printable_area);
|
||||||
|
|
||||||
|
@ -798,7 +798,7 @@ public:
|
|||||||
// returns the containment state in the given out_state, if non-null
|
// returns the containment state in the given out_state, if non-null
|
||||||
bool check_outside_state(const Slic3r::BuildVolume& build_volume, ModelInstanceEPrintVolumeState* out_state, ObjectFilamentResults* object_results,Model& model) const;
|
bool check_outside_state(const Slic3r::BuildVolume& build_volume, ModelInstanceEPrintVolumeState* out_state, ObjectFilamentResults* object_results,Model& model) const;
|
||||||
void reset_outside_state();
|
void reset_outside_state();
|
||||||
bool check_wipe_tower_outside_state(const Slic3r::BuildVolume &build_volume) const;
|
bool check_wipe_tower_outside_state(const Slic3r::BuildVolume &build_volume, int plate_id) const;
|
||||||
|
|
||||||
void update_colors_by_extruder(const DynamicPrintConfig *config, bool is_update_alpha = true);
|
void update_colors_by_extruder(const DynamicPrintConfig *config, bool is_update_alpha = true);
|
||||||
|
|
||||||
|
@ -3260,8 +3260,9 @@ void GLCanvas3D::reload_scene(bool refresh_immediately, bool force_full_scene_re
|
|||||||
const bool fullyOut = (state == ModelInstanceEPrintVolumeState::ModelInstancePVS_Fully_Outside);
|
const bool fullyOut = (state == ModelInstanceEPrintVolumeState::ModelInstancePVS_Fully_Outside);
|
||||||
// const bool objectLimited = (state == ModelInstanceEPrintVolumeState::ModelInstancePVS_Limited);
|
// const bool objectLimited = (state == ModelInstanceEPrintVolumeState::ModelInstancePVS_Limited);
|
||||||
|
|
||||||
bool show_read_wipe_tower = wxGetApp().plater()->get_partplate_list().get_selected_plate()->fff_print()->is_step_done(psWipeTower);
|
PartPlate *cur_plate = wxGetApp().plater()->get_partplate_list().get_curr_plate();
|
||||||
bool wipe_tower_outside = m_volumes.check_wipe_tower_outside_state(m_bed.build_volume());
|
bool show_read_wipe_tower = cur_plate->fff_print()->is_step_done(psWipeTower);
|
||||||
|
bool wipe_tower_outside = m_volumes.check_wipe_tower_outside_state(m_bed.build_volume(), wxGetApp().plater()->get_partplate_list().get_curr_plate_index());
|
||||||
bool show_wipe_tower_outside_error = show_read_wipe_tower ? !wipe_tower_outside : false;
|
bool show_wipe_tower_outside_error = show_read_wipe_tower ? !wipe_tower_outside : false;
|
||||||
_set_warning_notification(EWarning::PrimeTowerOutside, show_wipe_tower_outside_error);
|
_set_warning_notification(EWarning::PrimeTowerOutside, show_wipe_tower_outside_error);
|
||||||
|
|
||||||
@ -3277,7 +3278,6 @@ void GLCanvas3D::reload_scene(bool refresh_immediately, bool force_full_scene_re
|
|||||||
//if (printer_technology != ptSLA || !contained_min_one)
|
//if (printer_technology != ptSLA || !contained_min_one)
|
||||||
// _set_warning_notification(EWarning::SlaSupportsOutside, false);
|
// _set_warning_notification(EWarning::SlaSupportsOutside, false);
|
||||||
|
|
||||||
PartPlate* cur_plate = wxGetApp().plater()->get_partplate_list().get_curr_plate();
|
|
||||||
bool tpu_valid = cur_plate->check_tpu_printable_status(wxGetApp().preset_bundle->full_config(), wxGetApp().preset_bundle->get_used_tpu_filaments(cur_plate->get_extruders(true)));
|
bool tpu_valid = cur_plate->check_tpu_printable_status(wxGetApp().preset_bundle->full_config(), wxGetApp().preset_bundle->get_used_tpu_filaments(cur_plate->get_extruders(true)));
|
||||||
_set_warning_notification(EWarning::TPUPrintableError, !tpu_valid);
|
_set_warning_notification(EWarning::TPUPrintableError, !tpu_valid);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user