Variable offset

This is the algorithm i use in dynamo and grasshopper. It’s fairly reliable except for extreme shapes that weave and bend a lot.