Inkscape.org
Beginners' Questions How to convert overlapping shapes to single path?
  1. #1
    chrisspen chrisspen @chrisspen

    I have a complex set of overlapping shapes whose visible edges I need to convert to a single path, so I can feed it to a CNC machine.

    If I convert them all to paths and use Path->Union, that erases all the edges for the overlaps, making it look like one large "blob", which doesn't work.

    If I convert them all to paths and use Path->Combine, that erases all the fill and makes the previously hidden edges visible, making it look like a wireframe view, which doesn't work.

    Is there a way to convert shapes to paths, while maintaining their edges, but also combine them into a single path?

  2. #2
    Tyler Durden Tyler Durden @TylerDurden

    You might consider trying the latest beta of 1.3, which has a new path effect called "flatten". https://wiki.inkscape.org/wiki/Release_notes/1.3#Flatten_Paths

  3. #3
    chrisspen chrisspen @chrisspen

    Interesting. Still seems to require I manually select every two objects and flatten them. If I select everything and flatten, everything disappears. It also doesn't seem to support any object that's not completely closed. But this is still a huge help. Thanks.

  4. #4
    Polygon Polygon @Polygon🌶
    chrisspen

    Still seems to require I manually select every two objects and flatten them

    Not here with 1.3beta. All in one go as per Tyler´s vid. Works even with groups.

  5. #5
    Tyler Durden Tyler Durden @TylerDurden

    Maybe there's an empty text object or other hidden issue that is interfering.

    Please share a sample file.

  6. #6
    chrisspen chrisspen @chrisspen

    Attached is a sample file. Do a select-all, Path->Flatten. Half the shapes disappear entirely. No text objects. But I do have some unclosed paths.

  7. #7
    Tyler Durden Tyler Durden @TylerDurden

    Before proceeding, I would like to know if this design needs to be cut into discrete parts, or if it's only being engraved or...?

  8. #8
    chrisspen chrisspen @chrisspen

    It's only for engraving.

  9. #9
    Tyler Durden Tyler Durden @TylerDurden

    There are a number of hidden objects, and a number of open paths that would need resolving to run boolean operations on the design.

    The good news, is it's mostly busy-work... not re-design work.

    I'd remove the hidden objects, close the big vees, ensure the strokes are not duplicated, then work my way up with the flatten operation. It may work all at once, but I'd plod my way from background to foreground.

     

     

     

     

  10. #10
    chrisspen chrisspen @chrisspen

    What do you mean by hidden objects? Everything's on visible layers. If objects are completely obscured by other objects, that's fine, I don't need them to be visible in the final flattening.

  11. #11
    Tyler Durden Tyler Durden @TylerDurden

    Even geometry that is obscured by other object's fill or stroke will be included in path operations, the same as it would be included in cnc toolpaths. 

    I'd remove any un-needed geometry even if I weren't trying to use a path operation to optimize the design for cnc toopaths.

    Some cnc lasers offer raster engraving, if you are headed that direction... then a simple bitmap image from the design may be sufficient.

  12. #12
    chrisspen chrisspen @chrisspen

    Thanks for your help. My engraver does support bitmaps, but it's painfully slow, since it has to "scan" over the work area the way an inkjet printer would. Takes about an hour to engrave this design with a bitmap, whereas the same design in SVG format takes a couple minutes, since it can simply follow the exact path and not waste time moving the head along with row and column.

  13. #13
    Tyler Durden Tyler Durden @TylerDurden

    Vector engraving for this design would be much faster, but it may take some consideration to create an efficient vector file. e.g. breaking the file into discrete parts may result in many duplicated lines.

Inkscape Inkscape.org Inkscape Forum Beginners' Questions How to convert overlapping shapes to single path?