Hey! This thing is still a Work in Progress. Files, instructions, and other stuff might change!
Minecraft structure planner to OpenSCAD Ruby converter
by Nudel_P, published
Use This Project
Give a Shout Out
If you print this Thing and display it in public proudly give attribution by printing and displaying this tag.Print Thing Tag
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. :-)
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.
Reading the World Edit schematic files directly.
Exporting to stl directly with World Edit?
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.
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)
Open test.scad and enjoy your work.
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
Upgrade this Thing with Thingiverse AppsCustomization
Edit, personalize, or revise this ThingPrint Fulfilment
Order a print of this ThingTools and Utilities
Repair, slice, or enhance this Thing
Minecraft structure planner to OpenSCAD Ruby converter by Nudel_P is licensed under the Creative Commons - Attribution - Share Alike license.
What does this mean?
- You must attribute (give credit) to the creator of this Thing.
- You must distribute Remixes under the same license as the original.
- Remixing or Changing this Thing is allowed.
- Commercial use is allowed.
Show Some Love
Say thanks by giving Nudel_P a tip and help them continue to share amazing Things with the Thingiverse community.Tip Designer
We're sure Nudel_P would love to see what you've printed. Please document your print and share a Make with the community.
To post a Make simply visit this Thing again and click I Made One to start uploading your photo. It’s even easier to post a Make via the Thingiverse Mobile app (available via Google Play and Apple App Store).