Added ability to extract profiles from surfaces