[SOLVED] Resizing objects while preserving relative distance

Post questions on how to use or achieve an effect in Inkscape.
Malvineous
Posts: 3
Joined: Sun Aug 02, 2015 1:45 pm

[SOLVED] Resizing objects while preserving relative distance

Postby Malvineous » Sun Aug 02, 2015 2:01 pm

Hi all,

I am having some trouble trying to work out how to resize a group of objects without scaling them. Essentially I want to drag half the nodes that make up a shape, so that the shapes get resized but certain proportions remain the same.

It's a bit difficult to explain, so here is an example:

SVG Image

Box A is the original, and is one rectangle on top of the other. Notice how the red rectangle is the same thickness all around the green one.

If I simply scale the two objects, I end up with Box B. Here the red rectangle is thinner on the top and bottom, which I don't want.

What I really want is box C, where the object has been resized but the red rectangle is the same thickness on all sides.

I realise this looks like a "stroke" issue, where the stroke is being resized along with the image, but this is not the case - I am aware of the tools available to prevent that from happening. This is just a simplified example. My real image is one of a computer screen I am trying to resize from 16:10 to 16:9 and the bezel keeps shrinking (like in Box B) whereas it needs to stay the same thickness as the monitor size changes (like Box C).

I have tried to edit nodes on the shape but this only allows me to edit one shape at a time, I have not figured out a way to select multiple nodes from different objects and move them as a group (without affecting the other nodes in the group also.)

Surely there is a way to do this! What am I missing?
Last edited by Malvineous on Sun Aug 02, 2015 7:20 pm, edited 1 time in total.

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

Re: Resizing objects while preserving relative distance

Postby brynn » Sun Aug 02, 2015 4:27 pm

There is! And it looks like you figured it out. How did you draw C?

But just for the record. If you select the red and green squares at the same time (if they aren't paths, do Path menu > Object to Path) you can switch to the Node tool and select the top nodes of both the red and green squares, at the same time, and drag them. Either use grid or guides and snapping, or measure the precise distance you need to move them, if you need precision.

Or you could just as easily select one at a time, and move the nodes for one object at a time.

To make a multiple selection, whether objects or nodes, use Shift key.

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

Re: Resizing objects while preserving relative distance

Postby brynn » Sun Aug 02, 2015 4:40 pm

Also, before you post a streak of questions that are already answered, you can look for answers:

1 -- in the manual: Help menu > Inkscape manual
2 -- in tutorials: see my signature
3 -- in this forum (search in top right corner)
4 -- and as always, the internet

We're very happy to answer questions, but you'll learn much more, if you can find them yourself. And we feel a lot better about answering, if we know you've tried. :D

Malvineous
Posts: 3
Joined: Sun Aug 02, 2015 1:45 pm

Re: Resizing objects while preserving relative distance

Postby Malvineous » Sun Aug 02, 2015 7:20 pm

Thanks for the reply! Don't worry, I've been using Inkscape on and off for a few years, this is just the first time I encountered something I couldn't fix on my own, and after a good hour on Google I couldn't find anyone else who had the same problem!

I followed your instructions and I was able to get it to work! It wasn't as obvious as I thought though - it took me a while to realise that selecting objects then switching to the node tool shows all the nodes in a deselected state (I thought they remained selected), turns out you have to drag a box around them to select them a second time, here I was trying to deselect them instead. Then after converting the objects to paths and selecting the right nodes, every time I tried to move them one of the edges would curve instead of the whole selection moving. Turns out you just have to keep trying one area after the other until you hit upon the node that results in the whole lot moving as expected. A little bit weird but now I know for next time!

(Also for the record, I drew Box C by entering in the coordinates by hand, but alas the real image was much too complicated for that! I've also run into the problem a couple of times before so I thought there has to be a better way - and now I know there is! Thanks again.)

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

Re: [SOLVED] Resizing objects while preserving relative dist

Postby Lazur » Sun Aug 02, 2015 10:15 pm

Grouping should works as B.
C looks more as if A was a rectangle with a red stroke and green fill, that you resized while at the preferences optimized transformations are set (then B would look as with preserved transformations).

Malvineous
Posts: 3
Joined: Sun Aug 02, 2015 1:45 pm

Re: [SOLVED] Resizing objects while preserving relative dist

Postby Malvineous » Sun Aug 02, 2015 10:45 pm

It's an SVG, you can right-click on it to view image/download. There is no stroke on either shape, it only looks like this because I simplified the example. If it *was* stroke then the solution would be easy - just click a toolbar button!

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

Re: [SOLVED] Resizing objects while preserving relative dist

Postby brynn » Sun Aug 02, 2015 11:43 pm

I'm glad you worked it out :D

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

Re: Resizing objects while preserving relative distance

Postby druban » Mon Aug 03, 2015 9:17 am

Malvineous wrote:... Turns out you just have to keep trying one area after the other until you hit upon the node that results in the whole lot moving as expected...


It sounds as if you might have been 1. moving handles or 2. moving a smooth node that is connected to another smooth node that is stationary. Trying one node after another as I am sure you realize is not the way to go, since you might be working with objects that have many more nodes than your last object. There is a button in the control bar at the top of the window that toggles handle display on and off. This may help you see what is going on in the first case. There is another button in the control bar for the :tool_node: that 'makes selected segments straight'. This would fix the other problem.
Your mind is what you think it is.


Return to “Help with using Inkscape”