Complex path automatically becomes group?

Post questions on how to use or achieve an effect in Inkscape.
knurledflanges
Posts: 6
Joined: Mon Jan 17, 2011 7:35 am

Complex path automatically becomes group?

Postby knurledflanges » Tue Jan 25, 2011 1:00 pm

Hi Everyone,
Encountered a strange problem tonight. I do a lot of interior shading for objects, usually simple ones, where I duplicate the object, make the dupe black with lowered opacity, duplicate the black duplicate, offset and/or scale the new duplicate according to lighting, and then do Difference, subtracting duplicate 2 from duplicate 1.
I was doing this tonight with something I had created, a flower where each petal is a complex group, which was then duplicated and rotated 6 times to make the complete flower. I figured I could do shading on these the same way, by selecting the flower group, duplicating that, making it black, and doing Combine on it. However, what happens when I do this is that first it says I've indeed created and have selected just one path, 168 nodes, but then when I go to duplicate that path to create "duplicate 2," it goes to calling each one a group of 4 objects. Am I butting up against some limitation of inkscape?
Thanks

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

Re: Complex path automatically becomes group?

Postby brynn » Tue Jan 25, 2011 1:51 pm

Hi knurledflanges,
Hhm, I'm not clear what you're doing. Well, I AM clear about the general process:
I do a lot of interior shading for objects, usually simple ones, where I duplicate the object, make the dupe black with lowered opacity, duplicate the black duplicate, offset and/or scale the new duplicate according to lighting, and then do Difference, subtracting duplicate 2 from duplicate 1.


Here's where I get lost:
I figured I could do shading on these the same way, by selecting the flower group, duplicating that, making it black, and doing Combine on it.

In order to combine, you would first have to Ungroup. But my bigger question, WHY do you Combine? Or did you mean Difference???

However, what happens when I do this is that first it says I've indeed created and have selected just one path, 168 nodes, but then when I go to duplicate that path to create "duplicate 2," it goes to calling each one a group of 4 objects.

What I don't understand is why it's calling it a path with however-many nodes, when you've said that each flower petal is a "complex group". I'm still not sure I understand, but from what I do, it seems that "group of 4 objects" is correct, while "path of n nodes" is not correct.

Maybe you're having trouble getting the right thing selected? That happens to me all the time :roll: But if not, if you could clarify a bit more, so I understand.....or maybe someone else can see the problem?

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: Complex path automatically becomes group?

Postby ~suv » Tue Jan 25, 2011 4:13 pm

brynn wrote:In order to combine, you would first have to Ungroup.
No - since Inkscape 0.47, you can 'combine' a group i.e. all paths inside the group are combined into one path, but that path stays within the group - see Combine works on groups from the release notes for Inkscape 0.47. This was implemented together with Converting text to path produces a group.

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

Re: Complex path automatically becomes group?

Postby brynn » Tue Jan 25, 2011 9:42 pm

Interesting! Thank you ~suv! This explains a lot to me :D

Ok kf, I've tried to test this on Windows 7, 64-bit and Inkscape 0.48. Let me explain my test, and you can say if it's comparable to what you're doing, ok?
  • To represent your petal, I did this:
    • made 3 rectangles
    • Object to Path
    • Group 3 paths
  • Duplicate
  • Combine -- Status area says "Path (12 nodes) in g1234 (layer Layer 1)"
  • Duplicate -- Status area still says same
But after deselecting, and clicking again on the newly duplicated combined path, it does say "Group of 2 objects". Each object is one of the duplicates. Apparently combining the group not only creates a compound path, it also creates a new group of one object. When you duplicate it again, you have a group of 2 objects.

So have I faithfully reproduced your problem? If so, my result is 'group of 2 objects', while yours is 'group of 4'. So I'm not sure....Image Could you have started with other groups to begin with? Or did I not reproduce the problem properly?

