Scarpino's book Automatic SketchUp, Chapter 12.