added comp_to_line function to get point slope parameters of all connected components