Thank you @c.poupin for doing most of the job for me
I would have preferred too but I’m a new Dynamo user and I never worked with python and at the same time I would appriciate it if you gave me some links or examples where I can learn to use it.
I tried your script…it working perfectly but there is a mistake in position of the first rebar at right side (cover at right side=0 and should be =0.108m as in the left side).
precisely I’ve change this value to 0 because there was an offset in the vertical direction between the curves then between my rebars (I think there is an error in vector direction)
Thanks for your guideline how to enter the calculated overlap length in the python script (just for correction the calculated value should be entered in margin-overlap= IN[3])