Adding a consistent slope to 2D Curves with Grasshopper

I am working on an architecture project that has a long and winding ramp. The ramp needs to have a 1 / 12 slope and a 5’ landing every 30’. I am trying to make a grasshopper script that will take any flat crv, divide it up, and add the slope in the z direction. My problems:

  1. The curve doesn’t match exactly in plan when it’s remade. (Red is the new curve)

  2. For some reason the individual segments aren’t even close to the correct length. I’m not sure what the flaw in my logic is, but the way I’m dividing it up doesn’t seem to work.

  3. The slope is inconsistent because the control points of the curves aren’t equally spaced.

I feel like this should be a simple exercise and a lot easier than what I’m doing, but I’m not sure what to do.
Ramp.gh (21.0 KB)

no curve is internalize

Just input any curve.

this seems to be fine to me what are u looking for

here is another revision rebuild the curve and reparametrize it
Ramp_revB.gh (25.8 KB)

length match and plan view maintain the same curve
image