{"id":12,"date":"2016-11-02T17:47:00","date_gmt":"2016-11-02T17:47:00","guid":{"rendered":""},"modified":"2021-05-23T17:00:28","modified_gmt":"2021-05-23T16:00:28","slug":"converting-3mf-files-to-stl","status":"publish","type":"post","link":"https:\/\/blog.hslracing.com\/3dprinters\/2016\/11\/converting-3mf-files-to-stl.html","title":{"rendered":"Converting 3MF Files to STL"},"content":{"rendered":"<p>When I create new items in Google <a href=\"http:\/\/www.sketchup.com\/\">Sketchup<\/a>, they sometimes have holes in them when I export them as STereoLitography or&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/STL_(file_format)\">STL<\/a> files, as such I usually make use of the&nbsp;<a href=\"https:\/\/www.microsoft.com\/\">Microsoft<\/a>&nbsp;repair service on <a href=\"https:\/\/tools3d.azurewebsites.net\/\">Azure<\/a>.<\/p>\n<p>This allows you to upload an&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/STL_(file_format)\">STL<\/a>&nbsp;file, the site will repair the holes and then allow you to download a repaired&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/STL_(file_format)\">STL<\/a>&nbsp;file of your model.<\/p>\n<p>Unfortunately,&nbsp;<a href=\"https:\/\/www.microsoft.com\/\">Microsoft<\/a>&nbsp;being&nbsp;<a href=\"https:\/\/www.microsoft.com\/\">Microsoft<\/a>, along with a bunch of other big companies decided they wanted&nbsp;to&nbsp;use a file format that had Digital Rights Management&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Digital_rights_management\">DRM<\/a>&nbsp;encoded into them and so the <a href=\"https:\/\/en.wikipedia.org\/wiki\/3D_Manufacturing_Format\">3MF<\/a> file format was born.<\/p>\n<p>At some time in the recent past,&nbsp;<a href=\"https:\/\/www.microsoft.com\/\">Microsoft<\/a>&nbsp;updated their repair service so it now only exports&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/3D_Manufacturing_Format\">3MF<\/a>&nbsp;files &#8211; great &#8211; let&#8217;s stuff the free community!<\/p>\n<p><a href=\"https:\/\/www.repetier.com\/\">Repetier<\/a> Host, <a href=\"http:\/\/slic3r.org\/\">Slic3r<\/a>, etc do not support the&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/3D_Manufacturing_Format\">3MF<\/a>&nbsp;format, although <a href=\"https:\/\/ultimaker.com\/en\/products\/cura-software\">Cura<\/a> does, but only because the people that write it &#8211;&nbsp;<a href=\"https:\/\/ultimaker.com\/\">Ultimaker<\/a> are part of the <a href=\"http:\/\/3mf.io\/\">3MF Consortium<\/a>.<\/p>\n<p>Windows 8 and 10 users can use the <a href=\"https:\/\/www.microsoft.com\/\">Microsoft<\/a> App <a href=\"https:\/\/www.microsoft.com\/en-gb\/store\/p\/3d-builder\/9wzdncrfj3t6\">3D Builder<\/a> to convert their&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/3D_Manufacturing_Format\">3MF<\/a>&nbsp;files back to&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/STL_(file_format)\">STL<\/a>&nbsp;format, however I don&#8217;t have any Windows machines and only use a Mac, so I need to look a bit further afield.<\/p>\n<p>So I go looking for a potential solution, and find one on released on&nbsp;<a href=\"https:\/\/github.com\/\">GitHub<\/a> by Charles Shapiro called <a href=\"https:\/\/github.com\/lemgandi\/3mf2stl\">3mf2stl<\/a>.<\/p>\n<p>This is intended as a Linux solution to the problem, but I see no reason why it should not also work on a Mac as this is also Unix based.<\/p>\n<p>I download the source code, extract it and type &#8216;make&#8217; in the top level directory (OK, so it only has a top level).<\/p>\n<p>First stumbling block is that it requires libzip &#8211; no problem, that is available via the <a href=\"http:\/\/macappstore.org\/libzip\/\">App store<\/a> and is a pretty simple command line install.<\/p>\n<p>Second stumbling block, libzip won&#8217;t actually install because my version of <a href=\"https:\/\/itunes.apple.com\/gb\/app\/xcode\/id497799835?mt=12\">Xcode<\/a> is out of date and I need to update to 8.1.<\/p>\n<p>Third stumbling block, after waiting the best part of an hour for&nbsp;<a href=\"https:\/\/itunes.apple.com\/gb\/app\/xcode\/id497799835?mt=12\">Xcode<\/a>&nbsp;to upgrade itself, libzip will now install, however the make file is still not finding zip.h from \/usr\/local\/include.<\/p>\n<p>This requires re-installing the&nbsp;<a href=\"https:\/\/itunes.apple.com\/gb\/app\/xcode\/id497799835?mt=12\">Xcode<\/a>&nbsp;command line utilities by running &#8216;xcode-select &#8211;install&#8217; at the command line.<\/p>\n<p>Fourth stumbling block, now make can find zip.h, however it now barfs about zipconf.h, which is not actually held in \/usr\/local\/include.<\/p>\n<p>This is fixed by creating a link to its real location &#8211; &#8216;cd \/usr\/local\/include; ln -s ..\/Cellar\/libzip\/1.1.2\/lib\/libzip\/include\/zipconf.h&#8217;<\/p>\n<p>This time make runs through cleanly and produces an executable &#8211; 3mf2stl, which I then copy to \/usr\/local\/bin.<\/p>\n<p>Now I can convert my&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/3D_Manufacturing_Format\">3MF<\/a>&nbsp;files to&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/STL_(file_format)\">STL<\/a>&nbsp;by running: 3mf2stl -i &lt;input file&gt; -o &lt;output file&gt;<\/p>\n<p>Since writing the above I have now found another free service for repairing STL files and that is at <a href=\"https:\/\/service.netfabb.com\/\">Netfabb<\/a>, this is part of Autodesk and requires an account, but is free to register for one and free to use.<\/p>\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>When I create new items in Google Sketchup, they sometimes have holes in them when I export them as STereoLitography or&nbsp;STL files, as such I usually make use of the&nbsp;Microsoft&nbsp;repair service on Azure. This allows you to upload an&nbsp;STL&nbsp;file, the site will repair the holes and then allow you to download a repaired&nbsp;STL&nbsp;file of your&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-12","post","type-post","status-publish","format-standard","hentry","category-uncategorised"],"_links":{"self":[{"href":"https:\/\/blog.hslracing.com\/3dprinters\/wp-json\/wp\/v2\/posts\/12","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.hslracing.com\/3dprinters\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.hslracing.com\/3dprinters\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.hslracing.com\/3dprinters\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.hslracing.com\/3dprinters\/wp-json\/wp\/v2\/comments?post=12"}],"version-history":[{"count":2,"href":"https:\/\/blog.hslracing.com\/3dprinters\/wp-json\/wp\/v2\/posts\/12\/revisions"}],"predecessor-version":[{"id":267,"href":"https:\/\/blog.hslracing.com\/3dprinters\/wp-json\/wp\/v2\/posts\/12\/revisions\/267"}],"wp:attachment":[{"href":"https:\/\/blog.hslracing.com\/3dprinters\/wp-json\/wp\/v2\/media?parent=12"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.hslracing.com\/3dprinters\/wp-json\/wp\/v2\/categories?post=12"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.hslracing.com\/3dprinters\/wp-json\/wp\/v2\/tags?post=12"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}