Inkscape.org
Beginners' Questions Is there a way to flatten all LPEs in one go?
  1. #1
    QuazarOmega QuazarOmega @QuazarOmega
    *

    I have a slightly complex illustration that has many live path effects (boolean differences, symmetries, etc.), I'd like to keep a version of it with those LPEs flattened for better support to be displayed in certain applications like Firefox, so I was wondering if there is some option or command that can help me do that.

    I also tried to save copies both as "Plain SVG" and "Optimized SVG", but the paths involved in the boolean difference don't disappear like they're supposed to (I don't know if that's a bug, if it might be, let know and I'll provide the file I'm working on)

     

    What I've been doing now is to select each path one by one and flatten each effect manually, but that becomes time consuming very fast, that's why I'm asking for a more straightforward method.

  2. #2
    Polygon Polygon @Polygon🌶

    Can't test right now - but a simple Path->Object to Path don't work?

  3. #3
    Hum Hum @Hum

    An idea. Select all objects (Ctrl and A) and duplicate these and save to separate file. Then, while all objects are still selected, try Polygon's suggestion above of Object to Path operation . This may or may not work. Also, possibly you could group them all into one group and then perform an  Object to Path step en masse. These could later be un-grouped.

  4. #4
    QuazarOmega QuazarOmega @QuazarOmega
    Polygon

    Can't test right now - but a simple Path->Object to Path don't work?

     

    Yes, that works! But it does still leave behind the shapes that were being used for my booleans

  5. #5
    QuazarOmega QuazarOmega @QuazarOmega
    *

    @Hum Is the process you describe made to save the work before the "flattening"? That's fine, though I basically achieved the same by simply doing the modifications and using the "Save a Copy" option instead of saving in place.

    That makes me realize that maybe the problem lies in what I observed before:

    QuazarOmega

    the paths involved in the boolean difference don't disappear like they're supposed to

    (my mistake there, they're actually supposed to, I figured, though I still find it undesirable)

    This shouldn't happen in theory, right? Maybe it's just my wrong intuition, though, since even when performing a flatten action on the LPE manually they don't go away, so the real question would be: is there an option to make the boolean operand disappear with the flattening action?

  6. #6
    QuazarOmega QuazarOmega @QuazarOmega
    *

    Here's a video demonstration, in the last 2 cases the operand remains, I also added the file I used for completeness

    Boolean Difference
  7. #7
    Paddy_CAD Paddy_CAD @Paddy_CAD

    Path effects are designed to retain the original geometry of the shapes involved. Flattening the rectangle's path effect cuts out a circular section from the path and releases the "cutting" circle from the effect. This is intentional behaviour.

  8. #8
    QuazarOmega QuazarOmega @QuazarOmega

    That's fair, but is there really no extra option? The Optimized SVG does something to that end, I saw it applies a filter of id #selectable_hidder_filter that looks like it's hiding the paths to which it is applied, only issue is that it is not being respected in Firefox and KDE apps (Gwenview, Dolphin, etc.) which still display them as normal paths, while WebKit and Blink based browsers work correctly, I guess those are bugs of the related software, but nevertheless I feel the need for a way to delete them at the source for best compatibility. I'm still keeping the LPEs in the original file because I want to be able to change the position of the objects whenever in my working environment and then produce clean SVG snapshots for actual use, is my workflow wrong?

Inkscape Inkscape.org Inkscape Forum Beginners' Questions Is there a way to flatten all LPEs in one go?