1

According to a lot of searches, this is what most people refer to as the requirements for performing the path difference operation:

  • Both objects must be a path
  • There must be no groups of the paths
  • They both must be closed shapes

And yet even though these requirements are met, the following difference operation doesn't work:

I wanted to create something like this:
enter image description here(here I've just filled the top layer with white, since the difference operation hasn't worked)

But, I'm stuck with this:

enter image description here

I am not sure why it doesn't work.

The file is attached here.

2

TLDR: It is working . . . I just tested it.

The reason you can't see it is because of the stroke applied to the black shape which is so thick that it's obscuring the inside of the gap you cut. Simply remove the stroke or make it much thinner, and you will see that it worked.

To differentiate this answer from the other, there are also other possible methods (1 to 3 shown below) to create what you want, without using a Difference operation. These might be especially useful if you want to retain a thick stroke on the underlying object. I also include a 4th method below to show how you could use a Difference operation and retain a thick stroke all around.

List of possible methods:

  1. Do not expand the line to outlines, and instead apply a white stroke. On a white background this will look like it's cut out.
  2. Assuming you have already expanded the line to outlines, Fill the top shape white. On a white background this will look like it's cut out.
  3. Use a mask - where black = transparent, and white = opaque. In the image below the mask used is shown to the right. It is composed of a path with a black stroke and a white filled rectangle, both of which have been grouped together.
  4. Use a Dynamic Offset to increase the width of the filled and stroked top object (shown right), and then do Path > Object to Path, before using it for a Difference operation

enter image description here

4

Remove strokes, they fill the wanted gaps. In Inkscape a half of the stroke is outside the actual shape. Holes of combined shapes have also strokes if the shape has one.

Your base shape seems to lose its proportions if you remove the stroke after you have already got it right. You can convert the stroke to path and make an union with the base shape. Then the stroke can be removed without making the shape too small.

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.