Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbubnikv <bubnikv@gmail.com>2016-12-12 19:53:38 +0300
committerbubnikv <bubnikv@gmail.com>2016-12-12 19:53:38 +0300
commit1ea958158a9e0b7aee9a5ed006e81a7fa009d9ab (patch)
tree61c9d332ca8bb3f8ba1a9b7f2a7b749a619ade15 /xs/src/libslic3r/Print.hpp
parent2ab86a4895e6bb219ee160be03e2b12c67a63b43 (diff)
Support for user definable variable layer thickness, the C++ backend.
Diffstat (limited to 'xs/src/libslic3r/Print.hpp')
-rw-r--r--xs/src/libslic3r/Print.hpp26
1 files changed, 21 insertions, 5 deletions
diff --git a/xs/src/libslic3r/Print.hpp b/xs/src/libslic3r/Print.hpp
index 3a5d38ec3..f97f888cd 100644
--- a/xs/src/libslic3r/Print.hpp
+++ b/xs/src/libslic3r/Print.hpp
@@ -3,9 +3,8 @@
#include "libslic3r.h"
#include <set>
-#include <string>
#include <vector>
-#include <boost/thread.hpp>
+#include <string>
#include "BoundingBox.hpp"
#include "Flow.hpp"
#include "PrintConfig.hpp"
@@ -13,7 +12,7 @@
#include "Layer.hpp"
#include "Model.hpp"
#include "PlaceholderParser.hpp"
-
+#include "Slicing.hpp"
namespace Slic3r {
@@ -79,6 +78,10 @@ public:
std::map< size_t,std::vector<int> > region_volumes;
PrintObjectConfig config;
t_layer_height_ranges layer_height_ranges;
+
+ // Profile of increasing z to a layer height, to be linearly interpolated when calculating the layers.
+ // The pairs of <z, layer_height> are packed into a 1D array to simplify handling by the Perl XS.
+ std::vector<coordf_t> layer_height_profile;
// this is set to true when LayerRegion->slices is split in top/internal/bottom
// so that next call to make_perimeters() performs a union() before computing loops
@@ -137,7 +140,18 @@ public:
bool invalidate_state_by_config_options(const std::vector<t_config_option_key> &opt_keys);
bool invalidate_step(PrintObjectStep step);
bool invalidate_all_steps();
-
+
+ // Process layer_height_ranges, the raft layers and first layer thickness into layer_height_profile.
+ // The layer_height_profile may be later modified interactively by the user to refine layers at sloping surfaces.
+ void update_layer_height_profile();
+
+ // Collect the slicing parameters, to be used by variable layer thickness algorithm,
+ // by the interactive layer height editor and by the printing process itself.
+ // The slicing parameters are dependent on various configuration values
+ // (layer height, first layer height, raft settings, print nozzle diameter etc).
+ SlicingParameters slicing_parameters() const;
+
+ void _slice();
bool has_support_material() const;
void detect_surfaces_type();
void process_external_surfaces();
@@ -145,7 +159,7 @@ public:
void bridge_over_infill();
void _make_perimeters();
void _infill();
-
+
private:
Print* _print;
ModelObject* _model_object;
@@ -155,6 +169,8 @@ private:
// parameter
PrintObject(Print* print, ModelObject* model_object, const BoundingBoxf3 &modobj_bbox);
~PrintObject() {}
+
+ std::vector<ExPolygons> _slice_region(size_t region_id, const std::vector<float> &z, bool modifier);
};
typedef std::vector<PrintObject*> PrintObjectPtrs;