This Instructable will teach you how to create generative objects with Processing code that can be 3d printed. One of the delights of using generative code to print things is that you can randomize certain elements so that every time you render a piece, it's completely unique. I was heavily inspired by the jewelry of Nervous System, which demonstrates this concept beautifully.

If you've never used Processing before, it may be helpful to look at a beginner tutorial first.

You will be using:

*There is a newer version now, Mk2 (however, the code in this tutorial was written before it came out and only works with the original Modelbuilder)

BTW, I'm using a Mac, but you should be able to do it with Windows and Linux too.

Step 1: Setting Up the Environment & Sketch

To get started, you should download both the applications needed, Processing and Netfabb.

You should also grab Modelbuilder's source code from Github. In the modelbuilder master folder, navigate to export > Modelbuilder v0007a03. The folder inside there, called modelbuilder, is what you should move into your Processing libraries folder.

Once you've got everything in the right place, open Processing and create a new sketch.

The code here shows the basics of what you need to initiate your model object and bring up a blank canvas. If it throws and error on the first line, make sure your ModelBuilder library is in the right place, and that within it, the 'unlekker' folder exists inside of 'src'.

<p>Hello,</p><p>As I am familiar with Processing I like your approach.</p><p>One question: would it be possible to generate just the surface, not care for the thickness, and have another tool care for the thickness?</p>
<p>I'm having trouble getting processing (v. 3.0) to import the Modelbuilder Library... Any suggestions?</p>
<p>New version here: <a href="https://github.com/katherinel/generative_pyramids_p3_0" rel="nofollow">https://github.com/katherinel/generative_pyramids_...</a></p><p>Grab the latest zip from the the export folder of the modelbuildermk2 repo. Put that in your Processing libraries folder.</p>
<p>Hi,</p><p>Is there something specific i should know about model.writeSTL? because, i copied your code, to see how it works, but i had some errors on writing STL files. </p>
<p>Would need to know what the errors are that you're getting...</p>
<p>The method writeSTL(String,ArrayList&lt;UGeo&gt;) in the type UGeo is not applicable for the arguments (generative_pyramids_p3_0, String)</p>
<p>Found a fix while poking around the library examples. In the modelbuilderMk2 version 0162, change on line 100: </p><p> model.writeSTL(this, &quot;Pyramids.stl&quot;);</p><p>to:</p><p> model.writeSTL(sketchPath(&quot;Pyramids.stl&quot;));</p>
<p>Unfortunately it's hard to debug this kind of stuff without seeing all of your code. A better place to get help would be posting to the Processing forums or Stackoverflow, or you can PM me directly.</p>
<p>Thank you for your explaination. It was very usefull to start with Modelbuilder!</p>
<p>Thank you, glad to hear!</p>
<p>Very good.</p>
<p>I love what you printed, the shapes are so interesting, also I really like the ones with the bows. It's awesome that you shared how you managed it, very useful to 3d printer people. Thanks for sharing!</p>
Thank you very much! :)

About This Instructable




More by katherinel:Pixelated Flower Lights Generative 3d Printing with Processing 
Add instructable to: