fn fix_angles(orig: &PolyLine, result: PolyLine) -> Result<PolyLine>