Minecraft structure planner to OpenSCAD Ruby converter

Minecraft structure planner to OpenSCAD Ruby converter

thingiverse

I've been working on this Ruby script on and off for a while now, but never felt it was ready for distribution. Then http://minecraftprint.com/ came along, and made me push an early version out. While I see the benefit of being able to search through an entire world and pick out the structure to print, it's not really an option for larger worlds, and the selection method seemed cumbersome. My idea is to use an established file format as the base for conversion - http://www.minecraftwiki.net/wiki/Schematic_File_Format The worldwide Minecraft communities create and read this format with an assortments of tools. At the server I play on, we use World Edit, with it you can select and save areas of the world to file very easy. To make it simpler to convert I send the schematic file through Minecraft structure planner which exports to xml. At the moment the script is VERY crude. It runs through a Minecraft Structure Planner xml file and creates a OpenSCAD file where it places a cube(); (and it's block type) every time it finds a block. Warning: This is the first time I've touched Ruby, so if you know how to use it, my sincere apologies in advance. I hope someone else might want to build upon this work/idea. :-) Planned improvements: Converting slabs, stairs, fences and perhaps other objects. Using a special block for support structure. Output optimization so it's possible to convert large structures. Future improvements: Reading the World Edit schematic files directly. Exporting to stl directly with World Edit? Instructions In short: Use world edit to save schematic, convert it to xml with minecraft structure planner, run mc.rb and use OpenScad to convert the file to stl. In long: You need Ruby - http://www.ruby-lang.org/ and the xmlsimple gem - http://xml-simple.rubyforge.org/ Minecraft Structure Planner (MSP) - http://minecraftstructureplanner.com/ I have only tried to convert others schematics, and simple ones I've made myself in MSP. But here's some pointers to how you could go along: To copy buildings from a server it needs to run Bukkit - http://www.bukkit.org - with World Edit - http://www.minecraftforum.net/topic/42214-pluginbukkit-worldedit-32-feature-rich-13-01/ For single player you can use single player commands and World Edit - http://www.minecraftforum.net/topic/94310-173-single-player-commands-v210-2-another-new-update/ Select the area you want to copy/print. ( I like to use //wand ) Use //save filename Somehow fish out the .schematic file from the server folder. Import the schematic file into MSP and save it in the MSP xml format, in the same folder as mc.rb. Rename the file test.xsp (or edit mc.rb and change the file name) Run mc.rb Open test.scad and enjoy your work. Notes/limitations: There's a hard limit on (I guess) the number of objects possible in OpenSCAD, and since it converts every single block as a cube(); it reaches that limit pretty fast. So this version only works with small buildings. There need to be at least one block in every column, as there's no check for empty columns at the moment. The easiest way to fix this is to lay a full base on the first layer. OpenSCAD takes forever to render the file. The object might come out mirrored, as I can't quite recall which version I fixed that in. :-P

Download Model from thingiverse

With this file you will be able to print Minecraft structure planner to OpenSCAD Ruby converter with your 3D printer. Click on the button and save the file on your computer to work, edit or customize your design. You can also find more 3D designs for printers on Minecraft structure planner to OpenSCAD Ruby converter.