Freeform rebar by sketch - missing bend diameter

I’m trying to create a freeform rebar by sketch using the node StructuralDesign.Rebar.Create.FreeFormRebar (from the Structural Design package). My approach is as follows:

  1. Generate a bunch of polycurves based on a base sketch, a path, number of rebars along the path and delta of length of the arc segment at the end of path. (Assumptions are made, the first curve of sketch must be an arc, exceptions are not handled)

  1. Explode polycurves and pass them on to the above mentioned node, with proper list levels.

Desired result - connected rebar with proper bend diameters:

Actual result - segmented rebar with sharp corners:

Attaching the script and test file. What am I doing wrong?
varFreeformRebarDynamo.rvt (624 KB)
varFreeformRebar.dyn (53.4 KB)

Why not model this in Revit GUI:
I tried this, but wasn’t satisfied - the outer shell is cylindrical, i.e. has a single diameter, but the rebar is created with two arc segments instead of one with the radii differing by approx. 20 cm, thus creating unnecessary noise in the drawing. So I’m taking this as a learning opportunity.