Thursday, December 13, 2012

Open Source Topology Optimization for 3D Printing

Rough Hex Output & Smooth Surface Reconstruction for Dogleg
This post describes a set of open source tools for simple topology optimization for parts destined for 3D printing. The two Matlab codes (both are plain vanilla Matlab, so they work successfully in Octave too) are good introductions to topology optimization. The papers that go along with the codes provide great documentation and examples of tweaking and changing the scripts to treat various problems. The python implementation is more capable (and a few more lines of code).

  • 99 line Matlab code: 2D, multiple load cases, works in Octave
  • 88 line Matlab code: 2D, faster, multiple load cases, filtering options, works in Octave
  • ToPy: implementation of 99 line method, extension to 3D, can also do heat conduction topology optimization, VTK output
The ToPy code outputs results in VTK format. I used paraview to convert the VTK file to an x3d file. I then read the x3d file into Meshlab. Once in meshlab I delete all of the faces, Filters-->Selection-->Select All, Filters-->Selection-->Delete Selected Faces, and then reconstruct the surface from the remaining point cloud, Filters-->Remeshing, simplification and reconstruction-->Surface Reconstruction: Poisson.

The default settings seem to give pretty nice results that can be exported in stl format for 3D printing.

Here's the dogleg part printed on Dayton Diode's printrbot:


  1. More free codes here and here from Dr Suresh's group at University of Wisconsin; some youtube vids as well.

  2. This comment has been removed by the author.

  3. This comment has been removed by the author.

  4. You are therefore great! I do not imagine I have study such a thing such as this only before. Therefore great to find someone by adding unique ideas on that subject. Actually we recognize you start that up. That internet site is some issues that are needed on the net, someone with only a little originality. Useful benefit providing anything completely new to your web! hp oj 7740 setup

  5. Awesome information! I as of late ran over your online journal and have been perusing along. I thought I would leave my first remark. I don't recognize what to say with the exception of that I have. הדפסה על חולצות במרכז

  6. To start with You got an awesome blog .I will be keen on more comparative points. I see you got extremely exceptionally valuable themes, I will be continually checking your blog much appreciated. collated printing deutsch

  7. Better than average information, gainful and sensational framework, as offer well finished with shrewd contemplations and thoughts, clusters of exceptional information and inspiration, both of which I require, by virtue of offer such an obliging information here. 24 hours printing near me

  8. I have to look for goals with major information on given point and offer them to educator our inclination and the article. photoshop vector image tutorial