Centerline of two bezier curves

Is there a script to create centerline between two bezier curves?

What exactly is the centerline of two bezier curves?

There is a Show Center lines plug-in in Window > Plugin Manager which shows you subtle vertical and horizontal guides in the center of your selection. Does that help?

thanks.

But this is not what I was looking.

I want to create a middle curve between two curves
similar to blend option in photoshop

You put one of the lines in the background, and use Filter > Transform > Background with 50%.

@mekkablue
Please check. I have copied a curve to background and offsetting the curve in the foreground. Both curves are compatible.
filter is not offsetting the curve in the foreground from its original position towards the curve in the background by 50%
6%


50%
image

There is not a script for that I know of, but you can achieve that by using the Offset Curve filter.

The steps I used to recreate the /S:

  1. Select the outside path only;
  2. Copy, then Paste so you have it overlaying the original; do not de-select the duplicated path;
  3. With your pasted path still selected, use Filter > Offset Curve, make sure Make Stroke is selected, with a value of 50%;
  4. Enter the value of the glyph stem width for both fields; click on Offset;
  5. Option-delete the corner node on the new outer path at each end of the path.
  6. Delete the remains of the new outer stroke.

It will only work correctly on glyphs which have a constant stem width. Glyphs with differing stem widths would require manual corrections.

This seems like a lot of steps, but once you’ve done it once or twice it takes less than a minute to do a glyph. It might be scriptable but it would be complex.

1 Like

Verify path directions. Reverse if necessary.

1 Like

I wrote a script for this a while back and it was just laying around, so I published it to my GitHub. It is called Create Centerline: https://github.com/harbortype/glyphs-scripts

4 Likes

same issue. but centerline script does exactly what I need

thank you very much. This is extraordinary.

Some very useful scripts.

Thanks for sharing.