Inkscape.org
Creating New Extensions Bezier Envelope extension
  1. #1
    dpanderson dpanderson @dpanderson

    Would any seasoned extension developer be interested in updating the Bezier Envelope extension to work with Inkscape 1.1?

    https://github.com/shlomif/Bezier-Envelope-for-Inkscape

    From the lack of activity on the extension's github, I don't think the original developer is.

    I really like the results from this extension.  It would be nice to not have to go back to 0.92 to be able to use it.

    TIA

  2. #2
    Tyler Durden Tyler Durden @TylerDurden

    +1

    That extension is/was very useful.

  3. #3
    Polygon Polygon @Polygon🌶

    Why not use the LPE?

  4. #4
    inklinea inklinea @inklinea⛰️

    Mario Voigt has updated quite a few extension for Inkscape 1+  Including Bezier Envelope at https://gitea.fablabchemnitz.de/MarioVoigt/mightyscape-1.X

    However the extension at the link you provided does work for me.

    I have Marios update and Shlomif update working on Inkscape 1.1 on Ubuntu 20.10.

    Have you definitely clicked the bezier first and then shift clicked the envelope second ?  ( Also the envelope does have to be a path draw clockwise, rectangle then Object to path will do ) 

     

  5. #5
    dpanderson dpanderson @dpanderson
    *

    I am trying to get this effect on text, so it is not a rectangular envelope.  As I recall, Bezier Envelope gave me this capability:

    Here is my test case, you can see that the envelope is four nodes in a clockwise direction:

    I tried the Mario update on Windows 10 and it works without error.  However, it is not producing the desired result shown above.

    Am I trying to do something that Bezier Envelope is not capable of?  If so, are you aware of a tool or extension that will give me that result?  I've tried Envelope Deformation and that does not give the desired result.

    TIA

  6. #6
    Polygon Polygon @Polygon🌶

    Works a treat I might say:

  7. #7
    dpanderson dpanderson @dpanderson
    *

    Good to see that @Polygon !  So now it seems I am not setting up the text and envelope correctly.  I'll keep trying.  Is the text supposed to be text, converted to a group of multiple paths using Object to Path, or all of those paths combined together using union?  When I do it in my test case, it puts it in a rectangular envelope determined by the left and right sides of the warped envelope and they do not follow the warp.

  8. #8
    Polygon Polygon @Polygon🌶

    That´s why I rotate the text (Text object converted with Object to Path - ungroup - Combine or Path->Union depending on the font) +90° before applying the effect.

  9. #9
    dpanderson dpanderson @dpanderson

    @Polygon   Could you send me your SVG file, just before you run the extension?

  10. #10
    dpanderson dpanderson @dpanderson
    *

    Here is what I get when I rotate the text path first:

    I am using Windows 10.  What OS are you using?

  11. #11
    Polygon Polygon @Polygon🌶
    *

    macOS - but this behaviour has been for this extension as long I can remember.

    Do you get a different result without rotating text first and is it 1 path object? Check status bar when selected.

    Once again (my GIF maker can´t reach the main menu):

  12. #12
    dpanderson dpanderson @dpanderson

    Yes, my text is a single path.  Here is the result when the text is not rotated:

  13. #13
    dpanderson dpanderson @dpanderson

    I've attached my SVG file if you want to give it a try.

  14. #14
    Polygon Polygon @Polygon🌶

    Ok - seems your envelope is the culprit here. consider this way of creating it:

  15. #15
    dpanderson dpanderson @dpanderson

    OK, that worked!  I was creating the envelope by drawing a rectangle and then Object to Path.  I also tried by drawing a rectangle like you did, but starting in the upper left corner.  Apparently starting in the lower left corner is the only difference.  Now I get this:

    Thank you @Polygon .  You made my day, and my wife's!  She loves using this effect on artwork for clothing.

     

  16. #16
    Polygon Polygon @Polygon🌶

    You´re welcome and Yes as already mentioned: starting in the bottom left corner is crucial.

  17. #17
    dpanderson dpanderson @dpanderson

    Certainly not obvious that you must start in the bottom left corner and rotate the text.  How did you figure that out?

  18. #18
    Hum Hum @Hum
    *

    Hi. Original text written by author of extension says to begin the envelope in the upper left corner and go clockwise. I have had this work for  the last year, plus, in this manner. But I have been using it with version 0.92.4. Perhaps the orientation (and starting corner has been altered in the 1.x version).

    See link below which has inx and py files.

    https://drive.google.com/drive/mobile/folders/1MPHH-LDut9fXUjiRvjJ0Li1QH8rAhqQz?usp=drive_open

     

  19. #19
    Polygon Polygon @Polygon🌶
    *

    @ken10001000  I can´t get the linked extension to work with 1.1 to whatever I try:

    @dpanderson I've been using Inkscape since 2004 and for as long as I can remember, we used to figure it out.#

    The ".py" file for both versions says as they have the same origin:

     

    About the Bezier Envelope extension:

     

    This extension implements Bezier enveloping.
    It takes an arbitrary path (the "letter") and a 4-sided path (the "envelope") as input.
    The envelope must be 4 segments long. Unless the letter is to be rotated or flipped,
    the envelope should begin at the upper left corner and be drawn clockwise.
    The extension then attempts to squeeze the letter into the envelope
    by rearranging all anchor and handle points of the letter's path.

    But all I can say that´s not working the way described. Start at the bottom left for the cage - rotated text (or whatever combined paths you have) +90° - select first content then add cage to selection - call extension (FabLab Chemnitz->Legacy Tools->Bezier Envelope) and all is good.

  20. #20
    Hum Hum @Hum

    Thank you, Polygon. I will experiment with this later today.

  21. #21
    Tyler Durden Tyler Durden @TylerDurden
    *

    .92.x extensions are not compatible with >1.0. Python3 vs Python2.

    https://wiki.inkscape.org/wiki/index.php/Release_notes/1.0#extension_updates

    Fablabchemnitz has done a great service by updating so many valuable extensions.  🙇

  22. #22
    Hum Hum @Hum
    *

    I know the way 0.92.x extensions are written not compatible with 1.x versions.

    I have seen the "re-written" extensions mentioned above. But when I try to download them, they are in html or mhtml code, not strictly in inx or py file formats. And when I try to copy the proper code from them in an attempt to create the inx and py codes using a text editor such as PSPad, I cannot create workable code, even for 1.01 version or later. I am not a Python progammer, so I do not know the proper syntax, indentation needef, etc.

    If you have it, or could provide it, I and others would appreciate the inx and py files for this extension, that would work using 1.x versions.

    Where can I find these workable inx and py files for downloading ... for Inkscape 1.x versions?

    Thank you.

  23. #23
    Tyler Durden Tyler Durden @TylerDurden

    The updated extension is quirky (under Linux in this case)... like in PixelPets example, the envelope path must start at lower-left AND the target path must be rotated +90* to deform as expected.

    FWIW, I regularly renumber closed paths by removing a segment and replacing it. The first node when broken remains as the first node after replacing the segment to close the path.

  24. #24
    Hum Hum @Hum

    Thank you, Tyler.

  25. #25
    Nari_ka Nari_ka @Nari_ka

    Hello, @Polygon, I am operating on MacOS and I noticed you mentioned that this is your operating system as well. On the download page for Mario's extension collection for 1.0x, it says the system requirements and tested environments are only Windows and Linux. It seems to be working on your system, though so I am hopeful. Do you have any installation insights or tips for Mac users?

  26. #26
    nayamuldesign nayamuldesign @nayamuldesign

    thank you it working smoothly

  27. #27
    Polygon Polygon @Polygon🌶
    Nari_ka

    Do you have any installation insights or tips for Mac users?

    Oh sorry for the late reply - just saw it recently by accident.

    New extensions go here: HD/Users/you/Library/Application Support/org.Inkscape.Inkscape/Config/Inkscape/extensions

    If you can´t find "Library" because it´s hidden from users by Applejuicefactory go in Finder->hold alt-key down ->Go To->Library etc.

    Once installed the new ones from Mario call extension (FabLab Chemnitz->Legacy Tools->Bezier Envelope for instance)

  28. #28
    sketch_of_life sketch_of_life @sketch_of_life
    *

    I am using the current master builds of inkscape. The Lattice Deformation Path Effect works really well. I went back and checked this with 1.1.1 and it also works well.

    Lattice Deformation
  29. #29
    svgandme svgandme @svgandme
    *

    Hey @Polygon Would love some help! I got the extension installed from this link  https://github.com/eridur-de/mightyscape-1.X-zipmirror/blob/master/bezier_envelope.zip  and then copied the whole unzipped bezier ext folder into my Inkscape extensions folder. Is that correct for installation?

    When I go to use the extension, it works but there is an error message I have to click Ok on before it works 

    https://www.loom.com/share/77798e9c5237496f8a2d2a999ba6c09e

     

  30. #30
    Hum Hum @Hum

    Hi. Yes, I get a warning (error) message also when using this in Inkscape version 1.2x, but it still seems to work okay.

    Did you see the topic (graphics) I shared a while back on this extension? Perhaps it will help you.

    https://inkscape.org/forums/tutorials/a-method-to-use-with-bezier-envelope-extension/

  31. #31
    Fingolfin Fingolfin @Fingolfin

    Is there a way to make this work on a half circle like this:

     

    Envelope
  32. #32
    Tyler Durden Tyler Durden @TylerDurden
    *

    Not likely.

    But how would you envision the letters in the tight corners?

  33. #33
    Fingolfin Fingolfin @Fingolfin

    Idk, maybe something like this. (just quick, rough try with Envelope Deformation). Envelope deformations path effect is very useful and more customizable, but sometimes you have to play around with it to get a decent result. Whereas with this plugin the algorithm does it for you and it looks more precise, similar to Illustrator's "Envelope Distort".

     

     

    Envelope2
  34. #34
    dpanderson dpanderson @dpanderson

    Since Bezier Envelope needs a four-sided path, could you make the semi-circle at the bottom out of three separate path segments that appear to trace out a semi-circle?

  35. #35
    Hum Hum @Hum

    As shared, the Bezie Envelope Extension can only consist of 4 nodes. You could "approximate" a semi circle of sorts. But it probably best to use this extension one letter at a time. Look through this material I shared a while back:

    https://inkscape.org/forums/tutorials/a-method-to-use-with-bezier-envelope-extension/