Inkscape.org
Beyond the Basics Flatten open paths
  1. #1
    Asmatzaile Asmatzaile @Asmatzaile
    *

    Hi!
    I want to do 'flatten' @3d/psr-b1919-21#chart">this svg based on a visualization by Harold Craft and brought to popularity by Joy Division.
    The steps I followed were:
     - Remove all irrelevant groups
     - Remove the stroke for all paths, leaving only fill
     - Select everything and click on Path>Flatten

    When the program is done processing everything, I then remove the fill and give stroke to the newly created paths, and I discover that new connections have been created through the 'endpoints' of the previous open paths, making them closed. Is this intended? Is there an easy way to 'open up' those shapes?
    If I do Path>Flatten with stroke and not fill, the connection is not created, but the stroke is expanded like if I had clicked path>stroke to path, which I don't want.

  2. #2
    Polygon Polygon @Polygon🌶

    If you put in the link again you´ll be banned.

  3. #3
    Asmatzaile Asmatzaile @Asmatzaile

    Sorry, where appears the prohibition against links? I couldn't find it in the Code of Conduct and your comment came across to me as rude.

  4. #4
    Tyler Durden Tyler Durden @TylerDurden

    Please attach the svg to a reply using the paperclip button. That will be more direct.

  5. #5
    Asmatzaile Asmatzaile @Asmatzaile

    I want to flatten something like this, but instead of having 2 'mountain lines', I have 80

  6. #6
    Tyler Durden Tyler Durden @TylerDurden
    *

    ok I get the idea.  You want to "flatten" the entire chart.

    But when you state "flatten", we need more clarity...  Do you want to create :

    • 80 single stroke paths (e.g.white)  in front of a background (e.g.black)
    • All "mountains" combined as a filled path (e.g.white) in front of a background (e.g. black).
    • All negative space (e.g black) as filled paths, with the "mountains" (eg. white) as empty space

    or something else entirely?

    Is this for laser cutting/engraving or other CNC?

     

    BTW, this has been vectorized already here, but it's maybe more complex than the version you hope to create.

  7. #7
    Polygon Polygon @Polygon🌶

    Perhaps like so:

     

  8. #8
    Tyler Durden Tyler Durden @TylerDurden

    Fun to play with the file linked in my post above

  9. #9
    Tyler Durden Tyler Durden @TylerDurden
    *

    @Asmatzaile

    Ok, I think I have a viable workflow.

    1. Ungroup everything.
    2. Delete the text, abscissa and all the white filled objects, leaving just the black stroked lines.
    3. Select all, Extensions>Arrange>Restack>Reverse Z-order
    4. Hide all objects except the bottom two in the layers/objects panel
    5. Select the visible paths
    6. Use the PathOps Custom>Cut Path>Keep top element 
    7. Delete the bits that the foreground object snipped (would be masked if filled)
    8. Combine the visible paths (Ctrl+K)
    9. Send the combined path to the bottom of the z-order (End)
    10. Unhide the next path up in the Layers/Objects panel
    11. Select the two visible paths  (Ctrl+A)
    12. Repeat the extension (Alt+Q)
    13. Go to #7  and repeat ad nauseum.

    Here is the result of my test:

     

     

    Flattencp1919 Ex
  10. #10
    Tyler Durden Tyler Durden @TylerDurden

    Can be done... takes about an hour using the shortcuts described above.