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/.

[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:
  • 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-0003.zip 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.

There are 15 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.

12. STL for Stereolithography, July 7th, 2008 at 16:11

[...] Updates will appear here: http://workshop.evolutionzone.com/unlekkerlib/. [...]

13. Paul F., February 13th, 2009 at 17:02

I’ve just been trying to play with the STL import/export library examples in Processing 1.0.1 but keep getting error messages: “Cannot find a class or type named FaceList” in the STLReadWrite, and “unlekker.data.STL” needs to be updated for the current release of Processing” for the STLWriteSimple example. Any idea how I can get them working?

14. Code & form » unlekkerLib0003c: Now compatible with Processing 1.0, April 16th, 2009 at 08:19

[...] Library: unlekkerLib [...]

15. Carlo, May 14th, 2009 at 11:36

Hi,

and thanks for this library!
Can you manage to use it with the OCD library? If I put a camera with OCD and feed it, I am not able then to tilesave the image (apparently the viewport movement is “blocked” by the OCD). If I stop “feeding” the camera after having started the tilesaving process, the tilesaving process will be activated but I find myself in another position at the end of the process, and the generated image is buggy (black lines) and from this second point of view rather than the starting point of view.
I’m using Processing 0135 because my sketches were created on it.
Any idea?

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>