Expand rectangle on one side?

Post questions on how to use or achieve an effect in Inkscape.
Ged
Posts: 50
Joined: Wed Sep 16, 2015 3:01 pm

Expand rectangle on one side?

Postby Ged » Fri May 26, 2017 1:56 pm

I have a number of small rectangles of equal size, next to each other, and grouped. I want to expand them all together by dragging diagonally, but with the left-hand-side height constrained, so that each box gets progressively bigger than the former one. Is there a tool to do this? I am hoping that I do not have to draw each box individually.

:? :tool_rectangle:

Polygon
Posts: 393
Joined: Thu Dec 19, 2013 3:27 am

Re: Expand rectangle on one side?

Postby Polygon » Fri May 26, 2017 4:19 pm

Can´t this be pretty simple achieved by dragging the right middle handle?
ExpandAlong1Axis.png
ExpandAlong1Axis.png (10.88 KiB) Viewed 2796 times


Cheers
P.

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

Re: Expand rectangle on one side?

Postby brynn » Fri May 26, 2017 5:01 pm

I can't think of any way to scale them all at the same time, but scale them by different amounts.

However, there may be a way to accomplish what you want, in a diffrent way. Can you show us a screenshot of all the rectangles?

Ged
Posts: 50
Joined: Wed Sep 16, 2015 3:01 pm

Re: Expand rectangle on one side?

Postby Ged » Fri May 26, 2017 5:22 pm

What I mean is something like this, except more rectangles. (about fifty of them)

SVG Image

At the moment they are all the same size. I want to drag them as shown. Is it possible?

Polygon
Posts: 393
Joined: Thu Dec 19, 2013 3:27 am

Re: Expand rectangle on one side?

Postby Polygon » Fri May 26, 2017 5:38 pm

brynn wrote:I can't think of any way to scale them all at the same time, but scale them by different amounts.

However, there may be a way to accomplish what you want, in a diffrent way. Can you show us a screenshot of all the rectangles?

Can´t "Transform" exactly do this?
But I don´t understand the screenshot. Maybe he needs something tiled clones con do:
tiledClones.png
tiledClones.png (6.54 KiB) Viewed 2771 times


Cheers
P.

Ged
Posts: 50
Joined: Wed Sep 16, 2015 3:01 pm

Re: Expand rectangle on one side?

Postby Ged » Sat May 27, 2017 10:53 am

Hi Polygon,

Cloned Tiles look like what I want, but I cannot duplicate what you've done here. Can you point me to the place in the CTile box (I suspect shift and scale) and tell me what figures to enter?

Also, I see you have an incrementing height. Can we do that with the width too?

theozh
Posts: 437
Joined: Fri Mar 23, 2012 6:30 pm

Re: Expand rectangle on one side?

Postby theozh » Sat May 27, 2017 4:24 pm

As long as you can create new rectangles and do not need to scale existing ones, a solution comes (currently) to my mind:
1. clone your first rectangle
for example:
Shift: per column x 20%, y 0%
Scale: per column x 20%, y 20%
If you want a size increase of 20% for each uncheck cumulate
If you want a size increase 20% of the previous check cumulate
Rows, Column 1 x 4 (or in your case 1 x 50)
Create.

2. Delete the first clone which is identical to the original rectangle.
3. use the Align&Distribute Dialog
3a) to remove overlaps
3b) to align the tops of the rectangles
You might have to move all rectangles as a whole because "remove overlaps" probably shifts all of them. If you want to color them differently you need to unlink the clones (Shift+Alt+D)

ScaledRectangles.png
ScaledRectangles.png (2.26 KiB) Viewed 2716 times
Win7/64, Inkscape 0.92.2

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

Re: Expand rectangle on one side?

Postby brynn » Sat May 27, 2017 5:00 pm

Another way might be to use interpolation. You would start with the smallest rectangle and the largest, and the Interpolation extension puts as many different sizes as you want in between. However, they would not necessarily be aligned side by side, unless you do some extra planning first.

The smallest and largest rectangle would have to be a distance apart which is a multiple of their individual width (I think I said that right).

-- draw the smallest rectangle, convert to path
-- note the width
-- multiply by 50 and add that answer to the current X position of the small rectangle, to find the position for the largest rectangle
-- duplicate the small rectangle
-- change the X value on the control bar, to the position you figured before (edit - don't change the Y value)
-- use the bottom arrow of the Selection handles to drag that rectangle longer (without making wider)
-- Extensions menu > Generate from Path > Interpolate
-- use Interpolation Method = 1, set Interpolation steps to 50
-- Live Preview, or just click Apply

Edit
However, the rectangles will not be progressively larger.... Assuming by progressively larger you mean exponentially larger. Interpolation makes each rectangle exactly the same amount larger/smaller as the one before. While exponentially means the amount each rectangle is larger or smaller than the one before, increases or decreases.

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: Expand rectangle on one side?

Postby Moini » Sat May 27, 2017 6:44 pm

(The exponent can be set in the Interpolation extension dialog)
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

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

Re: Expand rectangle on one side?

Postby brynn » Sat May 27, 2017 7:25 pm

I tried that. But the exponent option seems to affect the placement of the rectangles, rather than their size.

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: Expand rectangle on one side?

Postby Moini » Sat May 27, 2017 8:08 pm

Yes, that's true :-/ If one spaces the result evenly, one gets some kind of logarithmic(?) curve. Only tiled clones can do that. At least in x/y direction.
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)


Return to “Help with using Inkscape”