Author Topic: Basic Stretch Tip  (Read 8729 times)

September 07, 2015, 04:30:22 AM
Read 8729 times

ian

  • Sr. Newbie

  • Offline
  • **

  • 6
A simple one this. But nevertheless interesting.

The interactive handles allow you to change the vertical height and horizontal width of an object.
However if you rotate the object through, say, 45 degrees, the handles stay vertical/horizontal. You can no longer change the object in the same dimension as before you rotated it.

The solution for parametric shapes, like ellipse and rectangle is to use the "Node editor" :node:. Pull the ellipse or rectangle handles. The objects are changed based on their original definition.

This does not work for free path objects. As there is no "original" direction. You have to rotate it so the stretch direction is the same as the vertical or horizontals handles before stretching it.

Maybe someone can suggest an easy way to stretch and object in a given direction.

September 07, 2015, 08:46:24 AM
Reply #1

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Ooh, look at that!  That is a good tip!  If anyone had asked, I would have said they'd have to Undo or rotate the object back, to change the size.

And welcome to Inkscape Community, btw :D

When you say, "...suggest an easy way to stretch and object in a given direction." I guess you mean a way to do the same thing, with path objects?

Here's a screenshot to show what I would do -- well, this is for a rectangle.  I would use a guide and rotate the guide, snapping it along on side of the rectangle.  Then selecting only those 2 nodes, it can be edited without Undo-ing or un-rotating, by keeping 1 node snapping to the guide.

edit.png
*edit.png
(7.39 kB . 695x531)
(viewed 1220 times)


I'll have to ponder the case of an ellipse.....this should work for an ellipse, depending on exactly what you wanted to change/edit....except you would place the guide through the center of the ellipse.  But I'm not sure how to make the same change on one end of the ellipse, that you make to the other end.....

edit2.png
*edit2.png
(13.71 kB . 679x522)
(viewed 1233 times)


I guess you could use a couple more guides, and some careful measurements.  Then you could snap the nodes on either end of the ellipse to the intersection of guides.

Maybe Lazur (or someone else) has a better idea?
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

September 08, 2015, 03:48:35 AM
Reply #2

Lazur

  • IC Mentor

  • Offline
  • ******
  • Inkscape Filters Wizard

  • 1,154
  • Gender
    Male

    Male
Once there are two nodes defining an axis -snap a guide line to it as described above,
snap a horizontal guide line, and the rotational center of the object to one of those nodes, and rotate the object until it snaps with the other node on the horizontal guide line.
Then you can scale the width of the object's bounding box.

For reverting the rotation, rotate as previously and snap to the first guide line.



A less accurate solution would be double clicking the guide line over the axis, copying the rotation value,
and using the transformation panel (Shift+Ctrl+M) to rotate with pasted values in the right direction (3 digits limit).

September 08, 2015, 10:59:58 AM
Reply #3

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
I don't quite follow, Lazur.  What does the horizontal guide snap to?
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

September 08, 2015, 11:50:51 AM
Reply #4

Lazur

  • IC Mentor

  • Offline
  • ******
  • Inkscape Filters Wizard

  • 1,154
  • Gender
    Male

    Male
There are two nodes defining the axis.
Pull one guide line and snap it to one of them.
Hold Shift to rotate guide line until it snaps to the other node.

Move rotation center to guide line origin/"first" node,
snap a horizontal guide line to it as well.

Rotate object until the other node snaps to that second guide line.


Scale object horizontally WHILE HOLDING SHIFT,
then rotate it back to the original direction -until the right node snaps.

rgd1.svg
*rgd1.svg
(12.11 kB - downloaded 1086 times)

September 08, 2015, 01:38:00 PM
Reply #5

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Oh, I understand now.   Thanks.
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

September 09, 2015, 06:12:00 AM
Reply #6

ian

  • Sr. Newbie

  • Offline
  • **

  • 6
Thanks.
I've used the unrotate/re-rotate method before. I was hoping there was a simpler way. As I use that in CAD software.

