mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-02 21:31:16 +00:00
Make the libslic3r Headers Compile on Their Own
Each now includes, or forward-declares, what it uses instead of relying on what its includers happened to include first. Left out: I18N.hpp, which errors on purpose when included from GUI code, and VoxelizeCSGMesh.hpp and SLA/bicubic.h, which nothing includes and which no longer compile at all.
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
#define CSGMESH_HPP
|
||||
|
||||
#include <libslic3r/AnyPtr.hpp>
|
||||
#include <libslic3r/Point.hpp>
|
||||
#include <libslic3r/TriangleMesh.hpp>
|
||||
#include <admesh/stl.h>
|
||||
|
||||
namespace Slic3r { namespace csg {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define CSGMESHCOPY_HPP
|
||||
|
||||
#include "CSGMesh.hpp"
|
||||
#include "libslic3r/libslic3r.h"
|
||||
|
||||
namespace Slic3r { namespace csg {
|
||||
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
#include <stack>
|
||||
#include <vector>
|
||||
|
||||
#include <boost/log/trivial.hpp>
|
||||
|
||||
#include "CSGMesh.hpp"
|
||||
|
||||
#include "libslic3r/Execution/ExecutionTBB.hpp"
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include <algorithm>
|
||||
|
||||
#include <clipper2/clipper2_z.hpp>
|
||||
#include <libslic3r/ExPolygon.hpp>
|
||||
#include <libslic3r/Point.hpp>
|
||||
namespace Slic3r { namespace Clipper2ZUtils {
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#ifndef slic3r_Format_3mf_hpp_
|
||||
#define slic3r_Format_3mf_hpp_
|
||||
#include <expat.h>
|
||||
#include <string>
|
||||
|
||||
namespace Slic3r {
|
||||
// PrusaFileParser is used to check 3mf file is from Prusa
|
||||
|
||||
@@ -5,6 +5,7 @@ namespace Slic3r {
|
||||
|
||||
class Model;
|
||||
class DynamicPrintConfig;
|
||||
struct ConfigSubstitutionContext;
|
||||
|
||||
// Load the content of an amf file into the given model and configuration.
|
||||
extern bool load_amf(const char* path, DynamicPrintConfig* config, ConfigSubstitutionContext* config_substitutions, Model* model, bool* use_inches);
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
#define slic3r_Format_OBJ_hpp_
|
||||
#include "libslic3r/Color.hpp"
|
||||
#include "objparser.hpp"
|
||||
#include "libslic3r/Point.hpp"
|
||||
#include <admesh/stl.h>
|
||||
#include <functional>
|
||||
#include <map>
|
||||
#include <unordered_map>
|
||||
namespace Slic3r {
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include <array>
|
||||
#include <unordered_map>
|
||||
#include <istream>
|
||||
#include <memory>
|
||||
|
||||
namespace ObjParser {
|
||||
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace Slic3r {
|
||||
class Model;
|
||||
|
||||
|
||||
@@ -11,12 +11,14 @@
|
||||
#include <regex>
|
||||
#include <memory>
|
||||
#include <map>
|
||||
#include <unordered_map>
|
||||
#include "AdaptivePAInterpolator.hpp"
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
// Forward declaration of GCode class
|
||||
class GCode;
|
||||
class PrintConfig;
|
||||
|
||||
/**
|
||||
* @brief Class for processing G-code layers with adaptive pressure advance.
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define slic3r_CoolingBuffer_hpp_
|
||||
|
||||
#include "../libslic3r.h"
|
||||
#include "../Point.hpp"
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <cfloat>
|
||||
@@ -10,6 +11,7 @@ namespace Slic3r {
|
||||
|
||||
class GCode;
|
||||
class Layer;
|
||||
class PrintConfig;
|
||||
struct PerExtruderAdjustments;
|
||||
|
||||
// A standalone G-code filter, to control cooling of the print.
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define slic3r_GCode_PressureEqualizer_hpp_
|
||||
|
||||
#include "../libslic3r.h"
|
||||
#include "../ExtrusionEntity.hpp"
|
||||
#include "../PrintConfig.hpp"
|
||||
|
||||
#include <queue>
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <boost/asio.hpp>
|
||||
#include <boost/noncopyable.hpp>
|
||||
#include <boost/bind/bind.hpp>
|
||||
#include <boost/thread.hpp>
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <cstdio>
|
||||
#include <iomanip>
|
||||
|
||||
// Marching squares
|
||||
//
|
||||
|
||||
@@ -1,8 +1,13 @@
|
||||
#ifndef Slic3r_MeasureUtils_hpp_
|
||||
#define Slic3r_MeasureUtils_hpp_
|
||||
|
||||
#include <cmath>
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <initializer_list>
|
||||
|
||||
#include "Point.hpp"
|
||||
|
||||
namespace Slic3r {
|
||||
namespace Measure {
|
||||
|
||||
|
||||
@@ -2,7 +2,11 @@
|
||||
#define slic3r_MutablePriorityQueue_hpp_
|
||||
|
||||
#include <assert.h>
|
||||
#include <cstddef>
|
||||
#include <limits>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
constexpr auto InvalidQueueID = std::numeric_limits<size_t>::max();
|
||||
template<typename T, typename IndexSetter, typename LessPredicate, const bool ResetIndexWhenRemoved = false>
|
||||
class MutablePriorityQueue
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
|
||||
#include <functional>
|
||||
#include <vector>
|
||||
#include <admesh/stl.h>
|
||||
|
||||
#include "Polygon.hpp"
|
||||
#include "ExPolygon.hpp"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user