mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-13 03:57:34 +00:00
Port libvgcode from PrusaSlicer 2.8.0
Includes (but is not limited to) the following commits: SPE-2218 - libvgcode - Fixed color of wipe moves for speed range view SPE-2218 - libvgcode - Fixed detection of fan speed range SPE-2218 - libvgcode - Fixed detection of temperature range SPE-2218 - libvgcode - Fixed colors for Actual volumetric flow rate view SPE-2214 - Fixed detection of toolpaths bounding box in GCodeViewer SPE-2206 - Modified LibBGCode.cmake to get latest version of libbgcode which fixed parsing of gcode lines G4 libvgcode - Fixed potential out of bound access in ViewerImpl::update_view_full_range() Tech ENABLE_GL_CORE_PROFILE set as default Tech ENABLE_OPENGL_ES replaced by build option SLIC3R_OPENGL_ES libvgcode - Precompiler definition of ENABLE_OPENGL_ES moved into CMakeLists.txt Added missing include libvgcode - Textures setup modified to work when building using emscripten libvgcode - small optimization libvgcode - fixed OpenGLWrapper::unload_opengl() libvgcode - CMakeLists.txt modified to work with emscripten libvgcode - Replace 'glVertexAttribIPointer()' with 'glVertexAttribPointer()' in SegmentTemplate::init() for OpenGL ES libvgcode - Replace 'xor' with '^' Bitset.hpp libvgcode - Newer glad library for OpenGL 4.6 and OpenGL ES 3.0 libvgcode - Alternate fix in method ViewerImpl::update_heights_widths() for OpenGL ES libvgcode - Fixes in glAssertRecentCallImpl() libvgcode - Fixes in method ViewerImpl::update_heights_widths() for OpenGL ES Fixed ES shaders so they work with OpenGL ES 3.0 libvgcode - Use multiple plain textures in place of texture buffers for OpenGL ES libvgcode - Use plain textures in place of texture buffers for OpenGL ES (partial implementation using one texture per buffer) libvgcode - refactoring of class OpenGLWrapper libvgcode - small refactoring in shaders libvgcode - replacement of glMapBuffer() call for OpenGL ES Fixed warning libvgcode - Changes into CMakeLists.txt Fixed debug export of gcode data to be configuration indipendent Disabled tech ENABLE_NEW_GCODE_VIEWER_DEBUG Removed obsolete tech ENABLE_GCODE_VIEWER_DATA_CHECKING Code cleanup and techs removal - completed Code cleanup and techs removal - step 1 SPE-1872: Implemented G2/G3 lines discretization for gcfMarlinFirmware firmware flavour SPE-1872: Corrections into GCodeProcessor::process_G2_G3() to match firmware code SPE-1872: Actual speed profile - Further enhancements of imgui debug window SPE-1872: Actual speed profile - Rework in its calculation + enhanced imgui debug window SPE-1872: New imgui widget to show actual speed profile SPE-1872: Fixed actual speed for seam moves and at extrusion/travel/wipe start SPE-1872: Fixed rendering of wipe moves when actual speed view is selected SPE-1872: Actual speed profile extended to travel and wipe moves SPE-1872: Fixes in function recalculate_trapezoids() and method GCodeProcessor::TimeMachine::calculate_time() to smooth actual speed profile SPE-1872: Added debug graphic to show move actual speed profile SPE-1872: libvgcode library: replace volumetric flow rate data with mm3_per_mm to reduce memory usage SPE-1872: Added visualization of actual volumetric flow rate SPE-1872: Fixes in calculating actual speed SPE-1872: Added visualization of actual speed in gcode preview SPE-2124: Added command line option 'opengl-aa' to allow the user to turn on the automatic selection of max number of supported samples for OpenGL antialising #12117: Reduced moire patterns by using the highest number of samples available for multisampling New gcode visualization integration - Partially enabled imgui debug window New gcode visualization integration - Fixed center of gravity calculation and rendering New gcode visualization library - Interface for estimated times New gcode visualization library - Tool marker rendering New gcode visualization library - Axes aligned bounding boxes calculation Removed obsolete debug code New gcode visualization library - Added statistic of used memory New gcode visualization library - Separation of tool colors and color changes colors to simplify client code Added missing include New gcode visualization library - Added print color changes detection New gcode visualization library - Modified OpenGL ES context detection New gcode visualization library - Another makefile cleanup New gcode visualization library - Makefiles cleanup New gcode visualization library - Added suppression of error 'This function or variable may be unsafe' in VS2022 New gcode visualization library - Compatibility with OpenGL ES New gcode visualization library - Interface cleanup and documentation New gcode visualization library - Extended interface to give access to estimated times New gcode visualization integration - Toggling of top layer only view state New gcode visualization integration - Removed imperial units from tool position data Small refactoring New gcode visualization library - Custom values for travel and wipe moves radius New gcode visualization library - Allow customization of range colors New gcode visualization library - Partial update of interface comments/documentation New gcode visualization integration - Follow-up of 35ee55e29bb231fd01a2eb71ae293832a37ca65d - Better fix for toolpaths visible range when toggling options' visibility New gcode visualization integration - Fixed toolpaths reset New gcode visualization library - Fixed method set_option_color() New gcode visualization library - Fixed method ViewerImpl::set_extrusion_role_color() New gcode visualization library - Added methods to release gpu resources on demand. New gcode visualization library - Travel and wipe moves as options New gcode visualization integration - Fixed toolpaths visible range when toggling options' visibility New gcode visualization integration - Fixed management of gcode preview view type New gcode visualization - Fixed wrong include New gcode visualization - Added missing headers New gcode visualization - Refactoring + added missing headers New gcode visualization - New code set as standalone library + embed glad library to load OpenGL functions New gcode visualization - Fixed errors and warnings when building the new code as a standalone library New gcode visualization integration - Fixed layers ordering in pre-gcode preview New gcode visualization integration - Fixed objects' tool colors in pre-gcode preview Code cleanup New gcode visualization integration - Tool position properties data window New gcode visualization integration - Fixed in export toolpaths to obj New gcode visualization - Inlining in source code Refactoring New gcode visualization integration - Export toolpaths to obj Some refactoring and warning fix New gcode visualization integration - Customizable travel moves colors New gcode visualization integration - Customizable options colors New gcode visualization integration - Customizable extrusion roles colors New gcode visualization integration - Fixed pre-gcode preview layers times New gcode visualization integration - Modify pre-gcode preview to use the new toolpaths renderer, objects WIP New gcode visualization - Modify pre-gcode preview to use the new toolpaths renderer, WIP (brim/skirt/wipe tower) New gcode visualization integration - Do not reset visible range when toggling options/roles visibility New gcode visualization - Fixed color of first vertex of top layer (when top layer only option is enabled) New gcode visualization - Customizable travels and wipes segment radius New gcode visualization integration - Removed tech ENABLE_GCODE_VIEWER_STATISTICS New gcode visualization integration - Added check of OpenGL version New gcode visualization integration - Removed GCodeProcessorResult::spiral_vase_layers Another bunch of warnings fixes Fixed warnings New gcode visualization integration - Removal of old visualization Fixed includes New gcode visualization integration - File structure of new code separated in api + src New gcode visualization integration - View ranges management moved to new visualizer New gcode visualization integration - Fixed top layer only visualization for MMU printers New gcode visualization integration - Removed dependency on imgui from new visualizer Some refactoring New gcode visualization integration - Removed dependency on Slic3r::GCodeProcessorResult from new visualizer New gcode visualization integration - Moves' data conversion moved to client side New gcode visualization: layers times refactoring A bunch of fixes for the new gcode visualization New gcode visualization: render in gray color layers containing pause print or custom gcode options when in Color Print view New gcode visualization integration - Tool colors New gcode visualization integration - Layers times New gcode visualization integration - Travels and Extrusion roles times Fixed detection of start/end of contiguous extrusion paths New gcode visualization integration - Extrusion roles New gcode visualization integration - Colors New gcode visualization integration - Tool position Center of gravity and tool marker may both be rendered with fixed screen size and a scaling factor Fixed rendering of options in new gcode visualization Tool marker NOT rendered by the new visualization code Center of gravity marker NOT rendered by the new visualization code Fixed toolpaths_cog shaders Tool position window for new gcode visualization Top layer only coloring for neww gcode visualization Refactoring in preview's new visualization Hidden imgui debug dialog for new visualization in preview Synchronization of moves between old and new visualization Fixed missing gcode window in new visualization Rendering of debug imgui dialog moved from class libvgcode::Viewer to class libvgcode::Toolpaths + warnings fixing Some functionality moved from class libvgcode::Viewer to class libvgcode::Toolpaths Some refactoring and cleanup Refatoring of PathVertex and Toolpaths::load() SPE-1982: Tech ENABLE_NEW_GCODE_VIEWER - 1st installment of new toolpaths rendering code (WIP)
This commit is contained in:
@@ -285,8 +285,8 @@ class GLCanvas3D
|
||||
|
||||
bool is_allowed() const;
|
||||
|
||||
bool is_enabled() const;
|
||||
void set_enabled(bool enabled);
|
||||
bool is_enabled() const { return m_enabled; }
|
||||
void set_enabled(bool enabled) { m_enabled = is_allowed() && enabled; }
|
||||
|
||||
void show_tooltip_information(const GLCanvas3D& canvas, std::map<wxString, wxString> captions_texts, float x, float y);
|
||||
void render_variable_layer_height_dialog(const GLCanvas3D& canvas);
|
||||
@@ -326,25 +326,20 @@ class GLCanvas3D
|
||||
static const Vec3d Invalid_3D_Point;
|
||||
static const int MoveThresholdPx;
|
||||
|
||||
Point start_position_2D;
|
||||
Vec3d start_position_3D;
|
||||
int move_volume_idx;
|
||||
bool move_requires_threshold;
|
||||
Point move_start_threshold_position_2D;
|
||||
|
||||
public:
|
||||
Drag();
|
||||
Point start_position_2D{ Invalid_2D_Point };
|
||||
Vec3d start_position_3D{ Invalid_3D_Point };
|
||||
int move_volume_idx{ -1 };
|
||||
bool move_requires_threshold{ false };
|
||||
Point move_start_threshold_position_2D{ Invalid_2D_Point };
|
||||
};
|
||||
|
||||
bool dragging;
|
||||
Vec2d position;
|
||||
Vec3d scene_position;
|
||||
bool dragging{ false };
|
||||
Vec2d position{ DBL_MAX, DBL_MAX };
|
||||
Vec3d scene_position{ DBL_MAX, DBL_MAX, DBL_MAX };
|
||||
bool ignore_left_up{ false };
|
||||
Drag drag;
|
||||
bool ignore_left_up;
|
||||
bool ignore_right_up;
|
||||
|
||||
Mouse();
|
||||
|
||||
void set_start_position_2D_as_invalid() { drag.start_position_2D = Drag::Invalid_2D_Point; }
|
||||
void set_start_position_3D_as_invalid() { drag.start_position_3D = Drag::Invalid_3D_Point; }
|
||||
void set_move_start_threshold_position_2D_as_invalid() { drag.move_start_threshold_position_2D = Drag::Invalid_2D_Point; }
|
||||
@@ -622,6 +617,9 @@ private:
|
||||
int custom_height_count = 0;
|
||||
int assembly_view_count = 0;
|
||||
|
||||
// used to show layers times on the layers slider when pre-gcode view is active
|
||||
std::vector<float> m_gcode_layers_times_cache;
|
||||
|
||||
public:
|
||||
OrientSettings& get_orient_settings()
|
||||
{
|
||||
@@ -669,7 +667,7 @@ public:
|
||||
|
||||
struct ToolbarHighlighter
|
||||
{
|
||||
void set_timer_owner(wxEvtHandler* owner, int timerid = wxID_ANY);
|
||||
void set_timer_owner(wxEvtHandler* owner, int timerid = wxID_ANY) { m_timer.SetOwner(owner, timerid); }
|
||||
void init(GLToolbarItem* toolbar_item, GLCanvas3D* canvas);
|
||||
void blink();
|
||||
void invalidate();
|
||||
@@ -684,7 +682,7 @@ public:
|
||||
|
||||
struct GizmoHighlighter
|
||||
{
|
||||
void set_timer_owner(wxEvtHandler* owner, int timerid = wxID_ANY);
|
||||
void set_timer_owner(wxEvtHandler* owner, int timerid = wxID_ANY) { m_timer.SetOwner(owner, timerid); }
|
||||
void init(GLGizmosManager* manager, GLGizmosManager::EType gizmo, GLCanvas3D* canvas);
|
||||
void blink();
|
||||
void invalidate();
|
||||
@@ -748,22 +746,33 @@ public:
|
||||
void reset_explosion_ratio() { m_explosion_ratio = 1.0; }
|
||||
void on_change_color_mode(bool is_dark, bool reinit = true);
|
||||
const bool get_dark_mode_status() { return m_is_dark; }
|
||||
void set_as_dirty();
|
||||
void set_as_dirty() { m_dirty = true; }
|
||||
void requires_check_outside_state() { m_requires_check_outside_state = true; }
|
||||
|
||||
unsigned int get_volumes_count() const;
|
||||
unsigned int get_volumes_count() const { return (unsigned int)m_volumes.volumes.size(); }
|
||||
const GLVolumeCollection& get_volumes() const { return m_volumes; }
|
||||
void reset_volumes();
|
||||
ModelInstanceEPrintVolumeState check_volumes_outside_state() const;
|
||||
ModelInstanceEPrintVolumeState check_volumes_outside_state(bool selection_only = true) const;
|
||||
void check_volumes_outside_state(GLVolumeCollection& volumes) const { check_volumes_outside_state(volumes, nullptr, false); }
|
||||
bool is_all_plates_selected() { return m_sel_plate_toolbar.m_all_plates_stats_item && m_sel_plate_toolbar.m_all_plates_stats_item->selected; }
|
||||
const float get_scale() 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(GLVolumeCollection& volumes, ModelInstanceEPrintVolumeState* out_state, bool selection_only = true) const;
|
||||
|
||||
public:
|
||||
//BBS
|
||||
GCodeViewer& get_gcode_viewer() { return m_gcode_viewer; }
|
||||
void init_gcode_viewer(ConfigOptionMode mode, Slic3r::PresetBundle* preset_bundle) { m_gcode_viewer.init(mode, preset_bundle); }
|
||||
void reset_gcode_toolpaths() { m_gcode_viewer.reset(); }
|
||||
const GCodeViewer::SequentialView& get_gcode_sequential_view() const { return m_gcode_viewer.get_sequential_view(); }
|
||||
void update_gcode_sequential_view_current(unsigned int first, unsigned int last) { m_gcode_viewer.update_sequential_view_current(first, last); }
|
||||
const libvgcode::Interval& get_gcode_view_full_range() const { return m_gcode_viewer.get_gcode_view_full_range(); }
|
||||
const libvgcode::Interval& get_gcode_view_enabled_range() const { return m_gcode_viewer.get_gcode_view_enabled_range(); }
|
||||
const libvgcode::Interval& get_gcode_view_visible_range() const { return m_gcode_viewer.get_gcode_view_visible_range(); }
|
||||
const libvgcode::PathVertex& get_gcode_vertex_at(size_t id) const { return m_gcode_viewer.get_gcode_vertex_at(id); }
|
||||
|
||||
void toggle_selected_volume_visibility(bool selected_visible);
|
||||
void toggle_sla_auxiliaries_visibility(bool visible, const ModelObject* mo = nullptr, int instance_idx = -1);
|
||||
@@ -772,7 +781,7 @@ public:
|
||||
void update_instance_printable_state_for_objects(const std::vector<size_t>& object_idxs);
|
||||
|
||||
void set_config(const DynamicPrintConfig* config);
|
||||
void set_process(BackgroundSlicingProcess* process);
|
||||
void set_process(BackgroundSlicingProcess* process) { m_process = process; }
|
||||
void set_model(Model* model);
|
||||
const Model* get_model() const { return m_model; }
|
||||
|
||||
@@ -816,22 +825,28 @@ public:
|
||||
BoundingBoxf3 scene_bounding_box() const;
|
||||
BoundingBoxf3 plate_scene_bounding_box(int plate_idx) const;
|
||||
|
||||
bool is_layers_editing_enabled() const;
|
||||
bool is_layers_editing_allowed() const;
|
||||
bool is_layers_editing_enabled() const { return m_layers_editing.is_enabled(); }
|
||||
bool is_layers_editing_allowed() const { return m_layers_editing.is_allowed(); }
|
||||
|
||||
void reset_layer_height_profile();
|
||||
void adaptive_layer_height_profile(float quality_factor);
|
||||
void smooth_layer_height_profile(const HeightProfileSmoothingParams& smoothing_params);
|
||||
|
||||
bool is_reload_delayed() const;
|
||||
bool is_reload_delayed() const { return m_reload_delayed; }
|
||||
|
||||
void enable_layers_editing(bool enable);
|
||||
void enable_legend_texture(bool enable);
|
||||
void enable_picking(bool enable);
|
||||
void enable_moving(bool enable);
|
||||
void enable_gizmos(bool enable);
|
||||
void enable_selection(bool enable);
|
||||
void enable_main_toolbar(bool enable);
|
||||
void enable_picking(bool enable)
|
||||
{
|
||||
m_picking_enabled = enable;
|
||||
// Orca: invalidate hover state when dragging is toggled, otherwise if we turned off dragging
|
||||
// while hovering above a volume, the hovering state won't update even if mouse has moved away.
|
||||
// Fixes https://github.com/SoftFever/OrcaSlicer/pull/9979#issuecomment-3065575889
|
||||
m_hover_volume_idxs.clear();
|
||||
}
|
||||
void enable_moving(bool enable) { m_moving_enabled = enable; }
|
||||
void enable_gizmos(bool enable) { m_gizmos.set_enabled(enable); }
|
||||
void enable_selection(bool enable) { m_selection.set_enabled(enable); }
|
||||
void enable_main_toolbar(bool enable) { m_main_toolbar.set_enabled(enable); }
|
||||
//BBS: GUI refactor: GLToolbar
|
||||
void _update_select_plate_toolbar_stats_item(bool force_selected = false);
|
||||
void reset_select_plate_toolbar_selection();
|
||||
@@ -839,10 +854,10 @@ public:
|
||||
void enable_assemble_view_toolbar(bool enable);
|
||||
void enable_return_toolbar(bool enable);
|
||||
void enable_separator_toolbar(bool enable);
|
||||
void enable_dynamic_background(bool enable);
|
||||
void enable_dynamic_background(bool enable) { m_dynamic_background_enabled = enable; }
|
||||
void enable_labels(bool enable) { m_labels.enable(enable); }
|
||||
void enable_slope(bool enable) { m_slope.enable(enable); }
|
||||
void allow_multisample(bool allow);
|
||||
void allow_multisample(bool allow) { m_multisample_allowed = allow; }
|
||||
|
||||
void zoom_to_bed();
|
||||
void zoom_to_volumes();
|
||||
@@ -906,7 +921,7 @@ public:
|
||||
GLShaderProgram* shader, Camera::EType camera_type, bool use_top_view = false, bool for_picking = false, bool ban_light = false);
|
||||
|
||||
//BBS use gcoder viewer render calibration thumbnails
|
||||
void render_calibration_thumbnail(ThumbnailData& thumbnail_data, unsigned int w, unsigned int h, const ThumbnailsParams& thumbnail_params);
|
||||
// void render_calibration_thumbnail(ThumbnailData& thumbnail_data, unsigned int w, unsigned int h, const ThumbnailsParams& thumbnail_params);
|
||||
|
||||
//BBS
|
||||
void select_curr_plate_all();
|
||||
@@ -918,18 +933,14 @@ public:
|
||||
void deselect_all();
|
||||
void exit_gizmo();
|
||||
void set_selected_visible(bool visible);
|
||||
void delete_selected();
|
||||
void delete_selected() { m_selection.erase(); }
|
||||
void ensure_on_bed(unsigned int object_idx, bool allow_negative_z);
|
||||
|
||||
bool is_gcode_legend_enabled() const { return m_gcode_viewer.is_legend_enabled(); }
|
||||
GCodeViewer::EViewType get_gcode_view_type() const { return m_gcode_viewer.get_view_type(); }
|
||||
const std::vector<double>& get_gcode_layers_zs() const;
|
||||
std::vector<double> get_volumes_print_zs(bool active_only) const;
|
||||
unsigned int get_gcode_options_visibility_flags() const { return m_gcode_viewer.get_options_visibility_flags(); }
|
||||
void set_gcode_options_visibility_from_flags(unsigned int flags);
|
||||
unsigned int get_toolpath_role_visibility_flags() const { return m_gcode_viewer.get_toolpath_role_visibility_flags(); }
|
||||
void set_volumes_z_range(const std::array<double, 2>& range);
|
||||
std::vector<CustomGCode::Item>& get_custom_gcode_per_print_z() { return m_gcode_viewer.get_custom_gcode_per_print_z(); }
|
||||
std::vector<double> get_gcode_layers_zs() const { return m_gcode_viewer.get_layers_zs(); }
|
||||
std::vector<float> get_gcode_layers_times() const { return m_gcode_viewer.get_layers_times(); }
|
||||
const std::vector<float>& get_gcode_layers_times_cache() const { return m_gcode_layers_times_cache; }
|
||||
void reset_gcode_layers_times_cache() { m_gcode_layers_times_cache.clear(); }
|
||||
void set_volumes_z_range(const std::array<double, 2>& range) { m_volumes.set_range(range[0] - 1e-6, range[1] + 1e-6); }
|
||||
size_t get_gcode_extruders_count() { return m_gcode_viewer.get_extruders_count(); }
|
||||
|
||||
std::vector<int> load_object(const ModelObject& model_object, int obj_idx, std::vector<int> instance_idxs);
|
||||
@@ -945,16 +956,22 @@ public:
|
||||
void set_shells_on_previewing(bool is_preview) { m_gcode_viewer.set_shells_on_preview(is_preview); }
|
||||
|
||||
//BBS: add only gcode mode
|
||||
void load_gcode_preview(const GCodeProcessorResult& gcode_result, const std::vector<std::string>& str_tool_colors, bool only_gcode);
|
||||
void refresh_gcode_preview_render_paths();
|
||||
void set_gcode_view_preview_type(GCodeViewer::EViewType type) { return m_gcode_viewer.set_view_type(type); }
|
||||
GCodeViewer::EViewType get_gcode_view_preview_type() const { return m_gcode_viewer.get_view_type(); }
|
||||
void load_gcode_preview(const GCodeProcessorResult& gcode_result, const std::vector<std::string>& str_tool_colors,
|
||||
const std::vector<std::string>& str_color_print_colors, bool only_gcode);
|
||||
void set_gcode_view_type(libvgcode::EViewType type) { return m_gcode_viewer.set_view_type(type); }
|
||||
libvgcode::EViewType get_gcode_view_type() const { return m_gcode_viewer.get_view_type(); }
|
||||
void enable_gcode_view_type_cache_load(bool enable) { m_gcode_viewer.enable_view_type_cache_load(enable); }
|
||||
void enable_gcode_view_type_cache_write(bool enable) { m_gcode_viewer.enable_view_type_cache_write(enable); }
|
||||
bool is_gcode_view_type_cache_load_enabled() const { return m_gcode_viewer.is_view_type_cache_load_enabled(); }
|
||||
bool is_gcode_view_type_cache_write_enabled() const { return m_gcode_viewer.is_view_type_cache_write_enabled(); }
|
||||
|
||||
void load_sla_preview();
|
||||
//void load_preview(const std::vector<std::string>& str_tool_colors, const std::vector<CustomGCode::Item>& color_print_values);
|
||||
// void load_preview(const std::vector<std::string>& str_tool_colors, const std::vector<std::string>& str_color_print_colors,
|
||||
// const std::vector<CustomGCode::Item>& color_print_values);
|
||||
void bind_event_handlers();
|
||||
void unbind_event_handlers();
|
||||
|
||||
void on_size(wxSizeEvent& evt);
|
||||
void on_size(wxSizeEvent& evt) { m_dirty = true; }
|
||||
void on_idle(wxIdleEvent& evt);
|
||||
void on_char(wxKeyEvent& evt);
|
||||
void on_key(wxKeyEvent& evt);
|
||||
@@ -1021,7 +1038,8 @@ public:
|
||||
inline double rotation() const { return m_rotation; }
|
||||
inline const Vec2d bb_size() const { return m_bb.size(); }
|
||||
|
||||
void apply_wipe_tower() const;
|
||||
void apply_wipe_tower() const { apply_wipe_tower(m_pos, m_rotation); }
|
||||
void apply_wipe_tower(Vec2d pos, double rot) const;
|
||||
};
|
||||
|
||||
// BBS: add partplate logic
|
||||
@@ -1043,7 +1061,7 @@ public:
|
||||
Vec2f get_nearest_empty_cell(const Vec2f start_point, const Vec2f step = {10, 10});
|
||||
|
||||
void set_cursor(ECursorType type);
|
||||
void msw_rescale();
|
||||
void msw_rescale() { m_gcode_viewer.invalidate_legend(); }
|
||||
|
||||
void request_extra_frame() { m_extra_frame_requested = true; }
|
||||
|
||||
@@ -1053,8 +1071,8 @@ public:
|
||||
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); }
|
||||
|
||||
bool has_toolpaths_to_export() const;
|
||||
void export_toolpaths_to_obj(const char* filename) const;
|
||||
bool has_toolpaths_to_export() const { return m_gcode_viewer.can_export_toolpaths(); }
|
||||
void export_toolpaths_to_obj(const char* filename) const { m_gcode_viewer.export_toolpaths_to_obj(filename); }
|
||||
|
||||
void mouse_up_cleanup();
|
||||
|
||||
@@ -1174,7 +1192,7 @@ private:
|
||||
void _render_selection();
|
||||
void _render_sequential_clearance();
|
||||
#if ENABLE_RENDER_SELECTION_CENTER
|
||||
void _render_selection_center();
|
||||
void _render_selection_center() { m_selection.render_center(m_gizmos.is_dragging()); }
|
||||
#endif // ENABLE_RENDER_SELECTION_CENTER
|
||||
void _check_and_update_toolbar_icon_scale();
|
||||
void _render_overlays();
|
||||
@@ -1199,7 +1217,7 @@ private:
|
||||
void _render_camera_target();
|
||||
#endif // ENABLE_SHOW_CAMERA_TARGET
|
||||
void _render_sla_slices();
|
||||
void _render_selection_sidebar_hints();
|
||||
void _render_selection_sidebar_hints() { m_selection.render_sidebar_hints(m_sidebar_field, m_gizmos.get_uniform_scaling()); }
|
||||
//BBS: GUI refactor: adjust main toolbar position
|
||||
bool _render_orient_menu(float left, float right, float bottom, float top);
|
||||
bool _render_arrange_menu(float left, float right, float bottom, float top);
|
||||
@@ -1212,23 +1230,12 @@ private:
|
||||
// Convert the screen space coordinate to world coordinate on the bed.
|
||||
Vec3d _mouse_to_bed_3d(const Point& mouse_pos);
|
||||
|
||||
void _start_timer();
|
||||
void _stop_timer();
|
||||
|
||||
// Create 3D thick extrusion lines for a skirt and brim.
|
||||
// Adds a new Slic3r::GUI::3DScene::Volume to volumes, updates collision with the build_volume.
|
||||
void _load_print_toolpaths(const BuildVolume &build_volume);
|
||||
// Create 3D thick extrusion lines for object forming extrusions.
|
||||
// Adds a new Slic3r::GUI::3DScene::Volume to $self->volumes,
|
||||
// one for perimeters, one for infill and one for supports, updates collision with the build_volume.
|
||||
void _load_print_object_toolpaths(const PrintObject& print_object, const BuildVolume &build_volume,
|
||||
const std::vector<std::string>& str_tool_colors, const std::vector<CustomGCode::Item>& color_print_values);
|
||||
// Create 3D thick extrusion lines for wipe tower extrusions, updates collision with the build_volume.
|
||||
void _load_wipe_tower_toolpaths(const BuildVolume &build_volume, const std::vector<std::string>& str_tool_colors);
|
||||
void _start_timer() { m_timer.Start(100, wxTIMER_CONTINUOUS); }
|
||||
void _stop_timer() { m_timer.Stop(); }
|
||||
|
||||
// Load SLA objects and support structures for objects, for which the slaposSliceSupports step has been finished.
|
||||
void _load_sla_shells();
|
||||
void _update_sla_shells_outside_state();
|
||||
void _load_sla_shells();
|
||||
void _update_sla_shells_outside_state() { check_volumes_outside_state(); }
|
||||
void _set_warning_notification_if_needed(EWarning warning);
|
||||
|
||||
//BBS: add partplate print volume get function
|
||||
|
||||
Reference in New Issue
Block a user