How did they create this?

I've been playing around with Box2D tonight and I love its flexibility! I found this site where someone has a game in development where you can draw lines and then the game creates the object based on what you have drawn. Can someone explain to me how they did this? I'd like to reproduce it in Box2D for a game that I am creating. Thanks. 🙂

The site where I found the game is: http://www.enigmasand.com/games/nphys/

Original thread: https://box2d.org/forum/viewtopic.php?t=1297