mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-10 09:11:08 +00:00
Merge upstream/main into belt-printer
Brings belt-printer up to main4b4a261787. Resolutions: - G-code header (#15897, #15915): main moved the header, config and thumbnail block later in _do_export; write_belt_header() moves with it, still after the thumbnails and outside the BTT_TFT gate. - _extrude: first-layer acceleration keeps the per-path first-layer plane test with main's cached nozzle index (#16028); main's set_speed out-param form (#16108) everywhere else. - GCodeWriter (#16108): the arc-to-polyline fallback for machine mappings that cannot express G2/G3 now runs in the out-param extrude_arc_to_xy, which is the overload GCode calls, and appends to the caller's string. - GCodeProcessorResult: the belt fields join main's forwarding assign. - Clipper2 (#15969): belt arrange helpers take Slic3r::Point; the tree support join types lose their ClipperLib qualifier. - CLI arrange (#15837): belt printers still reserve no wipe tower. - Wipe tower options (#15841): the two new sparse-layer toggles are hidden for belt printers like the rest of the tower options. - Keyboard shortcuts (#15706): main's registry replaces the old key switch; the belt view toggle is re-registered in the next commit. - Print::process: the belt purge-plan undo runs before main's SliceStarted event. - scripts/filament_id_snapshot.json: deleted on main (a77209af8f). - Includes and appended tests: union of both sides.
This commit is contained in:
@@ -5,6 +5,23 @@
|
||||
#include "GUI_Preview.hpp"
|
||||
#include "GUI_App.hpp"
|
||||
#include "GUI.hpp"
|
||||
#include <wx/slider.h>
|
||||
#include <wx/gdicmn.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include "libslic3r/GCode/GCodeProcessor.hpp"
|
||||
#include <functional>
|
||||
#include "libslic3r/Config.hpp"
|
||||
#include <boost/log/trivial.hpp>
|
||||
#include "libslic3r/CustomGCode.hpp"
|
||||
#include <wx/event.h>
|
||||
#include <algorithm>
|
||||
#include <cstdlib>
|
||||
#include <cassert>
|
||||
#include "libslic3r/PrintConfig.hpp"
|
||||
#include "libslic3r/ExPolygon.hpp"
|
||||
#include <cmath>
|
||||
#include "libvgcode/include/Types.hpp"
|
||||
#if ENABLE_OPENGL_AUTO_AA_SAMPLES
|
||||
#include "GUI_Init.hpp"
|
||||
#endif // ENABLE_OPENGL_AUTO_AA_SAMPLES
|
||||
@@ -280,8 +297,6 @@ bool Preview::init(wxWindow* parent, Bed3D& bed, Model* model)
|
||||
m_canvas->enable_assemble_view_toolbar(false);
|
||||
|
||||
// sizer, m_canvas_widget
|
||||
m_canvas_widget->Bind(wxEVT_KEY_DOWN, &Preview::update_layers_slider_from_canvas, this);
|
||||
|
||||
wxBoxSizer *main_sizer = new wxBoxSizer(wxVERTICAL);
|
||||
main_sizer->Add(m_canvas_widget, 1, wxALL | wxEXPAND, 0);
|
||||
|
||||
@@ -516,28 +531,6 @@ void Preview::update_layers_slider_mode()
|
||||
m_layers_slider->SetModeAndOnlyExtruder(one_extruder_printed_model, only_extruder, can_change_color);
|
||||
}
|
||||
|
||||
void Preview::update_layers_slider_from_canvas(wxKeyEvent &event)
|
||||
{
|
||||
if (event.HasModifiers()) {
|
||||
event.Skip();
|
||||
return;
|
||||
}
|
||||
|
||||
const auto key = event.GetKeyCode();
|
||||
|
||||
IMSlider *m_layers_slider = m_canvas->get_gcode_viewer().get_layers_slider();
|
||||
IMSlider *m_moves_slider = m_canvas->get_gcode_viewer().get_moves_slider();
|
||||
if (key == 'L') {
|
||||
if(!m_layers_slider->switch_one_layer_mode())
|
||||
event.Skip();
|
||||
m_canvas->set_as_dirty();
|
||||
}
|
||||
/*else if (key == WXK_SHIFT)
|
||||
m_layers_slider->UseDefaultColors(false);*/
|
||||
else
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
void Preview::update_layers_slider(const std::vector<double>& layers_z, bool keep_z_range)
|
||||
{
|
||||
IMSlider *m_layers_slider = m_canvas->get_gcode_viewer().get_layers_slider();
|
||||
|
||||
Reference in New Issue
Block a user