Skip to content

GUI: Add Slider

Alex Petsiuk edited this page Aug 14, 2024 · 3 revisions

To better understand the internal slicing process, it may be helpful to visualize several g-code parameters, as shown in the figure below.

image

Relevant commits:

...\src\PrusaSlicer\src\slic3r\GUI\GCodeViewer.hpp, ...GCodeViewer.cpp

image

class GUI_App : public wxApp

class Preview : public wxPanel

image


class View3D : public wxPanel
{
    View3D(wxWindow* parent, Bed3D& bed, Model* model, DynamicPrintConfig* config, BackgroundSlicingProcess* process);
    void reload_scene(bool refresh_immediately, bool force_full_scene_refresh = false);
}

class Preview : public wxPanel
{
    DynamicPrintConfig* m_config;
    BackgroundSlicingProcess* m_process;
    GCodeProcessorResult* m_gcode_result;

    DoubleSlider::Control* m_layers_slider{ nullptr };
    DoubleSlider::Control* m_moves_slider{ nullptr };


    enum class OptionType : unsigned int
    {
        Travel,
        Wipe,
        Retractions,
        Unretractions,
        Seams,
        ToolChanges,
        ColorChanges,
        PausePrints,
        CustomGCodes,
        CenterOfGravity,
        Shells,
        ToolMarker,
        Legend
    };

    void load_print(bool keep_z_range = false);
    void reload_print(bool keep_volumes = false);
    void refresh_print();

    void update_moves_slider();
    void update_layers_slider(const std::vector<double>& layers_z, bool keep_z_range = false);
}

image

new

image

added "Layer time (linear)" and "Layer time (logarithmic)"

Search in commits "volumetric flow rate": https://github.com/search?q=org%3Aprusa3d+volumetric+flow+rate&type=commits

image

image


image

image

https://github.com/prusa3d/PrusaSlicer/commit/4d483f323f732ceccf6e581e160b962aa49d09f5


GUI_Preview.cpp

image

image

image

void Preview::load_print_as_fff(bool keep_z_range)

image

image

image

https://github.com/prusa3d/PrusaSlicer/commit/7a0df4bcb487c6f6e6fd3d3505ee12a5416df368#diff-377a1e0a9bc41d63bbd9cba1acb0b03597488a60065b6d12105546925f2fc3fa

image

image

image