I found this very confusing to reproduce, especially when the group of 3 objects was combined to form both a compound path and group of 1. I know that if you duplicate a group, normally you get another identical group. But what I've found confusing, is that if, after combining, I deselect and then reselect before duplicating, I get a group of 1 object. If I don't deselect in between, I get a group of 2 objects!

Here's a sample file, including step-by-step instructions. Please note that I have skipped the first duplication, for simplicity and clarity, in this sample file. I just first want to understand this deselect issue before continuing.

Thanks for your patience :D

gp-dup-comb.svg
(15.12 KiB) Downloaded 175 times

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: Complex path automatically becomes group?

Postby ~suv » Wed Jan 26, 2011 12:37 am

brynn wrote:I know that if you duplicate a group, normally you get another identical group. But what I've found confusing, is that if, after combining, I deselect and then reselect before duplicating, I get a group of 1 object. If I don't deselect in between, I get a group of 2 objects!

When combining a group (which consists of several paths) the resulting combined path - which is selected after the command has finished - still is inside the group, and the message in the status line tells you this: Path (12 nodes) in group g17949 …. If you now duplicate the still selected, combined path, you create a duplicate within the group. The same would happen if you 'Ctrl'+click an object to select it within a group and duplicate it.

If you want to duplicate the group itself - which previously contained three paths and now the combined path - deselect the combined path, then select the group and apply 'Edit > Duplicate'.

Or - to avoid any confusion due to different group levels - ungroup it first, keep the selection and then combine it.

knurledflanges
Posts: 6
Joined: Mon Jan 17, 2011 7:35 am

Re: Complex path automatically becomes group?

Postby knurledflanges » Wed Jan 26, 2011 9:20 am

~suv wrote:
brynn wrote:I know that if you duplicate a group, normally you get another identical group. But what I've found confusing, is that if, after combining, I deselect and then reselect before duplicating, I get a group of 1 object. If I don't deselect in between, I get a group of 2 objects!

When combining a group (which consists of several paths) the resulting combined path - which is selected after the command has finished - still is inside the group, and the message in the status line tells you this: Path (12 nodes) in group g17949 …. If you now duplicate the still selected, combined path, you create a duplicate within the group. The same would happen if you 'Ctrl'+click an object to select it within a group and duplicate it.

If you want to duplicate the group itself - which previously contained three paths and now the combined path - deselect the combined path, then select the group and apply 'Edit > Duplicate'.

Or - to avoid any confusion due to different group levels - ungroup it first, keep the selection and then combine it.


I believe this clears it all up for me. Thanks a bunch both of you!

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

Re: Complex path automatically becomes group?

Postby brynn » Wed Jan 26, 2011 2:28 pm

Hhmmm....
Thanks ~suv. I understand what you said, and it explains the problems we were both having. Something about it doesn't sit well with me, but I can't really say why at the moment......

Ok, so after you Combine the Group, you end up already being inside the group, as long as you don't deselect. Right? When you deselect, it takes you back out of the group? OH! Ok, here's what seems weird to me. Normally when you enter a group, the Layers indicator says "g1234". But after combining a group, if you end up already being inside the group, why does it say "Layer 1" (in my example). Does that make sense??

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: Complex path automatically becomes group?

Postby ~suv » Wed Jan 26, 2011 3:07 pm

brynn wrote:Something about it doesn't sit well with me, but I can't really say why at the moment......

Ok, so after you Combine the Group, you end up already being inside the group, as long as you don't deselect. Right?
No.

As described on the linked manual page about groups, there is a difference between entering a group (by double-click or 'Ctrl+<enter>) and 'Ctrl'+selecting an object within (nested) group(s).

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

Re: Complex path automatically becomes group?

Postby brynn » Wed Jan 26, 2011 4:28 pm

A Group can be entered or turned into a temporary Layer for editing.

Aaaah, I see now! Select within a group is different.

Thanks ~suv! I learn SO much from you :D


Return to “Help with using Inkscape”