Files
OrcaSlicer/src/slic3r/GUI/Jobs/OrientJob.hpp
T
HanifKoh 1a5f91d727 Add Missing Includes Across src/slic3r/GUI (#16048)
* Add Missing Includes Across src/slic3r/GUI

Every GUI source and header now directly includes the headers declaring what it uses, rather than relying on the precompiled header or transitive includes. Generated with clang-tidy misc-include-cleaner, plus one hand edit making CalibrationPanel.hpp self-contained.

* Drop the OS-Specific Includes Added Outside Their Platform Guards

GLib, GTK, D-Bus and POSIX headers are only used inside platform #if blocks, which already include them. Added unconditionally at the top of the file they broke the Windows build.

* Add the clang-tidy Configuration That Generated These Includes

Only misc-include-cleaner's missing-include check, with the headers it must never suggest: per-platform, internal and OS-specific ones that would break other platforms or are not meant to be included directly.

* Match Windows Paths in the clang-tidy Ignore List

Header paths use backslashes on Windows, so every / in a pattern is now [/\\]. The Windows SDK headers are ignored alongside the other OS-specific ones, and the list is one pattern per line. Suggested by @raistlin7447 from a Windows clang-cl run.
2026-10-02 14:56:56 +08:00

69 lines
1.7 KiB
C++

#ifndef ORIENTJOB_HPP
#define ORIENTJOB_HPP
#include "Job.hpp"
#include "libslic3r/Orient.hpp"
#include <vector>
#include <exception>
#include "libslic3r/Model.hpp"
namespace Slic3r {
class ModelObject;
namespace GUI {
class Plater;
class OrientJob : public Job
{
using OrientMesh = orientation::OrientMesh;
using OrientMeshs = orientation::OrientMeshs;
OrientMeshs m_selected, m_unselected, m_unprintable;
Plater *m_plater;
// clear m_selected and m_unselected, reserve space for next usage
void clear_input();
//BBS: add only one plate mode
void prepare_selection(std::vector<bool> obj_sel, bool only_one_plate);
// Prepare the selected and unselected items separately. If nothing is
// selected, behaves as if everything would be selected.
void prepare_selected();
//BBS:prepare the items from current selected partplate
void prepare_partplate();
public:
void prepare();
void process(Ctl &ctl) override;
OrientJob();
void finalize(bool canceled, std::exception_ptr &e) override;
#if 0
static
orientation::OrientMesh get_orient_mesh(ModelObject* obj, const Plater* plater)
{
using OrientMesh = orientation::OrientMesh;
OrientMesh om;
om.name = obj->name;
om.mesh = obj->mesh(); // don't know the difference to obj->raw_mesh(). Both seem OK
om.setter = [obj, plater](const OrientMesh& p) {
obj->rotate(p.angle, p.axis);
obj->ensure_on_bed();
};
return om;
}
#endif
static orientation::OrientMesh get_orient_mesh(ModelInstance* instance);
};
}} // namespace Slic3r::GUI
#endif // ORIENTJOB_HPP