How to create perpendicular frames to a polyline?

Hi, I’m trying to create perpendicular frames to a polyline. For that I’m measuring the angle between each par of the lines and divide it by two. Everything works ok except the inner corners.

What am I doing wrong?

plyline (15.3 KB)

I’m not 100% sure what you are trying to achieve, but maybe this could work for you?

plyline (18.7 KB)

In this case, it lost an important point. I’ve started from this

plyline (19.0 KB)

Thank you! Looks like it should work, but I’ll check in Monday only.

So, it works but I don’t know why. I have took of the most of your additional nodes (frames for example) and still, it works.