mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-08 08:11:14 +00:00
* Remove Unused Project Includes and Forward-Declare Where a Type Is Only Referenced Generated with include-what-you-use and applied conservatively. Only OrcaSlicer's own headers, the ones under src/ and tests/, are removed or forward-declared; standard-library and third-party includes are left alone. An include is removed only when both the Release and the Debug configuration leave it unused, never from inside a conditional block, and never from a file with platform-specific blocks, which only gain includes. Files whose only use of a header sits behind a feature or debug macro (libvgcode's OpenGL ES and marker code, the ARACHNE/TESTS_EXPORT_SVGS debug output) keep their includes. clonable_ptr.hpp gains #pragma once; it had no include guard and was only safe while Config.hpp was its sole includer. * Remove Unused Project Includes From Files With Platform-Specific Code A Linux include-what-you-use run cannot see the code inside _WIN32, __APPLE__ or __linux__ blocks, so its verdict is only taken where nothing the removed header declares, directly or through what it includes, is named inside those blocks. Removals also have to hold in both the Release and Debug configuration and never touch a line inside a conditional block. * Restore the libslic3r Precompiled Header and Direct Includes Lost in the Platform Pass The platform-file pass treated pchheader.hpp as an ordinary header and emptied it, and left GUI_Preview.hpp and 14 other files relying on headers they no longer reached directly. * Restore MainFrame.hpp in ParamsDialog.cpp for the Windows-Only Reparent Call * Include Headers That Files Reached Through Ones the Cleanup Removed * Drop Includes Duplicated by the Cleanup or by Main's Own Additions * Leave PreciseSeam.cpp as Main Has It After the Precise Seam Rework
76 lines
2.0 KiB
C++
76 lines
2.0 KiB
C++
#ifndef SLAPRINTSTEPS_HPP
|
|
#define SLAPRINTSTEPS_HPP
|
|
|
|
#include <cstddef>
|
|
#include "libslic3r.h"
|
|
#include <random>
|
|
|
|
#include <libslic3r/SLAPrint.hpp>
|
|
|
|
#include <string>
|
|
|
|
namespace Slic3r {
|
|
|
|
class SLAPrint::Steps
|
|
{
|
|
private:
|
|
SLAPrint *m_print = nullptr;
|
|
std::mt19937 m_rng;
|
|
|
|
public:
|
|
// where the per object operations start and end
|
|
static const constexpr unsigned min_objstatus = 0;
|
|
static const constexpr unsigned max_objstatus = 50;
|
|
|
|
private:
|
|
const size_t objcount;
|
|
|
|
// shortcut to initial layer height
|
|
const double ilhd;
|
|
const float ilh;
|
|
const coord_t ilhs;
|
|
|
|
// the coefficient that multiplies the per object status values which
|
|
// are set up for <0, 100>. They need to be scaled into the whole process
|
|
const double objectstep_scale;
|
|
|
|
template<class...Args> void report_status(Args&&...args)
|
|
{
|
|
m_print->m_report_status(*m_print, std::forward<Args>(args)...);
|
|
}
|
|
|
|
double current_status() const { return m_print->m_report_status.status(); }
|
|
void throw_if_canceled() const { m_print->throw_if_canceled(); }
|
|
bool canceled() const { return m_print->canceled(); }
|
|
void initialize_printer_input();
|
|
|
|
void apply_printer_corrections(SLAPrintObject &po, SliceOrigin o);
|
|
|
|
public:
|
|
explicit Steps(SLAPrint *print);
|
|
|
|
void hollow_model(SLAPrintObject &po);
|
|
void drill_holes (SLAPrintObject &po);
|
|
void slice_model(SLAPrintObject& po);
|
|
void support_points(SLAPrintObject& po);
|
|
void support_tree(SLAPrintObject& po);
|
|
void generate_pad(SLAPrintObject& po);
|
|
void slice_supports(SLAPrintObject& po);
|
|
|
|
void merge_slices_and_eval_stats();
|
|
void rasterize();
|
|
|
|
void execute(SLAPrintObjectStep step, SLAPrintObject &obj);
|
|
void execute(SLAPrintStep step);
|
|
|
|
static std::string label(SLAPrintObjectStep step);
|
|
static std::string label(SLAPrintStep step);
|
|
|
|
double progressrange(SLAPrintObjectStep step) const;
|
|
double progressrange(SLAPrintStep step) const;
|
|
};
|
|
|
|
}
|
|
|
|
#endif // SLAPRINTSTEPS_HPP
|