Inkscape Community

Help Using Inkscape => Beyond the Basics => Topic started by: jcrb10 on February 08, 2018, 04:15:01 AM

Title: How to cut multiple, overlapping paths from a background
Post by: jcrb10 on February 08, 2018, 04:15:01 AM
I'm trying to cut multiple, overlapping paths from one rectangle.

Initially I tried to combine all of these paths, but because the paths overlap, I get undesirable path combinations (with many undesired gaps etc.)

I want to effectively invert the grass at the bottom of the image so that the block shape acts like a stencil of the grass, all in a single path.

The output would be similar to the attached file cut_paths_transparent.png (I created this by exporting with the grass a white, and then making the colour white be transparent. However, I'd prefer not to have to do this).

How can I cut away these multiple blades of grass and be left with a stencil of the grass?

Thank you.
Title: Re: How to cut multiple, overlapping paths from a background
Post by: Moini on February 08, 2018, 03:19:34 PM
Do:

Select all grass blades.
Path > Union.
Put rectangle below.
Select grass + rectangle.
Do Path > Difference.
Title: Re: How to cut multiple, overlapping paths from a background
Post by: jcrb10 on February 09, 2018, 04:31:31 AM
I have tried to do Path > Union for all of the blades of grass, however nothing seems to happen. I've also tried to do it with just 2 blades but it still isn't working (I assumed it was potentially because of processing time if there were 100s of blades). Do I need to pre-prepare the blade paths in anyway before doing Path > Union?
Title: Re: How to cut multiple, overlapping paths from a background
Post by: Moini on February 09, 2018, 06:00:00 PM
What kind of objects are your blades? Checkout the status bar, when you have them selected with the select tool.
It will also print out the error message when something, like the union, does not work.
Title: Re: How to cut multiple, overlapping paths from a background
Post by: brynn on February 10, 2018, 04:23:43 PM
They're in a Group.  Plus, you have a lot of strange objects added on top, to cover up holes which I guess you don't want.  I'll make a video, rather than type everything out.  Back shortly.
Title: Re: How to cut multiple, overlapping paths from a background
Post by: brynn on February 10, 2018, 04:47:22 PM
https://inkscapecommunity.com/jd/vids/gd.mp4

In case it's hard to see because of the video branding watermark, the very last step I'm using the black chip on the palette, to change the final result from yellow to black.
Title: Re: How to cut multiple, overlapping paths from a background
Post by: jcrb10 on February 12, 2018, 03:14:44 PM
Thank you very much for that - it worked.

The main thing was Ungrouping twice so as to change the objects to paths.