Here is my solution to the problem:

```
# Create Rebar Path
perp_transform = Geom::Transformation.new(origin, [0, 0, 1], 90.degrees)
perp_vector = dir_vector.transform(perp_transform)
perp_vector.length = perpoffset
pt0b = @pts_aligned[0].offset(perp_vector)
rebar_path = [pt0b]
for index in 1 ... (@pts_aligned.size - 1)
index2 = index + 1
index0 = index - 1
vec2 = @pts_aligned[index2] - @pts_aligned[index]
angle2 = atan2(vec2.y, vec2.x)
vec0 = @pts_aligned[index0] - @pts_aligned[index]
angle0 = atan2(vec0.y, vec0.x)
phi = (angle0 - angle2) * 0.5
transformi = Geom::Transformation.new(@pts_aligned[index], [0, 0, 1], phi)
vec2.length = perpoffset/(sin(phi))
vecr = vec2.transform(transformi)
ptib = @pts_aligned[index].offset(vecr)
rebar_path << ptib
end
end_dir_vector = @pts_aligned[-1] - @pts_aligned[-2]
perp_end_transform = Geom::Transformation.new(@pts_aligned[-1], [0, 0, 1], 90.degrees)
end_perp_vector = end_dir_vector.transform(perp_end_transform)
end_perp_vector.length = perpoffset
pt1b = @pts_aligned[-1].offset(end_perp_vector)
rebar_path << pt1b
```

This seems to work reasonably well, I’ve been unable to break it. There may be a more efficient way to do this but it does work.