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-09-14 17:31:26 +0300
committerbubnikv <bubnikv@gmail.com>2016-09-14 17:31:26 +0300
commit2a5095a1ea6053270e6e382d52d53c07f87f5fcc (patch)
tree2534d25665bdba631438a9b480acba99e7650750 /xs/src/libslic3r
parent266e1c4be1741829a6dc8e54beb7437f096a0ac6 (diff)
OpenGL support through GLEW. Only active if compiled with SLIC3R_GUI=1.
Diffstat (limited to 'xs/src/libslic3r')
-rw-r--r--xs/src/libslic3r/EdgeGrid.cpp19
-rw-r--r--xs/src/libslic3r/EdgeGrid.hpp2
-rw-r--r--xs/src/libslic3r/Print.cpp4
3 files changed, 18 insertions, 7 deletions
diff --git a/xs/src/libslic3r/EdgeGrid.cpp b/xs/src/libslic3r/EdgeGrid.cpp
index bc60ff4ad..54cda9f8c 100644
--- a/xs/src/libslic3r/EdgeGrid.cpp
+++ b/xs/src/libslic3r/EdgeGrid.cpp
@@ -2,7 +2,9 @@
#include <vector>
#include <float.h>
+#ifdef SLIC3R_GUI
#include <wx/image.h>
+#endif /* SLIC3R_GUI */
#include "libslic3r.h"
#include "EdgeGrid.hpp"
@@ -551,7 +553,8 @@ void EdgeGrid::Grid::calculate_sdf()
}
}
-#if 1
+#if 0
+//#ifdef SLIC3R_GUI
{
wxImage img(ncols, nrows);
unsigned char *data = img.GetData();
@@ -609,7 +612,7 @@ void EdgeGrid::Grid::calculate_sdf()
}
img.SaveFile("out\\signed_df.png", wxBITMAP_TYPE_PNG);
}
-#endif
+#endif /* SLIC3R_GUI */
// 2) Propagate the signum.
#define PROPAGATE_SIGNUM_SINGLE_STEP(DELTA) do { \
@@ -681,7 +684,8 @@ void EdgeGrid::Grid::calculate_sdf()
}
}
-#if 1
+#if 0
+//#ifdef SLIC3R_GUI
{
wxImage img(ncols, nrows);
unsigned char *data = img.GetData();
@@ -733,9 +737,10 @@ void EdgeGrid::Grid::calculate_sdf()
}
img.SaveFile("out\\signed_df-signs.png", wxBITMAP_TYPE_PNG);
}
-#endif
+#endif /* SLIC3R_GUI */
-#if 1
+#if 0
+//#ifdef SLIC3R_GUI
{
wxImage img(ncols, nrows);
unsigned char *data = img.GetData();
@@ -761,7 +766,7 @@ void EdgeGrid::Grid::calculate_sdf()
}
img.SaveFile("out\\signed_df2.png", wxBITMAP_TYPE_PNG);
}
-#endif
+#endif /* SLIC3R_GUI */
}
float EdgeGrid::Grid::signed_distance_bilinear(const Point &pt) const
@@ -932,6 +937,7 @@ bool EdgeGrid::Grid::signed_distance(const Point &pt, coord_t search_radius, coo
return true;
}
+#ifdef SLIC3R_GUI
void EdgeGrid::save_png(const EdgeGrid::Grid &grid, const BoundingBox &bbox, coord_t resolution, const char *path)
{
unsigned int w = (bbox.max.x - bbox.min.x + resolution - 1) / resolution;
@@ -1022,5 +1028,6 @@ void EdgeGrid::save_png(const EdgeGrid::Grid &grid, const BoundingBox &bbox, coo
img.SaveFile(path, wxBITMAP_TYPE_PNG);
}
+#endif /* SLIC3R_GUI */
} // namespace Slic3r
diff --git a/xs/src/libslic3r/EdgeGrid.hpp b/xs/src/libslic3r/EdgeGrid.hpp
index 860b1f647..959165866 100644
--- a/xs/src/libslic3r/EdgeGrid.hpp
+++ b/xs/src/libslic3r/EdgeGrid.hpp
@@ -72,8 +72,10 @@ protected:
std::vector<float> m_signed_distance_field;
};
+#ifdef SLIC3R_GUI
// Debugging utility. Save the signed distance field.
extern void save_png(const Grid &grid, const BoundingBox &bbox, coord_t resolution, const char *path);
+#endif /* SLIC3R_GUI */
} // namespace EdgeGrid
} // namespace Slic3r
diff --git a/xs/src/libslic3r/Print.cpp b/xs/src/libslic3r/Print.cpp
index 185c59aad..329843f5c 100644
--- a/xs/src/libslic3r/Print.cpp
+++ b/xs/src/libslic3r/Print.cpp
@@ -235,7 +235,9 @@ Print::invalidate_state_by_config_options(const std::vector<t_config_option_key>
|| *opt_key == "use_relative_e_distances"
|| *opt_key == "vibration_limit"
|| *opt_key == "wipe"
- || *opt_key == "z_offset") {
+ || *opt_key == "z_offset"
+ || *opt_key == "max_volumetric_extrusion_rate_slope_negative"
+ || *opt_key == "max_volumetric_extrusion_rate_slope_positive") {
// these options only affect G-code export, so nothing to invalidate
} else if (*opt_key == "first_layer_extrusion_width") {
osteps.insert(posPerimeters);