25 Replies Latest reply: Apr 28, 2012 2:48 PM by Steve Fairbairn RSS

    Proportionally resizing one object to fit another object. How?

    loriot123

      Hi, thanks a lot for reading! Long time Illustrator User but I just realized I don’t know how to do something very basic. I want to resize one group of objects to fit to another object, without using pixel or cm units (all vector/relative). Here’s a short animation showing what I want to do [click first image to view animation]

       

      illustrator_resize_adobe_forum2.gif

       

      As you can see, it is impossible to tell when you reached the correct spot, as it doesn’t snap to the other object when using the resize tool.

       

      Illustrator_Resize.jpg

        • 1. Re: Proportionally resizing one object to fit another object. How?
          Steve Fairbairn Community Member

          Use the Transform panel to enter the desired width of your group. Constrain width and height proportions.

          • 2. Re: Proportionally resizing one object to fit another object. How?
            emil emil Community Member

            Interactive snapping in Illustrator is limited only under the cursor. So, if the point your are trying to snap is not under the cursor you are out of luck.  Also what you demonstrated shows that the Smart Guides won't detect overlapping parts of guides and paths which may be a bug, although it seems to snap if under the cursor and moving (not scaling). So, you don't have much options but to use a numeric input as Steve suggested.

            • 3. Re: Proportionally resizing one object to fit another object. How?
              loriot123 Community Member

              But Numeric will never be precise unless I first resize the first object, to then resize the second accordingly. This becomes impossible once you have 3 or more objects and have to resize them all based on the intended resizing of one reference object in the group. If Photoshop this would easily be possible, even for Vector, because of the frame around the object in Transform Mode (Cmd+T). How can a vector app like Illustrator be less precise for Vector work. Weird.

              • 4. Re: Proportionally resizing one object to fit another object. How?
                emil emil Community Member

                Just select your target object (the background in your case) and copy its width value in the Transform panel. Then select all objects you want to scale together, and paste in the width box in the Transform panel making sure before that Constrain Proportions is on (clicking on the chain next to the input fields toggles it). Then move the selection of scaled object in place with the help of smart guides. Alternatively you can first put the selection of objects in place by snapping one of its bounding box corners to a point and in the Transform panel change the reference point located at the left side of the Transform panel.

                • 5. Re: Proportionally resizing one object to fit another object. How?
                  Jacob Bugge MVP

                  loriot,

                   

                  You may, with Smart Guides on:

                   

                  1) Left align the object to scale with the back ground object, as you have done, with the upper left corner placed as desired (at least roughly/temporarily),

                  2) Select the object to scale, change to the Scale Tool, click the upper left corner to keep it there, and drag the lower right corner towards it, Smart Guides showing the way, and then Smart Guides will say intersect when you are there, over the right side segment of the background object path.

                   

                  You may move the scaled object up and down afterwards, of course.

                  • 6. Re: Proportionally resizing one object to fit another object. How?
                    Steve Fairbairn Community Member

                    Numeric will never be precise unless I first resize the first object, to then resize the second accordingly.

                    No, you're thinking it wrong. First measure the width of your target object and write it down. Then use the Transform panel like I suggested to enter the combined width of the other objects. You don't have to group them, just select them together. And don't forget to link width/height to constrain the scaling.

                    • 7. Re: Proportionally resizing one object to fit another object. How?
                      emil emil Community Member

                      Jacob Bugge wrote:

                      ...

                      2) Select the object to scale, change to the Scale Tool, click the upper left corner to keep it there, and drag the lower right corner towards it, Smart Guides showing the way, and then Smart Guides will say intersect when you are there, over the right side segment of the background object path.

                      ...

                      Ah ha, so, the Smart Guides don't like holding Shift !  Because with holding Shift the point to be snapped won't stay under the cursor and this won't work. I guess they have designed the smart guides to work without using any other constraints. It also works if you drag straight towards the edge and after intersecting with it drag along the edge where it intersect with the diagonal of the scaled object - this may be preferable for small scale amounts where the label of the smart guides hides the diagonal guide line. And I guess eyeballing may be good enough for most cases.

                      Also, when I first tried this it didn't work for me because in the Smart Guide section of the preferences the Transform tools were not checked. It may be my settings, but I can't remember ever turning this off, so it may be off by default.

                       

                      Good tip, Jacob! Thanks

                      • 8. Re: Proportionally resizing one object to fit another object. How?
                        Jacob Bugge MVP

                        You are welcome, Emil.

                         

                        ... in the Smart Guide section of the preferences the Transform tools were not checked. It may be my settings, but I can't remember ever turning this off, so it may be off by default.

                         

                        In the old days it must have been on by default because I cannot remember ever turning it on.

                        • 9. Re: Proportionally resizing one object to fit another object. How?
                          loriot123 Community Member

                          Thanks everybody! I guess there is no way to change the impractical fact that the cursor will move away from the starting point with or without smart guides on for Transform Tools and that the Smart Guides don’t inform you when the starting point intersects with another object. Instead it only tells you when the cursor intersects, completely useless as far as I can tell.

                          • 10. Re: Proportionally resizing one object to fit another object. How?
                            Jacob Bugge MVP

                            This is strange, loriot.

                             

                            It seems to work for Emil and me, across quite different versions.

                             

                            Just to rule out the (maybe less) obvious: do you have CS5, and is Align to Pixel Grid ticked in the Transform panel (when you select (one of) the objects to be scaled?

                            • 11. Re: Proportionally resizing one object to fit another object. How?
                              Wade_Zimmerman Community Member

                              Jacob has the answer you have align to pixel grid selected otherwise it would work.

                              • 12. Re: Proportionally resizing one object to fit another object. How?
                                Steve Fairbairn Community Member

                                There's nothing wrong with the transform method either.

                                Measure your target width (in this case 50).

                                Select the other stuff and enter 50 in the width box, with width and height linked/constrained.

                                Picture 2.png

                                • 13. Re: Proportionally resizing one object to fit another object. How?
                                  loriot123 Community Member

                                  Thanks for the replies!

                                   

                                  I have CS5 and Pixel Grid off and any other Grid off too.

                                   

                                  No Emil actually confirmed that it’s simply the way the Transform Tool works, as soon as you start to drag your cursor goes its own way and leaves the starting point of the object behind. Smart Guides will not tell you when the corner you dragged from passes another point or line. The information that your cursor itself is crossing a point or line is useless. In this regard the Transform Tool is very different from the standard handles in Ai or the Transform Mode in Ps.

                                   

                                  Ok so let’s say I go with the Transform Panel instead, is 12.853mm the exact value or does it just stop after 3 decimals and the real number is different, meaning a drag/snapping would be exact but a copy/paste of the value would be slightly off?

                                   

                                  What if you have two objects that you want to resize together to fit a third object? For example what if I want to resize the blue and the red object to fit to the green object while staying the same size relative to each other? I could copy/paste the value for the red object but how do I then resize the blue object accordingly? What if I have a group of 10?

                                  Resize.jpg

                                  • 14. Re: Proportionally resizing one object to fit another object. How?
                                    Steve Fairbairn Community Member

                                    In a case like this I would make a note of the width of the green and red objects.

                                    Then I would calculate the scale % (green divided by red x 100).

                                    Then select red and blue and enter the scale % using the Scale tool and with the point of origin on the corner you want to enlarge from.

                                     

                                    You can also enter the % in the Transform panel (enter % after the digit) and specify the corner.

                                     

                                    I always find it useful to have a piece of paper and a pocket calculator at hand for this kind of work.

                                    • 15. Re: Proportionally resizing one object to fit another object. How?
                                      Jacob Bugge MVP

                                      loriot,

                                       

                                      No Emil actually confirmed that it’s simply the way the Transform Tool works,

                                       

                                      You may reread post #7.

                                       

                                      In the following screenshot, the black guide line was simply made by Direct Selecting the rightmost segment of the green rectangle, giving it a fill instead of a stroke, and extending it downwards; ultimately it was just deleted.

                                       

                                      The difficult part was holding the mouse with button down in the right position while also holding Ctrl+Shift with the same hand (and clicking Print Screen with the other hand) to freeze the moment of Smart Guides saying both uniform and intersect, thus proving that it works and works accurately. This was done after completing the whole series, then deleting the third and crucial part in order to redo it.

                                       

                                      And there is nothing wrong with calculating/copying/inserting values either.

                                       

                                       

                                      • 16. Re: Proportionally resizing one object to fit another object. How?
                                        emil emil Community Member

                                        loriot,

                                        it is what Jacob said, Smart Guides work but if you don't hold the Shift key. If you hold the Shift key the point to be snapped can't stay under the cursor. The Smart Guides work by calculating the position of the cursor.

                                         

                                        @ Jacob, the screen capture was easy here - one hand holding the Wacom pen and the other pressing the PrintScr.

                                        Added notes too hoping to make it easy to follow

                                        Capture.JPG

                                        • 17. Re: Proportionally resizing one object to fit another object. How?
                                          Jacob Bugge MVP

                                          Emil,

                                           

                                          I have to press Ctrl+Shift too, or Print Screen will not work. And then it is easier with a mouse because I can nudge it close to the keyboard, keeping it in place with the thumb (and little finger) and then use the forefinger to hold the left button and the long finger and ring finger for Ctrl and Shift. I might use the right hand for the keys, of course, and the nose for the Print Screen button, but then I cannot keep an eye on the cursor position which will almost certainly be off.

                                          • 18. Re: Proportionally resizing one object to fit another object. How?
                                            emil emil Community Member

                                            I guess you are using a mac? On Windows it is a dedicated key PrtSC on the keyboard after F12. I also have dedicated screen capture programs that will capture the cursor too but I'm too lazy to use them.

                                            • 19. Re: Proportionally resizing one object to fit another object. How?
                                              Jacob Bugge MVP

                                              Emil,

                                               

                                              It is Windows (XP), but for some reason, or no reason, it only works when holding the other keys. The key (between F12 and Scroll Lock) says Print Screen/SysRq.

                                              • 20. Re: Proportionally resizing one object to fit another object. How?
                                                emil emil Community Member

                                                Yes, that's the key. Something's wrong with your XP. I use mostly Windows 7 but I have XP computers around me too and it works the same there. I know that Alt+ PrtSc will capture only the active window vs the whole screen but I've never heard of Ctrl+Shift. I'm using US keyboard.

                                                • 21. Re: Proportionally resizing one object to fit another object. How?
                                                  Jacob Bugge MVP

                                                  Emil,

                                                   

                                                  I have tried to use the Print Screen key by itself from time to time over the years, in vain. It seems to have just started working.

                                                   

                                                  You must have convinced it, almost: the Alt key makes no difference: everything on the entire screen is shown whatever it is and whatever is active/selected, with or without Alt.

                                                   

                                                  Thank you very much.

                                                  • 22. Re: Proportionally resizing one object to fit another object. How?
                                                    Wade_Zimmerman Community Member

                                                    I wonder if you had snap to grid turned on? The View menu.

                                                    • 23. Re: Proportionally resizing one object to fit another object. How?
                                                      loriot123 Community Member

                                                      Oh now I get it, the diagonal line. Thanks a lot guys, sorry for the slowness.

                                                       

                                                      steve fairbairn, you had me scared with that one, I bought a computer to think for me!

                                                      Then I would calculate the scale % (green divided by red x 100).

                                                      Then select red and blue and enter the scale % using the Scale tool and with the point of origin on the corner you want to enlarge from.

                                                      You can also enter the % in the Transform panel (enter % after the digit) and specify the corner.

                                                      I always find it useful to have a piece of paper and a pocket calculator at hand for this kind of work.

                                                      • 24. Re: Proportionally resizing one object to fit another object. How?
                                                        Jacob Bugge MVP

                                                        For my part you are welcome, loriot. One of the pleasant challenges here is the often joint effort to express things in the way that is needed in each particular case, including the crucial detail(s).

                                                         

                                                        More or less like Steve, I always have a few used A4 papers partly tucked under the keyboard, for small sketches and writing down sizes and coordinates; and the good old calculator, still going strong into its thirtieth year the second battery inserted a year ago, is also somewhere; I can usually feel its shape under some of the other papers; and at least one of the propelling pencils is usually in sight.

                                                        • 25. Re: Proportionally resizing one object to fit another object. How?
                                                          Steve Fairbairn Community Member

                                                          I bought a computer to think for me!

                                                          I have yet to meet one that does that.

                                                          Garbage in, garbage out. That's the way computers work.

                                                          If you thought differently you were under a serious misconception.