This OpenSCAD module provides a few modules that provide some functionality of local coordinate systems. It is very strongly inspired by obijuans attach library:
http://www.thingiverse.com/thing:30136 https://github.com/Obijuan/obiscad
The code is licensed under the MIT license.
If you have an interesting application for this code, an improvement or extension, a promising idea, or a question, just contact me. I am happy to hear about it.