Inset a group of objects

Post questions on how to use or achieve an effect in Inkscape.
Winter
Posts: 5
Joined: Sun Feb 14, 2016 6:21 am

Inset a group of objects

Postby Winter » Sun Feb 14, 2016 6:26 am

So, I have 2 groups of objects. I want to leave a small space between them. Is there any way to inset the border between them without insetting all the objects inside the group?
I have tried moving them the groups, but they just end up overlapping. The same thing happens when I scale them.

Does anyone know a way to add space between the two groups?
Thanks in advance.

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Inset a group of objects

Postby Lazur » Sun Feb 14, 2016 7:08 am

Hi.

I'm not entirelly clear of your goal.
You just want to move some objects closer to eachother a tad bit?

hulf2012
Posts: 716
Joined: Sat Nov 24, 2012 12:37 pm

Re: Inset a group of objects

Postby hulf2012 » Sun Feb 14, 2016 7:12 am

Hello

If you could provide a visualization or better a sample file, It will help to give you more feedback

Not for groups, but for paths, it exists the Path Offset Commands

http://tavmjong.free.fr/INKSCAPE/MANUAL ... hs-Offsets

If your groups are only composed of path I suggest:
- Duplicate each of your groups
- Convert and join (or combine) all the paths of your groups. See here http://tavmjong.free.fr/INKSCAPE/MANUAL ... ining.html
- Apply a path offset until you are satisfied
- A trick: It's possible to have more control of the dynamic offset editing the SVG code with the XML editor (Ctrl + Shift + X). I wish I could explain it better but I prefer you could provide more info about what you have and what do you want
If you have problems:
1.- Post a sample (or samples) of your file please.
2.- Please check here:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/index.html
3.- If you manage to solve your problem, please post here your solution.

Winter
Posts: 5
Joined: Sun Feb 14, 2016 6:21 am

Re: Inset a group of objects

Postby Winter » Sun Feb 14, 2016 8:36 am

Thank you for the replies.
A little explanation about what I'm trying to do:
I have two groups, one in red and one in blue. What I'm trying to do is put a space in between the red group and the blue group, all while not having space in between pieces in one group. If I try to move the pieces apart, as shown in the image, they just overlap. When I try to scale the groups to one smaller than the other, they also overlap.
Inkscape Capture.JPG
Inkscape Capture.JPG (94.91 KiB) Viewed 1791 times


Now, in reference to your idea, Hulf,
Convert and join (or combine) all the paths of your groups
That won't work. It was a good idea, but it was my mistake not providing enough context. The problem is that I can't combine all the paths in the group, as they all need to stay their as own object.

Again, thank you for helping me, and I hope this has provided you with a little more needed context.

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Inset a group of objects

Postby Lazur » Sun Feb 14, 2016 9:22 am

Interesting.

Would try drawing a white stroked path over the desired area, that would cover the space needed.
Then duplicate it, convert stroke to path, break it apart to the sides, and give those red and white strokes.

Winter
Posts: 5
Joined: Sun Feb 14, 2016 6:21 am

Re: Inset a group of objects

Postby Winter » Sun Feb 14, 2016 10:16 am

That is a good idea, but I don't believe it would work for what I'm trying to do.
The problem is that I have to have the border attached to the objects, as for what I am using it for only shows the specific shapes with ID's. Doing your solution would create only a visual fix in Inkscape, but I'm trying to actually separate them (I think it only creates a visual fix, but I might just be doing it wrong). Thank you for the advice, though.

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Inset a group of objects

Postby Lazur » Sun Feb 14, 2016 10:20 am

Visual fix, as there is no other way yet. As far as I understand you would need a boolean operation -subtact- on each of the paths in a live way, preserving the original shapes too, and displaying the style attribute of the stroke as if the subtracting was done.
You could use masking or clipping if those paths didn't have any stroke but fill. But on strokes it won't work.

Winter
Posts: 5
Joined: Sun Feb 14, 2016 6:21 am

Re: Inset a group of objects

Postby Winter » Sun Feb 14, 2016 10:51 am

Thank you for the help, Lazur. I think I'll just start the project again.

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

Re: Inset a group of objects

Postby brynn » Sun Feb 14, 2016 7:43 pm

You might not need to start the project again. I think I can see a relatively simple solution.....if you're not afraid of a little node editing.

First, duplicate everything and set aside, so nothing gets lost, in case this doesn't work or isn't acceptable in the end.

Duplicate both groups again.
Ungroup the red and do Path menu > Union.
Do the same for the blue.
For those results, do Path menu > Inset, until you have the spacing you need.

Select the nodes at the top and bottom end of the adjacent borders, 2 for red and 2 for blue.
Click "Break path at selected nodes" button on the Node tool control bar (4th button from the left end)
Path menu > Break Apart
Delete the 2 outer paths

Now manually extend the top and bottom of each path, a little beyond the top and bottom borders of the remaining groups
Select the top node of each path
Click "Join selected endnodes with a new segment" button, which is the 5th from the left on the Node tool control bar.
Repeat for the bottom nodes.
Now you should have a strip or sort of ribbon like object that matches the borders quite closely, except for being inset.

This part will be repetitive, but it's the only way. First, duplicate that new strip and either set aside, or put on a hidden layer, so you don't have to realign it later, if necessary. (This is just a failsafe, in case something goes wrong.)

Ungroup the original countries (for now)

Duplicate the strip.
Hold Shift and click on a country. You should have both the strip and 1 country selected.
Path menu > Difference

Repeat those last 3 steps until all the countries have been fixed.
When you get to the last country, skip the duplicating, and use the last strip for the last country.
Now you can group them back together.

That should do it ;)

Winter
Posts: 5
Joined: Sun Feb 14, 2016 6:21 am

Re: Inset a group of objects

Postby Winter » Mon Feb 15, 2016 1:39 am

Good idea, brynn.
I actually did end up thinking of something else before you posted that great idea.
What I did was some node editing, too.
I went into the edit path by node function, and clicked on the border. What I was able to do was group select the nodes from one border, and pull it back to create space. It could look a little messy, but with a little bit of auto-smooth, it looked okay.

I like your idea, and if I make the mistake of not separating before creating it, I will definitely try that fix.


Return to “Help with using Inkscape”