Skip to content

slicing_hierarchy

github-actions[bot] edited this page Apr 9, 2026 · 1 revision

Slicing Call Hierarchy

The Slicing logic is not the easiest to locate in the code base. Below is a flow diagram of function calls that are made after clicking the Slice Plate button in the UI. Most of the processing happens in different threads. Note the calls after BackgroundSlicingProcess::start(), but this is how you can find the slicing logic.

flowchart TD
    A["Slice plate"] --> B["void Plater::priv::on_action_slice_plate(SimpleEvent&)"]
    B --> C["void Plater::reslice()"]
    C --> D["bool Plater::priv::restart_background_process(unsigned int state)"]
    D --> E["bool BackgroundSlicingProcess::start()"]
    E --> F["void BackgroundSlicingProcess::thread_proc_safe_seh_throw()"]
    F --> G["unsigned long BackgroundSlicingProcess::thread_proc_safe_seh()"]
    G --> H["void BackgroundSlicingProcess::thread_proc_safe()"]
    H --> I["void BackgroundSlicingProcess::thread_proc()"]
    I --> J["void BackgroundSlicingProcess::call_process_seh_throw(std::exception_ptr &ex)"]
    J --> K["unsigned long BackgroundSlicingProcess::call_process_seh(std::exception_ptr &ex)"]
    K --> L["void BackgroundSlicingProcess::call_process(std::exception_ptr &ex)"]
    L --> M["void BackgroundSlicingProcess::process_fff()"]
    M --> N["void Print::process(long long *time_cost_with_cache, bool use_cache)"]
    N --> O["void PrintObject::make_perimeters()"]
    O --> P["void PrintObject::slice()"]

    %% Labels for libraries
    subgraph G1 [libSlic3r_gui]
        B
        C
        D
        E
        F
        G
        H
        I
        J
        K
        L
        M
    end

    subgraph G2 [libSlic3r]
        N
        O
        P
    end
Loading

Application Structure Overview

WIP...

Warning

!! incomplete, possibly inaccurate, being updated with new info !!

Refers to the entire application. The whole view, file loading, project saving and loading is all managed by this class. This class contains members for the model viewer, the sidebar, gcode viewer and everything else.

This is relating the the sidebar in the application window

full-sidebar

The drop down menus where you can see and select presets

combobox

Refers to the various windows with settings. e.g. the Popup to edit printer or filament preset. Also the section to edit process preset and the object list. These 4 are managed by TabPrinter, TabFilament, TabPrint and TabPrintModel respectively.

tab-popup

Clone this wiki locally