Variable Offset for each segment of a polyline-curve

If you’re just dealing with polylines, then you can get away with a bunch of line-line intersections. You have to break your polyline into individual lines, move each line perpendicular to itself with the correct amount, then for each line find the intersection points with its immediate neighbours (line-line intersections assume infinitely long lines), and those two intersection points give you the new segment start and end. This won’t work well if your offset is so large that certain segments disappear entirely. Nor will it work for co-linear adjacent segments.