svenema
svenema

Reputation: 2556

How to "flatten" in Inkscape?

I know that Inkscape has no flatten function. But. I have three objects in an svg file, which I want to all merge into one. It's a contribution to the Material Design Icon catalog, so this has to be a single path SVG.

However, when I "Union" the objects, two of the inner objects become thinner. If I "Combine" them, the outer object becomes fatter. Think it may have something to do with stroke and fill, but tinkering with these doesn't change anything.

Isn't there a function that just converts whatever is visible into one shape?

enter image description here

Juancho suggested doing "Stroke to Path", this works in the sense that the dimensions are now kept the same. But I fail to get the background (fill?) back on the outer ring afterwards:

enter image description here

This is the raw SVG:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:cc="http://creativecommons.org/ns#"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:svg="http://www.w3.org/2000/svg"
   xmlns="http://www.w3.org/2000/svg"
   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
   version="1.1"
   width="24"
   height="24"
   viewBox="0 0 24 24"
   id="svg4"
   sodipodi:docname="pentagram-circle-outline.svg"
   inkscape:version="0.92.4 (5da689c313, 2019-01-14)">
  <metadata
     id="metadata10">
    <rdf:RDF>
      <cc:Work
         rdf:about="">
        <dc:format>image/svg+xml</dc:format>
        <dc:type
           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
        <dc:title />
      </cc:Work>
    </rdf:RDF>
  </metadata>
  <defs
     id="defs8" />
  <sodipodi:namedview
     pagecolor="#ffffff"
     bordercolor="#666666"
     borderopacity="1"
     objecttolerance="10"
     gridtolerance="10"
     guidetolerance="10"
     inkscape:pageopacity="0"
     inkscape:pageshadow="2"
     inkscape:window-width="1722"
     inkscape:window-height="999"
     id="namedview6"
     showgrid="false"
     inkscape:zoom="27.812867"
     inkscape:cx="12.701976"
     inkscape:cy="11.744741"
     inkscape:window-x="0"
     inkscape:window-y="0"
     inkscape:window-maximized="0"
     inkscape:current-layer="svg4" />
  <path
     d="M 12 2 C 6.47 2 2 6.5 2 12 A 10 10 0 0 0 12 22 A 10 10 0 0 0 22 12 A 10 10 0 0 0 12 2 z M 12 4 A 8 8 0 0 1 19.722656 9.9179688 A 7.5696538 7.4413764 5.2319768 0 1 19.722656 9.9199219 A 7.5696538 7.4413764 5.2319768 0 1 20.044922 11.904297 A 7.5696538 7.4413764 5.2319768 0 1 19.140625 15.587891 A 8 8 0 0 1 12 20 A 8 8 0 0 1 4 12 A 8 8 0 0 1 12 4 z "
     id="path2"
     style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-opacity:1;stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none" />
  <path
     inkscape:connector-curvature="0"
     style="display:inline;fill:#030000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.40000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
     d="M 12.091785,4.6840407 7.6392526,17.907485 12.129207,14.886198 16.54432,17.867474 Z m -0.03789,2.140559 3.126247,9.3421803 -3.107775,-2.180816 -3.1262453,2.180816 z"
     id="path4048"
     sodipodi:nodetypes="cccccccccc" />
  <path
     inkscape:connector-curvature="0"
     style="display:inline;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.40000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
     d="m 4.8751298,9.9191537 6.5719872,4.4869193 h 1.36418 l 6.33373,-4.4296539 z M 7.2977352,10.665597 H 16.96068 l -4.906786,3.380383 z"
     id="path3166"
     sodipodi:nodetypes="ccccccccc" />
</svg>

Upvotes: 5

Views: 22017

Answers (1)

Juancho
Juancho

Reputation: 7372

The paths have different stroke styles.

Therefore you must first get rid of strokes by turning them into paths as well.

Select everything, Path -> Stroke to path, then Path -> Combine.

Upvotes: 5

Related Questions