diff --git a/fablabchemnitz_papercraft_unfold_ascii.inx b/InkScape 0.92.X/fablabchemnitz_papercraft_unfold_ascii.inx similarity index 100% rename from fablabchemnitz_papercraft_unfold_ascii.inx rename to InkScape 0.92.X/fablabchemnitz_papercraft_unfold_ascii.inx diff --git a/fablabchemnitz_papercraft_unfold_ascii.py b/InkScape 0.92.X/fablabchemnitz_papercraft_unfold_ascii.py similarity index 100% rename from fablabchemnitz_papercraft_unfold_ascii.py rename to InkScape 0.92.X/fablabchemnitz_papercraft_unfold_ascii.py diff --git a/fablabchemnitz_papercraft_unfold_binary.inx b/InkScape 0.92.X/fablabchemnitz_papercraft_unfold_binary.inx similarity index 100% rename from fablabchemnitz_papercraft_unfold_binary.inx rename to InkScape 0.92.X/fablabchemnitz_papercraft_unfold_binary.inx diff --git a/fablabchemnitz_papercraft_unfold_binary.py b/InkScape 0.92.X/fablabchemnitz_papercraft_unfold_binary.py similarity index 100% rename from fablabchemnitz_papercraft_unfold_binary.py rename to InkScape 0.92.X/fablabchemnitz_papercraft_unfold_binary.py diff --git a/InkScape 1.0/fablabchemnitz_papercraft_unfold_ascii.inx b/InkScape 1.0/fablabchemnitz_papercraft_unfold_ascii.inx new file mode 100644 index 0000000..f3cca11 --- /dev/null +++ b/InkScape 1.0/fablabchemnitz_papercraft_unfold_ascii.inx @@ -0,0 +1,15 @@ + + + <_name>Papercraft Unfold ASCII + fablabchemnitz.de.papercraft_unfold_ascii + fablabchemnitz_papercraft_unfold_ascii.py + + .stl + application/sla + <_filetypename>Unfoldable Stereolitography File ASCII (*.stl) + <_filetypetooltip>Unfold STL Files + + + \ No newline at end of file diff --git a/InkScape 1.0/fablabchemnitz_papercraft_unfold_ascii.py b/InkScape 1.0/fablabchemnitz_papercraft_unfold_ascii.py new file mode 100644 index 0000000..b355a26 --- /dev/null +++ b/InkScape 1.0/fablabchemnitz_papercraft_unfold_ascii.py @@ -0,0 +1,37 @@ +import sys +from subprocess import Popen +import subprocess +import inkex +import os +from lxml import etree + +class Unfold(inkex.Effect): + def __init__(self): + inkex.Effect.__init__(self) + stl_filename = sys.argv[1] + #inkex.utils.debug("stl_filename: "+stl_filename) + if os.name=="nt": + outname = "papercraft_unfold_output.svg" + #remove old file if existent + if os.path.exists(outname): + os.remove(outname) + if os.path.exists("unfold.exe.stackdump"): + os.remove("unfold.exe.stackdump") + #convert the STL to have a binary one and wait until conversion finished before running papercraft + cmd = os.getcwd() + "\\papercraft\\STLConverter.exe" + " \"" + stl_filename + "\"" + p = Popen(cmd, shell=True) + #inkex.utils.debug(cmd) + #inkex.utils.debug("os.getcwd(): "+os.getcwd()) + #inkex.utils.debug(os.path.splitext(stl_filename)[0]) + p.wait() + cmd2 = os.getcwd() + "\\papercraft\\unfold.exe" + " < \"" + os.path.splitext(stl_filename)[0] + "-binary.stl\" > " + outname + #inkex.utils.debug("cmd2: "+cmd2) + p2 = Popen(cmd2, shell=True) + #inkex.utils.debug(p2.communicate()) + p2.wait() + if p2.returncode == 0: + #inkex.utils.debug("OK") + doc = etree.parse(os.getcwd() + "\\" + outname) + doc.write(sys.stdout.buffer) +if __name__ == '__main__': + gc = Unfold() \ No newline at end of file diff --git a/InkScape 1.0/fablabchemnitz_papercraft_unfold_binary.inx b/InkScape 1.0/fablabchemnitz_papercraft_unfold_binary.inx new file mode 100644 index 0000000..7380afb --- /dev/null +++ b/InkScape 1.0/fablabchemnitz_papercraft_unfold_binary.inx @@ -0,0 +1,15 @@ + + + <_name>Papercraft Unfold Binary + fablabchemnitz.de.papercraft_unfold_binary + fablabchemnitz_papercraft_unfold_binary.py + + .stl + application/sla + <_filetypename>Unfoldable Stereolitography File Binary (*.stl) + <_filetypetooltip>Unfold STL Files + + + \ No newline at end of file diff --git a/InkScape 1.0/fablabchemnitz_papercraft_unfold_binary.py b/InkScape 1.0/fablabchemnitz_papercraft_unfold_binary.py new file mode 100644 index 0000000..17cb15a --- /dev/null +++ b/InkScape 1.0/fablabchemnitz_papercraft_unfold_binary.py @@ -0,0 +1,33 @@ +import sys +from subprocess import Popen +import subprocess +import inkex +import os +from lxml import etree + +class Unfold(inkex.Effect): + def __init__(self): + inkex.Effect.__init__(self) + stl_filename = sys.argv[1] + #inkex.utils.debug("stl_filename: "+stl_filename) + if os.name=="nt": + outname = "papercraft_unfold_output.svg" + #remove old file if existent + if os.path.exists(outname): + os.remove(outname) + if os.path.exists("unfold.exe.stackdump"): + os.remove("unfold.exe.stackdump") + #inkex.utils.debug("os.getcwd(): "+os.getcwd()) + #inkex.utils.debug(os.path.splitext(stl_filename)[0]) + cmd = os.getcwd() + "\\papercraft\\unfold.exe" + " < \"" + stl_filename + "\" > " + outname + #inkex.utils.debug("cmd: "+cmd) + p = Popen(cmd, shell=True) + #inkex.utils.debug(p.communicate()) + p.wait() + if p.returncode == 0: + #inkex.utils.debug("OK") + doc = etree.parse(os.getcwd() + "\\" + outname) + #inkex.utils.debug(etree.tostring(doc)) + doc.write(sys.stdout.buffer) +if __name__ == '__main__': + gc = Unfold() \ No newline at end of file diff --git a/gallery-banner-quickanddirty.png b/gallery-banner-quickanddirty.png new file mode 100644 index 0000000..3bb708d Binary files /dev/null and b/gallery-banner-quickanddirty.png differ diff --git a/gallery-banner-quickanddirty.svg b/gallery-banner-quickanddirty.svg new file mode 100644 index 0000000..d3c5f0f --- /dev/null +++ b/gallery-banner-quickanddirty.svg @@ -0,0 +1,1975 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Papercraft Unfold + + diff --git a/papercraft/STLConverter.exe b/papercraft/STLConverter.exe new file mode 100644 index 0000000..c8afaf0 Binary files /dev/null and b/papercraft/STLConverter.exe differ