> For the complete documentation index, see [llms.txt](https://gitbook.testingwaters.in/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gitbook.testingwaters.in/geometry-1/polyline-to-polyarc.md).

# Polyline to PolyArc

![](/files/-MZM8B-7yI76iwntO7iT)

```d
def lnToAr(pl:var[]..[], of:double)
{
	pc1 = List.FirstItem(pl.Curves());
	//First Arc
	ac1 = List.FirstItem(pc1);
	ac2 = ac1.Offset(of).PointAtParameter(0.5);
	ar1 = Arc.ByThreePoints(ac1.StartPoint,ac2,ac1.EndPoint);
	ac3 = List.RestOfItems(pc1);

	ar5 = [Imperative]
	{
		cnt = 1;
		pc2 = [ar1];

		for (cr in ac3)
		{
			pc2[cnt] = Arc.ByStartPointEndPointStartTangent(cr.StartPoint,cr.EndPoint,ar1.TangentAtParameter(1));
			ar1 = pc2[cnt];
			cnt = cnt + 1;
		}
		return pc2;
	}
	return ar5;
```
