Inkscape.org
Beyond the Basics Automated midpoint between two paths?
  1. #1
    takingcontrolofthedrummachine takingcontrolofthedrummachine @takingcontrolofthedrummachine

    Hello everyone, this is my first post. 👋

    First of all, as an introduction, let me say I love Inkscape. I've been using it for 5+ years. It's one of the few large open softwares which actually works and stands to proprietary competitors, and I've even earned money thanks to it for the first time in my life recently. One day I'll give back to the project - I'm having lots of fun v1.0.

    Now, as for the problem itself, I'm posting in the Beyond the Basics section because I'm a big boy now and I currently haven't been able to find an answer to this anywhere, despite it not seeming too tragic (...or maybe I'm just trying to preserve my pride): all I need to do is to find an efficient way on how to "mix" two paths into one.

    I basically want to take something like this (using two simple paths with four nodes each for reference)...

    ...and BOOM, have the midpoints between the nodes turned into a single path, highlighted here in red.

    So, I already toyed around with the path menu bar and the path effects window, but I'm not finding suitable options/making anything work so far. It's the first time I'm properly stuck here.

    The menial way is to take every point coordinate, make a segment, add a node and repeat, but I'm not ready to waste that much time yet, just in case.

    Anyone? Is there an extension? Thanks in advance.

  2. #2
    Tyler Durden Tyler Durden @TylerDurdenâš–

    Well, if you still had v .92.xx you could use the Interpolate extension, but it's broken in v 1.0.

     

     

  3. #3
    Polygon Polygon @Polygon⚖🌶

    And if you have them combined there is "Interpolate Sub-Paths":

  4. #4
    takingcontrolofthedrummachine takingcontrolofthedrummachine @takingcontrolofthedrummachine
    TylerDurden

    Well, if you still had v .92.xx you could use the Interpolate extension, but it's broken in v 1.0.

    My famous last words...

    Is it possible to have two Inkscape versions installed or will a v0.92 download ovverride the v1.0? Perhaps there's an alternative extension?

    PixelPest

    And if you have them combined there is "Interpolate Sub-Paths":

    Welp, doesn't work for what I'm trying to do. I really need the interpolation extension to work like @TylerDurden shows.

  5. #5
    Tyler Durden Tyler Durden @TylerDurdenâš–

    People are using multiple versions on the same machine. (I am not.) 
    https://inkscape.org/forums/questions/is-it-possible-to-use-inkscape-version-092-and-version-1-on-the-same-computer/

  6. #6
    takingcontrolofthedrummachine takingcontrolofthedrummachine @takingcontrolofthedrummachine
    ✔

    Ok, cool, I downloaded the 7zipped files, and it launched alongside v1.0 with all my preferences and windows alignments automatically "imported" despite it being in a different folder and not even installed. That was neat! I will keep it there.

    Now, I tried to interpolate some stuff using the extension, but initially to no avail. The curves I drew would interpolate, to my surprise, into a sympathetic poop-like shape. Something was wrong.

    So I drew two pairs of segments again. The ones drawn both top-to-bottom interpolated correctly, while the ones drawn in two different orientations rotated during the interpolation. Correct in a sort of way, didn't know Inkscape would save data such as that inside of a rigid segmen, but better.

    Then I discovered Path > Invert (the curves are smoothed in this pic because I straightened them in the previous pictures, but they're still the ones on the left).

    And then I:

    1. Wrote a letter.
    2. Turned the text object into a path.
    3. Separated the ends.
    4. Divided the curves into their own single path.
    5. Inverted one of them.
    6. Interpolated one time and, for real this time, BOOM: we get the instant midpoints, even with a different amount of nodes, between two segments. This also worked in v1.0, using the path effect in 3 iterations (screenshots from both versions below). Same settings as @TylerDurden's clip in v0.92:

    I can now extract within a minute the exact "spine" of a font (don't know the name) without using imprecise tutorial tricks involving using stroke differences, which is what I wanted to do. Mission accomplished!

  7. #7
    takingcontrolofthedrummachine takingcontrolofthedrummachine @takingcontrolofthedrummachine

    Update: trying with different fonts and more complex letters. For some shapes it's ideal to break down de/ascenders, stems, eyes and so on a bit more. The S's shape I used was a very simple curve, for a T I needed to separate the middle stem from its arms. Adding an extra middle node to balance the output's look also helps some times.

    Still, faster than I could've ever. One could source a font's alphabet like this by hand in half an hour or less. But I wonder if there's a faster way to do it? If not, someone could make an extension to automatise it.

  8. #8
    Tyler Durden Tyler Durden @TylerDurdenâš–

    Sounds like you are making Hershey text. https://wiki.evilmadscientist.com/Hershey_Text

  9. #9
    takingcontrolofthedrummachine takingcontrolofthedrummachine @takingcontrolofthedrummachine
    TylerDurden

    Sounds like you are making Hershey text. https://wiki.evilmadscientist.com/Hershey_Text

    Had a nice "series of tubes"-style internet trip reading up on this. Unfortunately plotting and such stuff are out of my expertise.
    I may actually use some of this for my work, so thank you. These fonts are very "1920s America", I like the gothic and bucolic ones particularly.

    Is there no extension that can "probe" nodes to get a midpoint in more complex construction? The idea of "sourcing" fonts like this is interesting, since many are arbitrarily designed with a fixed weight and only a few have variable ones. I wish everything was as malleable as this.

Inkscape Inkscape.org Inkscape Forum Beyond the Basics Automated midpoint between two paths?