mirror of
https://github.com/QIDITECH/QIDISlicer.git
synced 2026-02-03 09:28:44 +03:00
Merge prusa 2.6.1
This commit is contained in:
@@ -19,6 +19,9 @@
|
||||
#include "SceneRaycaster.hpp"
|
||||
#include "GUI_Utils.hpp"
|
||||
|
||||
#include "libslic3r/Arrange/ArrangeSettingsDb_AppCfg.hpp"
|
||||
#include "ArrangeSettingsDialogImgui.hpp"
|
||||
|
||||
#include "libslic3r/Slicing.hpp"
|
||||
|
||||
#include <float.h>
|
||||
@@ -469,6 +472,8 @@ public:
|
||||
float accuracy = 0.65f; // Unused currently
|
||||
bool enable_rotation = false;
|
||||
int alignment = 0;
|
||||
int geometry_handling = 0;
|
||||
int strategy = 0;
|
||||
};
|
||||
|
||||
enum class ESLAViewType
|
||||
@@ -584,44 +589,12 @@ private:
|
||||
SLAView m_sla_view;
|
||||
bool m_sla_view_type_detection_active{ false };
|
||||
|
||||
ArrangeSettings m_arrange_settings_fff, m_arrange_settings_sla,
|
||||
m_arrange_settings_fff_seq_print;
|
||||
|
||||
bool is_arrange_alignment_enabled() const;
|
||||
|
||||
template<class Self>
|
||||
static auto & get_arrange_settings_ref(Self *self) {
|
||||
PrinterTechnology ptech = self->current_printer_technology();
|
||||
|
||||
auto *ptr = &self->m_arrange_settings_fff;
|
||||
|
||||
if (ptech == ptSLA) {
|
||||
ptr = &self->m_arrange_settings_sla;
|
||||
} else if (ptech == ptFFF) {
|
||||
auto co_opt = self->m_config->template option<ConfigOptionBool>("complete_objects");
|
||||
if (co_opt && co_opt->value)
|
||||
ptr = &self->m_arrange_settings_fff_seq_print;
|
||||
else
|
||||
ptr = &self->m_arrange_settings_fff;
|
||||
}
|
||||
|
||||
return *ptr;
|
||||
}
|
||||
ArrangeSettingsDb_AppCfg m_arrange_settings_db;
|
||||
ArrangeSettingsDialogImgui m_arrange_settings_dialog;
|
||||
|
||||
public:
|
||||
ArrangeSettings get_arrange_settings() const {
|
||||
const ArrangeSettings &settings = get_arrange_settings_ref(this);
|
||||
ArrangeSettings ret = settings;
|
||||
if (&settings == &m_arrange_settings_fff_seq_print) {
|
||||
ret.distance = std::max(ret.distance,
|
||||
float(min_object_distance(*m_config)));
|
||||
}
|
||||
|
||||
if (!is_arrange_alignment_enabled())
|
||||
ret.alignment = -1;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
struct ContoursList
|
||||
{
|
||||
@@ -634,7 +607,6 @@ public:
|
||||
};
|
||||
|
||||
private:
|
||||
void load_arrange_settings();
|
||||
|
||||
class SequentialPrintClearance
|
||||
{
|
||||
@@ -742,10 +714,15 @@ public:
|
||||
const GLVolumeCollection& get_volumes() const { return m_volumes; }
|
||||
void reset_volumes();
|
||||
ModelInstanceEPrintVolumeState check_volumes_outside_state(bool selection_only = true) const;
|
||||
// update the is_outside state of all the volumes contained in the given collection
|
||||
void check_volumes_outside_state(GLVolumeCollection& volumes) const;
|
||||
|
||||
private:
|
||||
// returns true if all the volumes are completely contained in the print volume
|
||||
// returns the containment state in the given out_state, if non-null
|
||||
bool check_volumes_outside_state(const Slic3r::BuildVolume& build_volume, ModelInstanceEPrintVolumeState* out_state, bool selection_only = true) const;
|
||||
bool check_volumes_outside_state(GLVolumeCollection& volumes, ModelInstanceEPrintVolumeState* out_state, bool selection_only = true) const;
|
||||
|
||||
public:
|
||||
void init_gcode_viewer() { m_gcode_viewer.init(); }
|
||||
void reset_gcode_toolpaths() { m_gcode_viewer.reset(); }
|
||||
const GCodeViewer::SequentialView& get_gcode_sequential_view() const { return m_gcode_viewer.get_sequential_view(); }
|
||||
@@ -757,10 +734,13 @@ public:
|
||||
void update_instance_printable_state_for_objects(const std::vector<size_t>& object_idxs);
|
||||
|
||||
void set_config(const DynamicPrintConfig* config);
|
||||
const DynamicPrintConfig *config() const { return m_config; }
|
||||
void set_process(BackgroundSlicingProcess* process);
|
||||
void set_model(Model* model);
|
||||
const Model* get_model() const { return m_model; }
|
||||
|
||||
const arr2::ArrangeSettingsView * get_arrange_settings_view() const { return &m_arrange_settings_dialog; }
|
||||
|
||||
const Selection& get_selection() const { return m_selection; }
|
||||
Selection& get_selection() { return m_selection; }
|
||||
|
||||
@@ -857,6 +837,7 @@ public:
|
||||
|
||||
void reload_scene(bool refresh_immediately, bool force_full_scene_refresh = false);
|
||||
|
||||
void load_gcode_shells();
|
||||
void load_gcode_preview(const GCodeProcessorResult& gcode_result, const std::vector<std::string>& str_tool_colors);
|
||||
void refresh_gcode_preview_render_paths(bool keep_sequential_current_first, bool keep_sequential_current_last);
|
||||
void set_gcode_view_preview_type(GCodeViewer::EViewType type) { return m_gcode_viewer.set_view_type(type); }
|
||||
@@ -922,8 +903,11 @@ public:
|
||||
inline const Vec2d& pos() const { return m_pos; }
|
||||
inline double rotation() const { return m_rotation; }
|
||||
inline const Vec2d bb_size() const { return m_bb.size(); }
|
||||
inline const BoundingBoxf& bounding_box() const { return m_bb; }
|
||||
|
||||
void apply_wipe_tower() const;
|
||||
|
||||
static void apply_wipe_tower(Vec2d pos, double rot);
|
||||
};
|
||||
|
||||
WipeTowerInfo get_wipe_tower_info() const;
|
||||
|
||||
Reference in New Issue
Block a user