C
C
copal2016-06-12 19:34:22
JavaScript
copal, 2016-06-12 19:34:22

Is it possible to copy part of svg?

There is an svg which is drawn in illustrator and consists of many shapes. It would be absolutely wonderful if it, this vector was cut into pieces and saved each as svg. But illustrator does not provide such an opportunity, well, or I don’t know about it. Therefore, the question is - is it possible to draw only part of another svg in svg?
And if someone knows about the possibility of cutting a vector in illustrator or something else, then tell us about it.

<svg id="Слой_1" data-name="Слой 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 280 280">
    <defs>
        <style>
            .cls-1 {
                fill: #7c7c7c;
            }
            
            .cls-2 {
                fill: #b5b5b5;
            }
            
            .cls-3 {
                fill: #4f4f4f;
            }
        </style>
    </defs>
    <title>first-example</title>
    <rect class="cls-1" width="280" height="280" />
    <path class="cls-2" d="M103.22,111.13c0-31.5,26.1-54.9,65.4-54.9,20.7,0,35.7,4.8,44.7,9.9l-7.2,21.3a80.53,80.53,0,0,0-38.4-9.6c-27.6,0-38.1,16.5-38.1,30.3,0,18.9,12.3,28.2,40.2,39L172,148l79.92-79.92A130,130,0,0,0,68.08,251.92l84.85-84.85C122.11,155.41,103.22,138.55,103.22,111.13Z"
    transform="translate(-20 -20)" />
    <path class="cls-3" d="M251.85,68L171.9,147.95c32.82,13.07,49.52,29.49,49.52,58.58,0,31.2-23.1,58.2-70.8,58.2-19.5,0-40.8-5.7-51.6-12.9l6.6-21.9a92.49,92.49,0,0,0,46.8,13.2c26.7,0,42.3-14.1,42.3-34.5,0-18.9-10.8-29.7-38.1-40.2-1.29-.46-2.55-0.92-3.8-1.4L68,251.85A130,130,0,0,0,251.85,68Z"
    transform="translate(-20 -20)" />
</svg>

In fact, all this is easy to do in illustrator by breaking everything into artboards.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
A person from Kazakhstan, 2016-06-12
@LenovoId

show code example

N
Neron, 2016-06-12
Lordov @Nekto_Habr

Umm, it's elementary - to pick the vector into pieces. The illustrator has all the tools for any work with the vector, you need to learn the materiel, watch the lessons.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question