September 09, 2015, 07:22:33 AM
Reply #7

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Aaah yes, a LOT of people wish for more CAD-like features for Inkscape.  I know  I've seen feature requests for it in the bug tracker, and lot of messages in various forums.  If you wanted to take the time for a thorough search at Launchpad  https://launchpad.net/inkscape, you could identify the reports/feature requests which seem to hold the most promise for you.  Then if you click "Does this affect you too" link, it adds "weight" to the request.

Theoretically, bugs or feature requests with a lot of support would attract the attention of developers who might want to do the programming.  However, in practice, it often comes down to whatever programmers find interesting.  Indeed, I recently was complaining about a new feature in 0.91 (and I'm by far not the only one complaining) and it turns out that feature was added on the request of 1 person.  Someone came along who wanted to try their hand at programming Inkscape, and that apparently was an easy thing to do, and he did it.  :@@:   :@@:  I hope it will be either reversed, or offered as an option, so people who don't like it don't have to use it.

Well, the system isn't perfect, but I do know CAD like features have been much requested.

Anyway, fwiw  :)
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

September 09, 2015, 03:40:02 PM
Reply #8

Lazur

  • IC Mentor

  • Offline
  • ******
  • Inkscape Filters Wizard

  • 1,154
  • Gender
    Male

    Male
As always, there are some hacks.
By grouping objects, you can end up with a new object without transformation.

Likewise, group the object, scale it,
group it again, rotate it.
Theoretically this way you can enter the group and change the parametres for the scaling in the group inside -with the xml editor, Shift+Ctrl+X.
However it may not be the best idea to use preserved instead of optimized transformations if you work with strokes etc.
Also inkscape tends to use transformation matrix for all kind of transformations.

For another level of "hacking", if you can put # mark to the rotation in the codes of the file, making it a comment, you can disable it temporarily, then remove that character and it will apply.
Theoretically again, haven't tested. Guessing the xml editor won't let doing so itself, a text editor would be necessary.
Then it is more handy if you need to rotate only few times in a file, with a certain value.


But the bounding box size will always display the actual horizontal/vertical measures, meaning you can't effectively resize by typing in values to those boxes.
You can work with transparent rectangles as reference objects, maybe?

In my experience it's still faster to construct manually though.

September 11, 2015, 04:17:41 AM
Reply #9

ian

  • Sr. Newbie

  • Offline
  • **

  • 6
Yes, I'll un-rotate it for now. I avoid the horrible XML editor. I'd really like a proper object manager.

a LOT of people wish for more CAD-like features for Inkscape.
I don't really need CAD features in Inkscape. Perhaps trimming and breaking curves would make it more productive. But this request, dynamic stretching in a chosen direction, is more appropriate to illustration programs like Inkscape.

My work, incidentally, is implementing dynamic Inkscape-like features in 3D CAD software. Allowing designers to stretch and bend their models as easy as a 2D system.
« Last Edit: September 11, 2015, 05:14:38 AM by ian »

September 11, 2015, 06:14:07 AM
Reply #10

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
It definitely would be a nice feature!

I think an object manager may not be too far away.  I can't remember what gives me that impression....just a small comment I saw somewhere, that someone might be working on it.  Or I might have seen it on the Roadmap?
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

September 11, 2015, 07:02:05 AM
Reply #11

ian

  • Sr. Newbie

  • Offline
  • **

  • 6
Thanks. Object manager is way down the list.
I'd like to contribute to the programme but I think they only need programmers.

September 11, 2015, 08:09:25 AM
Reply #12

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

September 14, 2015, 12:45:28 PM
Reply #13

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Ah-HA!

I just noticed yet another new feature request for an object manager, in the bug tracker.  The reply indicates that there's a new object manager already in the current dev version  :hd:

https://bugs.launchpad.net/inkscape/+bug/1492606
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

January 07, 2016, 08:04:51 AM
Reply #14

Espermachine

  • Jr. Member

  • Offline
  • ***

  • 35
I used to work around this problem by cloning the original.
So i work with the clone to rotate, etc, and manipulate the original when i need to change height/width.

OP's tip of using the node tool is even better !