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 unlekker.data.STL 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: http://workshop.evolutionzone.com/unlekkerlib/.

[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:
  • unlekker.data.POVRay: Primitive POV-Ray triangle geometry export.
  • unlekker.data.FeedReader: Feed reading utility class (requires installing extra JARs)
[070924] unlekkerLib-0001 features:
  • unlekker.data.STL: 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.
Installation

Download unlekkerLib-0002.zip and unpack it. For a

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.

There are 11 comments to "Library: unlekkerLib". You may leave your own comment.
1. lenny, September 24th, 2007 at 20:05

yeah, great work marius.
can’t wait to play with our millingmachine….

the downloadlink does not work for me. it directs me to your 404error.

2. marius watz, September 24th, 2007 at 21:44

Sorry about that, it works now. I’ll post an example of how to use STL tomorrow..

3. Simon, September 27th, 2007 at 17:57

Thanks a lot Marius!
This is as usual really (really really) great!

4. Claudio Midolo, October 19th, 2007 at 06:53

wonderful library mix, thank you Marius!

5. lenny, October 30th, 2007 at 03:06

now it works great, even on my pretty old powerbook. thanks a lot.

6. ryan, November 6th, 2007 at 23:32

Hey Marius thanks for the lib! Tilesaving is so useful. Is SimplePostcript going to get to join the party? Also have you thought about making a subversion repository?

7. marius watz, November 10th, 2007 at 23:39

Hey Ryan, glad you like it. I didn’t realize anyone still would want to use SimplePostscript, after all it was very simple indeed…

Subversion is probably a good idea, I haven’t played with source repositories so far. Any tips for a good tutorial to set one up?

8. ryan, March 24th, 2008 at 03:50

Yeah its so simple and that’s why I like it. Processings default PDF writer has some precision issues but it more complete. For basic lines and fills simplepostscript is great tho.

I think Google Code would be a good option for an easy subversion setup. You could also install it yourself on your own server. Mine has a quick-installer for it, so yours may also. If you want to set it up give me a ping by email or IM and i’d be glad to walk you through it. I use svn on mac tho so it may be a little different. http://tortoisesvn.tigris.org/ might be a good windows client.

9. giulio, April 4th, 2008 at 19:12

I’m a bit disapponted: the library works just great, but I thought it would add some new feature to the exported file: for example Bezier or curves (the former was my great hope!). In fact, there is no library whatsoever in Processing to export 3D curves! (Or am I wrong?) Is there any hope?

10. marius watz, April 9th, 2008 at 21:44

Sorry, the beginRaw() / endRaw() functions only work with triangles, so lines and curves won’t be exported. I’m not sure what you mean with “3D curves”, though. Are you thinking of something like NURBS or Bezier patch surfaces?

11. BaoQuoc Doan, July 2nd, 2008 at 20:13

Just a heads up,

It seems like the latest file on the Google repository is missing something. I could be missing somethings too. Some of the sketches from “Code & Form Library 0001″ don’t seem to work. Specifically ones that depend on the “Vec3″ and “ColorPalette”

Some one else over in the processing forum had made a similar observation.

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>