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

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbubnikv <bubnikv@gmail.com>2017-02-09 16:56:13 +0300
committerbubnikv <bubnikv@gmail.com>2017-02-09 16:56:13 +0300
commit88e34ff5de846302f0a726478b4a164322a33727 (patch)
treec55fb1b421cd5bf4aacd8391b212f9f57add010b /xs/src/libslic3r/Print.hpp
parent61c0ae4e9484cb6e3c60a804b1c08409d3e870f6 (diff)
Store / retrieve layer height profile from the AMF file.
Reset the layer height profile when changing a print profile to an incompatible one. Reset button on the layer height bar. Fixed an update issue on zooming by a scroll wheel. Fixed an issue when loading an AMF file: Object names are now retained.
Diffstat (limited to 'xs/src/libslic3r/Print.hpp')
-rw-r--r--xs/src/libslic3r/Print.hpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/xs/src/libslic3r/Print.hpp b/xs/src/libslic3r/Print.hpp
index 02b2ea363..30d49b236 100644
--- a/xs/src/libslic3r/Print.hpp
+++ b/xs/src/libslic3r/Print.hpp
@@ -85,7 +85,13 @@ public:
// 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.
+ // layer_height_profile must not be set by the background thread.
std::vector<coordf_t> layer_height_profile;
+ // There is a layer_height_profile at both PrintObject and ModelObject. The layer_height_profile at the ModelObject
+ // is used for interactive editing and for loading / storing into a project file (AMF file as of today).
+ // This flag indicates that the layer_height_profile at the UI has been updated, therefore the backend needs to get it.
+ // This flag is necessary as we cannot safely clear the layer_height_profile if the background calculation is running.
+ bool layer_height_profile_valid;
// 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
@@ -145,10 +151,16 @@ public:
bool invalidate_step(PrintObjectStep step);
bool invalidate_all_steps();
+ // To be used over the layer_height_profile of both the PrintObject and ModelObject
+ // to initialize the height profile with the height ranges.
+ bool update_layer_height_profile(std::vector<coordf_t> &layer_height_profile) const;
+
// 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.
bool update_layer_height_profile();
+ void reset_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