Dear board members,
I am new to Inkscape and want to use it to create some monochrome icons I later want to use as part of an icon font. So far I am making great progress and already created some icons, but now I am stuck at the "popular" Path->Difference/Clipping/Cropping problem. I read the PDF provided here regarding this topic, and my problem basically is that I do not know which technique I have to use in my case - despite the numorous examples in the PDF and elsewhere. I have also tried to find a solution by myself without success, so I would be really thankful if someone here can maybe point me in the right direction.
What I want to do is an "add element"-icon:
(I created this by using white color in Inkscape which obviously is the wrong way)
This is my current SVG with the areas I want to "remove" marked as red:
I have tried every technique I found, but I do not get this to work. For example, using Path->Difference produces a very weird result:
I do not know how to achieve the result I want, does somebody here maybe know what I have to do? My guess is that this is a very common problem (at least I will need this "cutting out" in many other icons), but I am using the wrong keywords in my search.
Thank you for any help!
How to use Path->Difference properly in monochrom icon
Re: How to use Path->Difference properly in monochrom icon

Welcome to InkscapeForum!
I think you might be referring to a tutorial that I wrote. And yes, this is a little more complicated example. There may be a few ways to go about this. The simplest way that I can think of, probably won't work for your purpose. But if you make the outer circle which has red stroke and no fill, into a white fill and white stroke (or remove the stroke and make the circle a little wider to compensate for the lost wide stroke) then move it down one step in z-order, it would look like what you want. However, that simply covers up the box with the black strokes, with a white circle. The icon won't be transparent in that area.
To have it only black and transparent, there still are a few ways to go about doing it. Do the paths with black strokes need to remain simple paths like they are now? You could convert the strokes which make up the black box to path (Path menu > Stroke to Path), and then change the large circle with the red stroke and no fill, to a slightly larger circle with a fill and no stroke, and then difference them. If you try that, you'll see what Stroke to Path does. It looks just the same, but the box is no longer made of a simple path or paths with black stroke. It's got a few closed paths, with black fill and no stroke.
I don't know much about making fonts, so I don't know if the letters, or icons in this case, should be left as simple paths. If that's the case, I can still think of at least 2 ways to do it. The best for me would be node editing. Many people avoid node editing like the plague. I rather enjoy it. Anyway, you'd use the large circle with red stroke and no fill as a guide. Add new nodes to the paths which make up the black box at the places where the circle touches it. Break the paths at those new nodes. Then delete the nodes that aren't needed. The red circle could also be deleted.
After doing any of these, you'd need to remove the red fill from the black circle. And there's one other, longer way around, to keep simple paths. It still involves some node editing, but it might be a little more accurate than how I explained above. It would take a little longer to write out all the steps, so I'll hold off for now. But I don't mind doing it, if you're interested. If precision is important, this might indeed be a better way.
Let us know how it goes
Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Re: How to use Path->Difference properly in monochrom icon
Pilosopong Tasyo, brynn,
THANK YOU SO MUCH! I think I managed to get it to work! I will write back more in detail tomorrow (it's almost 3am here now^^), just wanted to thank you!
Good night!
THANK YOU SO MUCH! I think I managed to get it to work! I will write back more in detail tomorrow (it's almost 3am here now^^), just wanted to thank you!
Good night!
Re: How to use Path->Difference properly in monochrom icon
Oops! I'm not sure how I missed PT's post. It must have posted while I was typing mine.
gman, I hope it continues to go well
gman, I hope it continues to go well
Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Re: How to use Path->Difference properly in monochrom icon
Pilosopong Tasyo wrote:Convert the 3D box from a stroke to a path first
brynn wrote:You could convert the strokes which make up the black box to path (Path menu > Stroke to Path), and then change the large circle with the red stroke and no fill, to a slightly larger circle with a fill and no stroke, and then difference them. If you try that, you'll see what Stroke to Path does. It looks just the same, but the box is no longer made of a simple path or paths with black stroke. It's got a few closed paths, with black fill and no stroke.
So here my more detailed findings: the "Stroke to Path" function was the key to my solution, you both were exactly right! I spend some time today to test this out more and especially understand what the function actually does.
Not only does the "difference" then work wonderfully with the circle that I had marked red, it also turns out to be a great thing for making monochrome icons for an icon font generally. I did some tests where I converted other elements in my icon to a path, and the resulting icon in the font turned out to me more as I wanted. In detail: some important settings such as e.g. round caps were not imported properly when I started doing my conversion from SVG to the icon font. When I use the "Stroke to Path" function on everything before the conversion, I get a slightly bigger file size for the icon (due to the added nodes I guess), but the final icon is much better and exactly how I want it to be. Also, the icons look more "crisp" in the final stage.
So thank you two very much again! I had almost given up on making the icons myself but now everything seems possible again
Re: How to use Path->Difference properly in monochrom icon
You're welcome and I'm glad it worked 
I have not quite enough knowledge about what happens between the drawing of the character, and turning that into actual font. I thought that Stroke to Path might either be perfect, or entirely wrong
So anyway, have fun!
I have not quite enough knowledge about what happens between the drawing of the character, and turning that into actual font. I thought that Stroke to Path might either be perfect, or entirely wrong
Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design

