Returning width and height of the segment an off-curve handle belongs to?


I’m looking to cobble together a reporter plugin which shows the percentage strength of the off-curve handles of a segment.

I know that I can use node.type to figure out if a node is off-curve or not, but I’m not sure if there is an easy way to get the coordinates of the on-curve points of that segment. It feels like there should be…?

If not, I should be able to get the values I need by taking the difference in x and y values of node n-1 and n+2, or node n-2 and n+1, depending on whether node n+1 is on-curve or off-curve. It does seem a bit convoluted though, especially as I’ll need to reference the path’s final node and first node for the final segment of the path.

Any advice is greatly appreciated!

That is exactly right.

1 Like

Thanks Rainer!

The offcurve nodes do not ‘belong’ to the oncurve node. They are just regular nodes.

I don’t think I said (or implied) that an off-curve node belongs to an on-curve node?

It seems ok to say that an off-curve node must belong to a path segment, and - assuming the path is closed - each of the on-curve nodes must belong to (or be part of the construction of) two path segments. Maybe there is a better word to use than belong?

You are right. I just wanted to make sure.

Something like this? / SUPERTOOL >> You can install it from Plugin Manager

1 Like

That is pretty much what I’m looking for, thanks very much! Now I just need to figure out how to change the colour it renders in as that blue isn’t very legible in dark mode.

I checked the SuperTool source code and cleaned it up a bit and improved the color to work better in dark mode. I need to figure out how to build it for release.