How do I cut out a section of an object/path

Post questions on how to use or achieve an effect in Inkscape.
oswaldasmith
Posts: 7
Joined: Sat Dec 13, 2008 5:21 am

How do I cut out a section of an object/path

Postby oswaldasmith » Fri Jan 20, 2012 11:47 pm

Hi all,

I'm creating a logo that will have spacing going through the letters. I've created the effect by simply drawing a line through them that matches the background color. As a result, whenever the background color changes, I have to change the line color as well. Is there a more 'elegant' way, that will actually create a space in the letters so it simply shows the color beneath it? I've experimented with Boolean path operations, but none of them seem to achieve it.

Take a look at the attachment to see what I'm talking about.

Thanks,
Oz
Attachments
CUT PATH.png
CUT PATH.png (5.75 KiB) Viewed 41680 times

mathog
Posts: 82
Joined: Tue Feb 08, 2011 6:05 am

Re: How do I cut out a section of an object/path

Postby mathog » Sat Jan 21, 2012 8:04 am

Possible, but there seems to be one slight complication...

1. Draw the letter as a path and replicate it as in your drawing. In theory you could start with text and convert that to path, but that was the complication, the 5th operation wouldn't work on the resulting path.
2. Draw a rectangle. Be sure the rectangle is above (raise to top) the letters. Not necessary to convert it to a path.
3. Position the rectangle where you want to cut.
4. Select the rectangle and the letters.
5. Path -> difference

User avatar
prkos
Posts: 1625
Joined: Tue Nov 06, 2007 8:45 am
Location: Croatia

Re: How do I cut out a section of an object/path

Postby prkos » Sat Jan 21, 2012 8:21 am

I think the most elegant way would be to use Clip because it's a nondestructive function, you can easily undo it, and you can always do Difference later when the logo is finished and nothing needs to be tweaked.

Create a big rectangle that is larger than your logo, then create a smaller one that is used for the "punch out stripe", do a Difference (Ctrl + -) to get the shape that covers the areas of the logo you actually want to show, a bit counter intuitive but that's the way to go. Lower the object opacity so you can see the logo behind it, this should make it easier to understand. Also give this object some weird color so you know it's a helper object and not part of the drawing just in case...

Now group the logo, even if it's just one text object, it's better to clip groups because you can enter the group even when it's clipped and rearrange objects inside it, add new ones etc.

Select the logo group, select the clipping path (which should be above logo) and do Object > Clip > Set. You now have a logo with a strikeout. You can edit objects inside the group, and even edit the clipping path without releasing the clip by using Node tool and the appropriate button from the toolbar (clipping path are marked green by default).
just hand over the chocolate and nobody gets hurt

Inkscape Manual on Floss
Inkscape FAQ
very comprehensive Inkscape guide
Inkscape 0.48 Illustrator's Cookbook - 109 recipes to learn and explore Inkscape - with SVG examples to download

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: How do I cut out a section of an object/path

Postby druban » Sat Jan 21, 2012 4:47 pm

An alternative to clipping would be masking. Often clipping is simpler than masking, e.g. when one is trimming the border of a group of objects, but in this case the two methods are of similar complexity.
rect4070.png
rect4070.png (81.12 KiB) Viewed 41634 times
Your mind is what you think it is.

oswaldasmith
Posts: 7
Joined: Sat Dec 13, 2008 5:21 am

Re: How do I cut out a section of an object/path

Postby oswaldasmith » Sun Jan 22, 2012 7:44 am

Thanks everyone! I'll try these methods out later tonight.

User avatar
chief80
Posts: 29
Joined: Sun Nov 06, 2011 3:18 am

Re: How do I cut out a section of an object/path

Postby chief80 » Mon Jan 23, 2012 6:03 am

I have a completely different way to do this, that involves the inkscape tracing method. This is the easiest method for me, because it involves no thinking :D

1. Make your text black and draw a white square over it where you want the space.
Image

2. With the snipping tool utility, or any similar application, take a screenshot of the text with the square over it.
Image
Image

3. Save your image, then import it back into inkscape. Then, select your image and press "Shift+Alt+B". This will trace your image with transparency in the middle. Press "OK" and your traced image will be sitting right on top of the original picture, so you can just drag it off the top.
Image

4. Now you can easily change the color of your text as you please, and it can be used anywhere! :D
Image


Return to “Help with using Inkscape”