Here's another Lego brick builder for OpenSCAD. Use it stand-alone to make bricks in odd sizes. Or import it into your own project to make your thing connect with real Lego. The 5x3 brick in the stl-file is just an example.
Supports any standard Lego length, width and height. Also makes smooth bricks without the knobs/studs.
This is my first OpenSCAD project. It was made just for fun and experimenting. Please add some useful comments.
To use this in your own projects add:
brick (length, width, height [,smooth]);
Length and width are in standard lego brick dimensions.
Height is in flat brick heights, so for a normal lego brick height = 3.
Add optional smooth = true for a brick without studs.
Use height = 0 to just put studs/knobs on top of other things.