Jump to content




[OpenComputers] print3d


1 reply to this topic

#1 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 17 July 2018 - 05:06 PM

pastebin get Lr9UyrkR print3d

Posted Image


Allows a Command Computer to produce 3D Prints, as though it were a 3D Printer from OpenComputers.

(OpenComputers must obviously be installed.)

Usage:

print3d <fileName> [count]

... where the file is a 3dm object. The script will /give the result to the nearest player, and also save a text file with the "give" command to disk.

3dm files depict models using Lua tables (formatted per this example). Each can be no larger than a single block, although multiple prints can be stacked in the world to create larger builds.

As this script is only accessible to operators, regular OpenComputers printing limitations are disregarded: the per-model shape limit is removed (no "model too complex" errors), and flat shapes also become possible (no "empty block" errors).

You can gain ready access to this sample collection of models with BBPack:

bbpack mount https://github.com/OpenPrograms/Sangar-Programs/tree/master/models models
print3d models/whatever.3dm

And here's the shape from the screenshot above:

pastebin get NvDBMD7f Thingy.3dm

Version History

Edited by Bomb Bloke, 25 July 2018 - 11:57 AM.


#2 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 25 July 2018 - 11:49 AM

I've made a companion script which expands on the main one a bit; with them both installed, you can generate 3D models of Minecraft character skins:

pastebin get 1K7x1Dx2 3dmChar

Skins need to be saved as GIF files - use Paint.NET or something that understands the concept of transparency.

Fair warning, there's a large amount of NBT data in these models. After putting out a half dozen or so you'll notice that placing / destroying further blocks within the same chunk becomes slow. Wouldn't surprise me if too many statues would lead to world corruption, so don't go overboard!

Edited by Bomb Bloke, 25 July 2018 - 11:54 AM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users