mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
Merge branch 'master' into lm_fdm_custom_supports_polishing
This commit is contained in:
commit
b046eb4fc9
42 changed files with 919 additions and 1200 deletions
|
@ -16,9 +16,6 @@
|
|||
#include "GUI_ObjectLayers.hpp"
|
||||
#include "GLSelectionRectangle.hpp"
|
||||
#include "MeshUtils.hpp"
|
||||
#if !ENABLE_NON_STATIC_CANVAS_MANAGER
|
||||
#include "Camera.hpp"
|
||||
#endif // !ENABLE_NON_STATIC_CANVAS_MANAGER
|
||||
|
||||
#include <float.h>
|
||||
|
||||
|
@ -31,9 +28,7 @@ class wxMouseEvent;
|
|||
class wxTimerEvent;
|
||||
class wxPaintEvent;
|
||||
class wxGLCanvas;
|
||||
#if ENABLE_NON_STATIC_CANVAS_MANAGER
|
||||
class wxGLContext;
|
||||
#endif // ENABLE_NON_STATIC_CANVAS_MANAGER
|
||||
|
||||
// Support for Retina OpenGL on Mac OS
|
||||
#define ENABLE_RETINA_GL __APPLE__
|
||||
|
@ -451,11 +446,6 @@ private:
|
|||
LegendTexture m_legend_texture;
|
||||
WarningTexture m_warning_texture;
|
||||
wxTimer m_timer;
|
||||
#if !ENABLE_NON_STATIC_CANVAS_MANAGER
|
||||
Bed3D& m_bed;
|
||||
Camera& m_camera;
|
||||
GLToolbar& m_view_toolbar;
|
||||
#endif // !ENABLE_NON_STATIC_CANVAS_MANAGER
|
||||
LayersEditing m_layers_editing;
|
||||
Shader m_shader;
|
||||
Mouse m_mouse;
|
||||
|
@ -518,22 +508,17 @@ private:
|
|||
Labels m_labels;
|
||||
#if ENABLE_CANVAS_TOOLTIP_USING_IMGUI
|
||||
mutable Tooltip m_tooltip;
|
||||
mutable bool m_tooltip_enabled{ true };
|
||||
#endif // ENABLE_CANVAS_TOOLTIP_USING_IMGUI
|
||||
#if ENABLE_SLOPE_RENDERING
|
||||
Slope m_slope;
|
||||
#endif // ENABLE_SLOPE_RENDERING
|
||||
|
||||
public:
|
||||
#if ENABLE_NON_STATIC_CANVAS_MANAGER
|
||||
explicit GLCanvas3D(wxGLCanvas* canvas);
|
||||
#else
|
||||
GLCanvas3D(wxGLCanvas* canvas, Bed3D& bed, Camera& camera, GLToolbar& view_toolbar);
|
||||
#endif // ENABLE_NON_STATIC_CANVAS_MANAGER
|
||||
~GLCanvas3D();
|
||||
|
||||
#if ENABLE_NON_STATIC_CANVAS_MANAGER
|
||||
bool is_initialized() const { return m_initialized; }
|
||||
#endif // ENABLE_NON_STATIC_CANVAS_MANAGER
|
||||
|
||||
void set_context(wxGLContext* context) { m_context = context; }
|
||||
|
||||
|
@ -581,13 +566,7 @@ public:
|
|||
|
||||
void set_color_by(const std::string& value);
|
||||
|
||||
#if ENABLE_NON_STATIC_CANVAS_MANAGER
|
||||
void refresh_camera_scene_box();
|
||||
#else
|
||||
void refresh_camera_scene_box() { m_camera.set_scene_box(scene_bounding_box()); }
|
||||
const Camera& get_camera() const { return m_camera; }
|
||||
Camera& get_camera() { return m_camera; }
|
||||
#endif // ENABLE_NON_STATIC_CANVAS_MANAGER
|
||||
const Shader& get_shader() const { return m_shader; }
|
||||
|
||||
BoundingBoxf3 volumes_bounding_box() const;
|
||||
|
@ -661,6 +640,9 @@ public:
|
|||
void on_timer(wxTimerEvent& evt);
|
||||
void on_mouse(wxMouseEvent& evt);
|
||||
void on_paint(wxPaintEvent& evt);
|
||||
#if ENABLE_CANVAS_TOOLTIP_USING_IMGUI
|
||||
void on_set_focus(wxFocusEvent& evt);
|
||||
#endif // ENABLE_CANVAS_TOOLTIP_USING_IMGUI
|
||||
|
||||
Size get_canvas_size() const;
|
||||
Vec2d get_local_mouse_position() const;
|
||||
|
@ -684,10 +666,6 @@ public:
|
|||
|
||||
void update_ui_from_settings();
|
||||
|
||||
#if !ENABLE_NON_STATIC_CANVAS_MANAGER
|
||||
float get_view_toolbar_height() const { return m_view_toolbar.get_height(); }
|
||||
#endif // !ENABLE_NON_STATIC_CANVAS_MANAGER
|
||||
|
||||
int get_move_volume_id() const { return m_mouse.drag.move_volume_idx; }
|
||||
int get_first_hover_volume_idx() const { return m_hover_volume_idxs.empty() ? -1 : m_hover_volume_idxs.front(); }
|
||||
void set_selected_extruder(int extruder) { m_selected_extruder = extruder;}
|
||||
|
@ -730,6 +708,7 @@ public:
|
|||
int get_main_toolbar_item_id(const std::string& name) const { return m_main_toolbar.get_item_id(name); }
|
||||
void force_main_toolbar_left_action(int item_id) { m_main_toolbar.force_left_action(item_id, *this); }
|
||||
void force_main_toolbar_right_action(int item_id) { m_main_toolbar.force_right_action(item_id, *this); }
|
||||
void update_tooltip_for_settings_item_in_main_toolbar();
|
||||
|
||||
bool has_toolpaths_to_export() const;
|
||||
void export_toolpaths_to_obj(const char* filename) const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue