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

github.com/FormerLurker/ArcWelderLib.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'PyArcWelder/python_helpers.h')
-rw-r--r--PyArcWelder/python_helpers.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/PyArcWelder/python_helpers.h b/PyArcWelder/python_helpers.h
new file mode 100644
index 0000000..93ad23d
--- /dev/null
+++ b/PyArcWelder/python_helpers.h
@@ -0,0 +1,40 @@
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Arc Welder: Anti-Stutter Python Extension for the OctoPrint Arc Welder plugin.
+//
+// Compresses many G0/G1 commands into G2/G3(arc) commands where possible, ensuring the tool paths stay within the specified resolution.
+// This reduces file size and the number of gcodes per second.
+//
+// Copyright(C) 2020 - Brad Hochgesang
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// This program is free software : you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published
+// by the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
+// GNU Affero General Public License for more details.
+//
+//
+// You can contact the author at the following email address:
+// FormerLurker@pm.me
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+#pragma once
+#ifdef _DEBUG
+#undef _DEBUG
+#include <Python.h>
+#define _DEBUG
+#else
+#include <Python.h>
+#endif
+#include <string>
+namespace gcode_arc_converter {
+ int PyUnicode_SafeCheck(PyObject* py);
+ const char* PyUnicode_SafeAsString(PyObject* py);
+ PyObject* PyString_SafeFromString(const char* str);
+ PyObject* PyUnicode_SafeFromString(std::string str);
+ double PyFloatOrInt_AsDouble(PyObject* py_double_or_int);
+ long PyIntOrLong_AsLong(PyObject* value);
+ bool PyFloatLongOrInt_Check(PyObject* value);
+} \ No newline at end of file