Tags: 3d, 3D printing, Code, digital-fabrication, library, makerbot, modelbuilder, processing.org, stl
MakerBot models built with code included with the ModelBuilder library, also downloadable from my Thingiverse account
Update, July 1 2011: I’ve uploaded ModelBuilder v0004, which fixes a few really silly bugs in 0003. Download it from http://code.google.com/p/codeandform/.
I’m happy to announce the first public release of my new ModelBuilder library, created as part of my artist-in-residence project at MakerBot Industries and beta tested in the Interactive Parametrics workshop. The occasion for today’s release is the MakerBot User Group New York, where I’ll talk about the library and show off my MakerBot models.
ModelBuilder focuses on functions useful for digital fabrication purposes, such as creating meshes, centering models around origin, scaling to given dimensions, output to STL format etc. It emulates Processing’s beginShape / vertex / endShape logic to build mesh geometry which can then be manipulated and transformed.
The UVertexList class allows the user to build paths of vertices. Vertex lists are then fed into various UGeometry.quadStrip() functions to construct quad strip meshes, most likely eliminating the need for dozens of for loops in the process. See the online copy of the ModelBuilder JavaDoc for a more complete overview.
Coders using the library to output models for 3D printing need to be aware of face orientation (see Wikipedia: Handedness) so that face normals are generated correctly.
Always check models to see if face normals are correct before attempting to 3D print them. As always, I recommed the Open Source tool MeshLab for previewing and testing models. MeshLab will render backwards-facing faces as all black, giving an easy preview of incorrect geometry.
Happy mesh building, look forward to seeing models on Thingiverse!
Download modelbuilder-0004.zip and unpack it. Copy the “modelbuilder” folder to your “libraries” folder and restart Processing. If you have the now obsolete unlekkerLib installed you should remove it before adding ModelBuilder, which effectively replaces unlekkerLib.
The ModelBuilder library folder includes (rudimentary) JavaDoc documentation, the library source code and a series of examples located in “modelbuilder/examples”. The most advanced example is mb_04_gui_parametric, which contains the code used to create MakerBot prints shown above. The “gui” examples use Andreas Schlegel’s ControlP5 library, which must be downloaded and installed before running them.
This should be considered an experimental in-progress release and some features are likely to change. As usual, niceties like good documentation have been left for last, so the best way to get a feel for the library is to run through the examples provided. Bug and / or success reports are welcome, just leave comments on this post.







hi marius, excited about the modelbuilder lib, gave it a try and ran through the examples. i got some erros when first running it though. hunting down the causes told me that there is a conflict of interest with having both the modelBuilder and the unlekkerlib (latest version for me) installed at the same time. i removed the unlekkerlib and everything was running smoothly. just in case this happens to someone else, too.
Hi Andreas, happy to hear you’re testing the new lib. I’ve been using your controlP5 as a GUI component for parametric modelling.
unlekkerLib might give conflicts, but it should be considered obsolete as of this release so you can safely delete it from your libraries folder. If there’s any functionality you miss from the old unlekkerLib please let me know, although I can’t imagine anything that’s not done better by either the new library or toxicLibs etc.
My version of the TileSaver function has been broken for a long time now, I use Karsten’s version myself…
[...] created shapes using Mariuz Waltz’s ModelBuilder Library examples that were proportionally based on the recent budget cut proposal to NSHE. In this [...]
Hi Marius,
Just downloaded your library. Great! Exactly what I needed to make my exhibition next week. (Was going a bit mad trying to turn default Processing DXFs into STLs.)
Looks like the exhibition is saved, many thanks to you.
regards
phil
[...] this tutorial I will introduce you to the world of 3d Printing and Processing using the ModelBuilder library by Marius [...]
Excellent post with interesting comments. I will be watching for new comments
Norman Patrick
_________________________________________
Fire Blanket | Fire safety | Cash collection trolley
Hi Marius,
I have some enquires with regards to the importing and exporting of the .stl file format.
I am currently creating a GUI whereby I need to import a .stl file into the canvas.
I have read the javadoc and it is clear that I needed to use this particular constructor:
Public STL (processing.core PApplet applet, java.lang.String path)
{
path = “url”;
}
However, I always got an error.
If it is at all possible, could you upload a simple example on import .stl file into the canvas of GUI?
Thank you very much!
Best Regards,
asobu
The current Modelbuilder library doesn’t support reading STL, only export, so I’m not sure where you’re getting that constructor from. Can you provide a little more context for the code you’re using?
I will be posting a Modelbuilder update in the next few weeks, and that will include STL import.
[...] a design for one of the Makerbots donated to the event, an open-source 3d printing machine. Using Marius Watz’s model-building library for Processing, I created a program which transcodes a song into a 3d representation of its [...]
Whey protein is obviously the red hot issue in most gym. It’s the so-called very best proteins regarding muscle building. Let’s take a look from pure whey protein being a muscle tissue creator on this part …Brickwork in London