Although the program works and the results look attractive, I have some comments on the algorithm and on the code implementation:
First why would you want to have arcs on a polyline that you want to convert to a profile, unless, of course, the profile view style has no vertical exaggeration and, if that is the case then the code should be inserting circular vertical curves instead of symmetrical parabolas. Even in this case you need to check for proper tangency conditions between the vertical curve and the tangents.
If, despite all these reasons, you still want to convert arcs to a profile, then you would need to sample enough points along the arc to draw tangents between them. The number of sampling points varies, depending on the arc’s radius and the precision you want.
Regarding the code implementation, I can’t see the need to sample 10 or 11 points along the circular arcs if in the end you are only using the mid point to insert a fixed symmetrical parabola!! Again, no tangency checks are made between the tangents and the vertical curve.
In my program, I do not allow the polyline to have any arcs (just check the polyline’s property “HasBulges”).
After you have inserted all the tangents, inserting curves is trivial, just choose the PVI you want and insert a floating vertical curve (circular, parabola…) between the tangents that share that PVI.
Also, you can determine the profile view’s vertical exaggeration and horizontal orientation without getting its style: just determine profile view’s min and max station and elevation and then get its WCS coordinates of those 2 points (the 2 corners of the profile view: Lower left and Top Right) and the vertical exaggeration is the ratio between the DeltaY and the DeltaElevation. If DeltaX is negative, the profile view is oriented from right to left.