cut out parts of a group ? (= make holes)

Post questions on how to use or achieve an effect in Inkscape.
v1nce
Posts: 696
Joined: Wed Jan 13, 2010 4:36 am

cut out parts of a group ? (= make holes)

Postby v1nce » Thu May 10, 2012 10:22 pm

Hi

I want to draw a 33rpm disc so I start with stacking/grouping a lot of [more or less]black circles of decreasing sizes.

How do I "draw" a hole in the center of the group ?

I can use exclusion for every individual circle (but this sucks : what if I want to make a smaller hole ?)
I can't use exclusion for the group (or am I missing something ?)

What I've done (and which worked):

draw a rectangle that is wider than the circles.
exclude a circle in the center of this rect.
move this over my group.
cut this out (in French, menu is objet/decoupe) <= this sucks because it's difficult to select both the "mask" (that is over and bigger) and the object.

How would you have done it ?

User avatar
Xav
Posts: 1209
Joined: Fri May 08, 2009 1:18 am
Location: UK
Contact:

Re: cut out parts of a group ? (= make holes)

Postby Xav » Thu May 10, 2012 11:32 pm

It sounds to me like the method you used was a "clipping path" in English. If so, that's the approach I would have taken. Note that it's just the shape of the path itself that's important, not the fill or stroke colour - I usually draw my clipping paths with a thin bright green or bright red stroke and no fill. That means they stand out clearly when I unclip to edit them, but because there's no fill it's easy to select the object underneath as well.

So try your working method, but with no fill, just a stroke, on the "mask".
Co-creator of The Greys and Monsters, Inked - Inkscape drawn webcomics
Web SiteFacebookTwitter

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: cut out parts of a group ? (= make holes)

Postby brynn » Fri May 11, 2012 3:45 am

No, I don't think you can cut something out of a group. To draw an old vinyl album, I would have an underlying black (or dark gray) circle with the hole in the center cut out. (I would draw both circles, apply color to the large one, and use Difference.) (You'd either have to draw the small circle after the large, or move the small one on top of the large one.) Then I'm thinking I would add many concentric circles, or circular paths, to form the "grooves", and probably use different shades of gray for the strokes. I guess it depends on how realistic you want it to look.

Clipping or masking would seem awkward to me (unless there's some blur that you need to get rid of)(or some shading that you need to add), but I do realize that some people might prefer it. I know that Xav's experience is more professional than mine, but in many cases with Inkscape, it simply is personal preference. As I'm sure you know, there are often a few to several ways to accomplish a certain task :D

User avatar
Xav
Posts: 1209
Joined: Fri May 08, 2009 1:18 am
Location: UK
Contact:

Re: cut out parts of a group ? (= make holes)

Postby Xav » Fri May 11, 2012 9:44 pm

brynn wrote:Clipping or masking would seem awkward to me (unless there's some blur that you need to get rid of)(or some shading that you need to add), but I do realize that some people might prefer it.


Actually I would do it exactly the way you suggested - except that the OP said that using "exclusion" (by which I think he means Path > Difference) on every circle "sucks", and implied he wanted some method that would be more flexible if he wants to change the hole size later. That's the only reason I mentioned clipping.

brynn wrote:I know that Xav's experience is more professional than mine...


Ha, ha! Hardly. I just use it for some decidedly non-professional webcomics.

Anyway, clipping in this case is quite simple really:

1) Create the record with no hole in the middle. Group all the parts.
2) Draw a rectangle that encompasses the whole group. Set it to no fill and give it a stroke you can see.
3) Draw a circle for the hole.
4) Select the rectangle and the circle, then Path > Difference to create the clipping path.
5) Select the path and the group, then Right Click > Set Clip.
Co-creator of The Greys and Monsters, Inked - Inkscape drawn webcomics
Web SiteFacebookTwitter

v1nce
Posts: 696
Joined: Wed Jan 13, 2010 4:36 am

Re: cut out parts of a group ? (= make holes)

Postby v1nce » Fri May 11, 2012 9:47 pm

Xav wrote:So try your working method, but with no fill, just a stroke, on the "mask".


Yeah with no fill it's lot easier.
Thanks for the advice

v1nce
Posts: 696
Joined: Wed Jan 13, 2010 4:36 am

Re: cut out parts of a group ? (= make holes)

Postby v1nce » Fri May 11, 2012 9:59 pm

Xav wrote:Actually I would do it exactly the way you suggested - except that the OP said that using "exclusion" (by which I think he means Path > Difference) on every circle "sucks", and implied he wanted some method that would be more flexible if he wants to change the hole size later. That's the only reason I mentioned clipping.


Yeah I was looking for flexibility.
By exclusion I meant Path/Exclusion but Path/Difference gives the same results (and more logical) as the cutted out "hole" is entirely in the shape

Xav wrote:Ha, ha! Hardly. I just use it for some decidedly non-professional webcomics.

Anyway, clipping in this case is quite simple really:

1) Create the record with no hole in the middle. Group all the parts.
2) Draw a rectangle that encompasses the whole group. Set it to no fill and give it a stroke you can see.
3) Draw a circle for the hole.
4) Select the rectangle and the circle, then Path > Difference to create the clipping path.
5) Select the path and the group, then Right Click > Set Clip.


very same except for
4) where I used Path / Exclusion (but, again, the result would be the same)
5) I used the menu instead of the right click

v1nce
Posts: 696
Joined: Wed Jan 13, 2010 4:36 am

Re: cut out parts of a group ? (= make holes)

Postby v1nce » Fri May 11, 2012 10:23 pm

I suggested "automation" for steps 2 & 4

https://bugs.launchpad.net/inkscape/+bug/998022


edited

Someone already asked for it

https://bugs.launchpad.net/inkscape/+bug/412928
Last edited by v1nce on Sat May 12, 2012 1:33 am, edited 1 time in total.

User avatar
Xav
Posts: 1209
Joined: Fri May 08, 2009 1:18 am
Location: UK
Contact:

Re: cut out parts of a group ? (= make holes)

Postby Xav » Fri May 11, 2012 11:54 pm

The way clipping works is part of the SVG spec. A request for an "inverse" option for clip paths as part of SVG2 has been rejected, unfortunately :(

(that doesn't mean that it won't ever be implemented in Inkscape though - there are several features that Inkscape offers which aren't "native" to SVG, but which those clever Inkscape programmers manage to emulate in a compatible way)
Co-creator of The Greys and Monsters, Inked - Inkscape drawn webcomics
Web SiteFacebookTwitter

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: cut out parts of a group ? (= make holes)

Postby brynn » Sat May 12, 2012 4:34 am

Xav wrote:
brynn wrote:Clipping or masking would seem awkward to me (unless there's some blur that you need to get rid of)(or some shading that you need to add), but I do realize that some people might prefer it.


Actually I would do it exactly the way you suggested - except that the OP said that using "exclusion" (by which I think he means Path > Difference) on every circle "sucks", and implied he wanted some method that would be more flexible if he wants to change the hole size later. That's the only reason I mentioned clipping.


Ooohhhh, I missed that part! I was confused by the use of "Exclusion" and "masks" (and of course French may as well be Martian to me, lol) so I just focused on the question "How would you do it?"

But I learn a little more every day :D


Return to “Help with using Inkscape”