50

I'm editing an svg in Inkscape and I have an object on top of another object. I'd like to use the shape of the top object to cut the object beneath it.

For those who are familiar with GIMP, I'm trying to do something like the "alpha to selection" tool.

38

Select both (by clicking one object, holding shift, then clicking the other object), then select Path, then Difference.

For me, I wanted to cut a left arrow out of a hexagon. I created a hexagon, duplicated the layer, shifted the top layer to the right, then selected both layers, then PATH / Difference.

  • 4
    Adding to this: I wanted to cut out text, so first I had to select the text, Path > Object To Path, then select again and Object > Ungroup, then select each letter and the background individually - you can only ever do this with two objects at a time. – SinisterBeard Aug 11 '15 at 11:28
  • You can actually do this with more than one path at a time thanks to a new extension: github.com/Moini/inkscape-extensions-multi-bool – johnp Jun 13 '16 at 3:37
  • It doesn't work. At all. Nothing happens. – yPhil Jul 19 '18 at 12:42
  • 1
    @yPhil the remark by SinisterBeard helped me to make it work. Have you tried that? – thymaro Sep 11 '18 at 14:29
16

Select Both and Do:

Object --> Clip --> Set

  • 2
    This should be the accepted answer. – TenLeftFingers Nov 5 '16 at 22:10
  • 4
    This always comes out opposite of what I want. Maybe because the object on top is the bigger one? Also doesn't work, if the "cut out" part is supposed to be transparent. The color of the object in the back will show up. – DanMan Mar 20 '18 at 15:25
  • @TenLeftFingers this is only true if you want the lower object to have the shape of the top object. If you want the shape of the top object be cut out from the lower object, then it shouldn't. The question is actually ambiguous, if you don't know GIMP and its "alpha to selection". I looked it up and I don't think it clears it up, to be frank. – thymaro Sep 11 '18 at 14:18
4

Select both, PATH >> INTERSECTION

  • 7
    If you are trying to subtract a thick line (stroke) from a shape you will have to choose PATH >> STROKE TO PATH first. – Adripants Feb 4 '14 at 23:46
2

I wanted to cut a cross shape out of another shape. I used the original shape.svg and another image, cross.svg (which was the exact shape I wanted to cut out). Now, I tried all of the suggestions here, but none of them worked and after much experimenting, I found an easy approach which I hope will work for others.

  • open inkscape
  • open shape.svg
  • import cross.svg
  • resize and position cross.svg over shape.svg in the place where the cross needs to be cut out
  • Path --> Combine (this resulted in the original shape.svg with a cross cut out of it)
  • After the combine, the shape.svg was the color of the cross.svg, so I just selected it and chose the color I wanted from the fill palette
  • File --> Save as

I would note that both images were one color to begin with.

2

A little(?) late to the party and wondering why no one mentioned division (Ctrl+/).

The top object must be duplicated or else you will be left with the bottom object in two segments - one will be in the shape of the top object and second will be the residue

  1. Select the top object.
  2. Press Ctrl+D to duplicate it.
  3. Change the color so that it's discernible
  4. Press Shift and click the bottom object. (You must have a copy of top object and bottom object selected by now. Check the status bar to see if only two objects are selected.
  5. Press Ctrl + /

You now have the top object AND the bottom object in two segments.

HTH

  • Division is for paths, not objects. Not all objects can be converted into paths. – DanMan Mar 20 '18 at 15:24
0

Apparently, Inkscape booleans do not work with grouped objects. Ungroup the object to be cut off, then select the objects, and then path/ and (example) cut path.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.