MakerBot models 5486

MakerBot models built with code included with the ModelBuilder library, also downloadable from my Thingiverse account

Update, April 24 2012: Modelbuilder-0007a01 with complete source and new examples is now on Github: https://github.com/mariuswatz/modelbuilder. Download the exportded/modelbuilder-0007a01.zip for the latest version packaged and ready for use in Processing (1.5.1 only…)

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

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.

12 Comments »

There are 12 comments to "Code: ModelBuilder library – first public release". You may leave your own comment.
1. Andreas, April 7th, 2011 at 07:04

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.

2. marius watz, April 7th, 2011 at 08:29

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…

3. Final Project: “Make or Cut” | Chexee in a few words., May 5th, 2011 at 17:04

[...] created shapes using Mariuz Waltz’s ModelBuilder Library examples that were proportionally based on the recent budget cut proposal to NSHE. In this [...]

4. phil jones, May 31st, 2011 at 17:27

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

5. Tutorial: The ModelBuilder Library For Processing & 3d Printing | RJ Duran: Hybrid Media Technologist, August 31st, 2011 at 03:31

[...] this tutorial I will introduce you to the world of 3d Printing and Processing using the ModelBuilder library by Marius [...]

6. fire blanket, September 13th, 2011 at 23:58

Excellent post with interesting comments. I will be watching for new comments

7. Norman Patrick, September 28th, 2011 at 15:33

Norman Patrick
_________________________________________

Fire Blanket | Fire safety | Cash collection trolley

8. asobu, December 20th, 2011 at 06:45

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

9. marius watz, January 17th, 2012 at 15:57

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.

10. Art Hack Day, generative, ScratchML, Makerbot, fabrication | Culture Hacking, January 31st, 2012 at 07:39

[...] 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 [...]

11. asobu, March 7th, 2012 at 06:04

Marius,
I found this constructor in the following url:
http://workshop.evolutionzone.com/files/unlekkerLibDoc/unlekker/data/STL.html
thanks:)

12. We Coded, Drank & Conquered, (Model Builder amongst other things). : Free Art Bureau, April 18th, 2012 at 19:52

[...] on a variety of approaches and tools from generative systems and interactive worlds to the great ModelBuilder and Box 2D libraries to name but a few. When you give these systems to a culturally and [...]

Comment on this entry

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">