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>2016-09-12 17:25:15 +0300
committerbubnikv <bubnikv@gmail.com>2016-09-12 17:25:15 +0300
commitf518e0675c5672215c9543dae36a068f7c56b4c4 (patch)
treecd5c4574036d40392a376f6e547d22e190adacc6 /xs/xsp/GCodePressureEqualizer.xsp
parent73cbb4b5dceab3e39b0a5d92d27c1fe52f3b3116 (diff)
Initial commit of the new Pressure Equalizer, the EdgeGrid
signed distance field structure. The EdgeGrid is used to avoid placing the seams on overhangs.
Diffstat (limited to 'xs/xsp/GCodePressureEqualizer.xsp')
-rw-r--r--xs/xsp/GCodePressureEqualizer.xsp32
1 files changed, 32 insertions, 0 deletions
diff --git a/xs/xsp/GCodePressureEqualizer.xsp b/xs/xsp/GCodePressureEqualizer.xsp
new file mode 100644
index 000000000..39372e0e0
--- /dev/null
+++ b/xs/xsp/GCodePressureEqualizer.xsp
@@ -0,0 +1,32 @@
+%module{Slic3r::XS};
+
+%{
+#include <xsinit.h>
+#include "libslic3r/GCode/PressureEqualizer.hpp"
+%}
+
+%name{Slic3r::GCode::PressureEqualizer} class GCodePressureEqualizer {
+ GCodePressureEqualizer(StaticPrintConfig* config)
+ %code%{ RETVAL = new GCodePressureEqualizer(dynamic_cast<GCodeConfig*>(config)); %};
+ ~GCodePressureEqualizer();
+
+ void reset();
+
+ // Process a next batch of G-code lines. Flush the internal buffers if asked for.
+// const char* process(const char *szGCode, bool flush);
+// std::string process(const char *szGCode, bool flush)
+// %code{% const char *out = THIS->process(szGCode, flush); RETVAL = (out == NULL) ? "" : std::string(out); %};
+
+%{
+
+SV*
+GCodePressureEqualizer::process(const char *szGCode, bool flush)
+ CODE:
+ const char *out = THIS->process(szGCode, flush);
+ RETVAL = newSVpv(out, THIS->get_output_buffer_length());
+ OUTPUT:
+ RETVAL
+
+%}
+
+};