Library: unlekkerLib

Sep 24, 2007

Update, April 07, 2011: With the release of my new ModelBuilder library unlekkerLib has officially been discontinued. Modelbuilder contains the most important parts of unlekkerLib, including STL output and the TileSaver mechanism for high-res rendering from OpenGL sketches. ModelBuilder is focused on the parametric modeling of 3D mesh geometries. It is designed primarily for 3D printing applications, but has also proven useful for realtime applications. Modelbuilder provides a basic workflow for describing mesh geometries as well as a range of convenience methods for common mesh manipulation tasks.

A word of warning: unlekkerLib and Modelbuilder use some of the same package names, which will result in a code conflict if both libraries are installed. If for some reason you’re missing features of unlekkerLib that are not present in ModelBuilder, please leave a comment with details.


unlekkerLib is a collection of tools and code snippets I use frequently, and which I’ve now just barely cleaned up enough for other people to use. Instead of releasing them piece by piece, I’ve decided to bundle them together in a package hierarchy. Caveat emptor:There’s not much documentation but I do provide the source code. This is v.0001, the very first release so it’s pretty basic.

See below for an idea of what the library contains. Right now the most exciting new component is the class, which supports export and import of STL stereolithography files for rapid prototyping. I’ve already successfully used the library to produce a series of rapid prototyping objects.

Have a look at the Javadoc for more details. Updates will appear here:

[090416] unlekkerLib-0003c: Now compatible with Processing 1.0.3

After several requests I’ve taken the time to make unlekkerLib compatible with Processing 1.0. In particular, STL export should work again. I haven’t had the chance to test it extensively, so please let me know if you find any bugs.

Download: unlekkerLib0003c

[080712] unlekkerLib-0003: Fixed missing classes

For some inexplicable reason unlekkerLib-0002 was missing some classes needed for the TileSaver and ColorPalette classes to work. I’ve added the missing files to the library and uploaded a new version.

Download the new version here.

[080411] unlekkerLib-0002 code example:

I’ve consolidated a selection of code examples for unlekkerLib-0002. They can be downloaded as part of the Code & Form code library 0001.

[071028] unlekkerLib-0002 features:
  • Primitive POV-Ray triangle geometry export.
  • Feed reading utility class (requires installing extra JARs)
[070924] unlekkerLib-0001 features:
  • STL import and export.
  • unlekker.util.Rnd: Mersenne Twister pseudo-random number generator.
  • unlekker.util.TileSaver: The TileSaver class for creating high-res images from OpenGL graphics by tiling the viewport.
  • unlekker.geom.Intersect: Line intersection and checking for collision with complex 2D polygons.

Download and unpack it.

Copy the "unlekker" folder from the “00 For processing library folder” folder into the "libraries" subfolder of your Processing application. The library should now appear as a choice in "Import library" next time you start Processing. If you want feed reading support, you will need to copy “jdom.jar” and “rome-0.9″ into the “unlekker/library” folder. The complete Java source may be found in “00 For processing library folder > unlekker> src”.

A collection of code examples can be found in Code & Form code library.