Version: 1st July 2014, 05:01 (GMT+1); optimized shape to_outline function