Maintain length while moving nodes.

Post questions on how to use or achieve an effect in Inkscape.
Jonathan Francoeur
Posts: 19
Joined: Tue Jan 31, 2012 5:29 am

Maintain length while moving nodes.

Postby Jonathan Francoeur » Sat Jun 23, 2012 10:11 am

I'm creating scale drawings for landscape design and I have a fixed length of fencing. I'd like to know how I can draw a line and then add nodes to it and change the angle of certain sections without resizing the length. For example if I know I have 100 meters of fence :tool_pen: and I draw a line measuring 100m, is there a way to double click mid way to add a node :tool_node: as I usually do and then swing one of the outside nodes around without changing the length of the line?

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

Re: Maintain length while moving nodes.

Postby brynn » Sat Jun 23, 2012 11:12 am

If all the sections involved could be made to match units of a grid, you could use snapping, and count gridlines, so that you place the loose end in the right place, to maintain the original length. However, that would only work if you were dealing with a 90 degree angle.....unless you can do some complicated math.

If I'm not mistaken, a true measuring tool is under development. I can't remember if it's targetted for 0.49 or not.

Until then, you could use Extensions menu > Visualize Path > Measure Path. What it does, is actually print the measurement, which is really not ideal in most cases. But it's better than nothing, if you need to measure a line (or area). That's about all I can think of.

Although I have to say, that some kind of feature that would allow endnodes to be moved, without the path actually getting longer or shorter, could be quite useful.
......hhmmmmm......you know what that reminds me of though......thinking of the distance between the endnode and the next node, as the radius of a circle.....I'm not sure where this is going.....but if you could center a circle on the node next to the endnode, then by geometric definition, any point along the circle will result in the path not getting any longer. So that if that node next to the endnode is fixed, you should be able to use a circle and achieve what you want. I could draw up an example, if you like.

However, if you're not sure that node is fixed, as far as conceiving a fenceline, that wouldn't work. If that node (fencepost) is not fixed, you'd have to keep drawing different circles in a trial and error process.

And using a circle would only address moving the endnodes. Given a straight line you could not move any nodes between the endnodes, at all, without changing the path length. So any scenario like you describe would have to involve moving the endnodes. Right?

I think the circle idea should work, unless I don't understand the problem correctly.

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

Re: Maintain length while moving nodes.

Postby druban » Sat Jun 23, 2012 2:23 pm

I think this should do it for you. Sorry about the confusing pics...
rect1166.png
rect1166.png (22.23 KiB) Viewed 5391 times
rect1211.png
rect1211.png (45.48 KiB) Viewed 5390 times
rect1212.png
rect1212.png (47.74 KiB) Viewed 5392 times


Here are the warnings etc. This may not work in all versions of Inkscape. This requires you to activate the appropriate icons on control bar and select preferences correctly.
If you click anywhere other than on the rotation arrow, you will lose the repositioned center of rotation, and believe me, it's quite easy to do. Just start over.
Last edited by druban on Sat Jun 23, 2012 3:13 pm, edited 4 times in total.
Your mind is what you think it is.

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

Re: Maintain length while moving nodes.

Postby brynn » Sat Jun 23, 2012 3:02 pm

Aahhh, so you've made a node to be the center of the circle I was suggesting! Yes, very elegant :D

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

Re: Maintain length while moving nodes.

Postby druban » Sat Jun 23, 2012 3:08 pm

brynn wrote:Aahhh, so you've made a node to be the center of the circle I was suggesting! Yes, very elegant :D

No, i was just using the scenario given by the OP.
Jonathan Francoeur wrote:is there a way to double click mid way to add a node as I usually do and then swing one of the outside nodes around without changing the length of the line?
Not necessary to add any nodes other than the ones already in the scenario... if I understand it correctly.. Of course any rotation implies a circle, if that's what you mean :D If we did not have the ability to rotate in inkscape or to change the center of rotation I think your idea would be the way to go!
Your mind is what you think it is.

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: Maintain length while moving nodes.

Postby ~suv » Sat Jun 23, 2012 5:31 pm

druban wrote:
rect1211.png
rect1211.png (45.48 KiB) Viewed 5375 times

(…)
If you click anywhere other than on the rotation arrow, you will lose the repositioned center of rotation, and believe me, it's quite easy to do. Just start over.


You don't really need to fiddle with the rotation center: press 'Shift' while dragging a rotation handle, and the segment will pivot around the opposite node. (With 'Ctrl' added as second modifier, the rotation will be constrained to the rotational step as defined in the preferences - default 15°)

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

Re: Maintain length while moving nodes.

Postby druban » Sat Jun 23, 2012 6:42 pm

~suv wrote:press 'Shift' while dragging a rotation handle, and the segment will pivot around the opposite node.

Just tried it out in my development build, and had some very interesting results!
As best I can determine, pressing shift while dragging the rotation handle switches the rotation center to the corner of the bounding box opposite the handle being dragged which is the opposite node in a two node line, certainly, if you are careful to specify that the rotation arrow at the appropriate corner be used. However, if one uses the one of the other two arrows the rotation center is established well away from the line. For curved lines the rotation center is placed at the opposite corner where there may or may not be a node. But a wonderful feature nevertheless. thanks for the info, ~suv!
Last edited by druban on Sat Jun 23, 2012 7:16 pm, edited 1 time in total.
Your mind is what you think it is.

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: Maintain length while moving nodes.

Postby ~suv » Sat Jun 23, 2012 6:51 pm

Off topic:
druban wrote:
~suv wrote:press 'Shift' while dragging a rotation handle, and the segment will pivot around the opposite node.
Just tried it out in my development build, and had some very interesting results!
As best I can determine, pressing shift while dragging the rotation handle switches the rotation center to the corner of the bounding box opposite the handle beig dragged (…)
Yes, that's what actually is happening - I spared the technical details since the task at hand was rotating a straight line segment, for which it doesn't really matter (the opposite corner of the bounding box in this special case is the node at the other end of the selected segment).

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

Re: Maintain length while moving nodes.

Postby druban » Sat Jun 23, 2012 7:21 pm

thanks for the confirmation. What's really cool about this is using it with objects and the :tool_selector: and having the choice of rotating it around any of five different points without having to drag the center!
Is this one of those features that have been in Inkscape a long time and I just didn't know about it....
Your mind is what you think it is.

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: Maintain length while moving nodes.

Postby ~suv » Sat Jun 23, 2012 7:43 pm

druban wrote:thanks for the confirmation. What's really cool about this is using it with objects and the :tool_selector: and having the choice of rotating it around any of five different points without having to drag the center!
Is this one of those features that have been in Inkscape a long time and I just didn't know about it....

For the select tool ( :tool_selector: ), it's an old feature (earliest version I have available here for testing is 0.46, but I'm quite confident that it's much older).
For path editing/nodes ( :tool_node: ), it's a new feature which was introduced with the rewritten node tool in Inkscape 0.48 (which implemented the transformation handles for a selection of nodes).

Jonathan Francoeur
Posts: 19
Joined: Tue Jan 31, 2012 5:29 am

Re: Maintain length while moving nodes.

Postby Jonathan Francoeur » Mon Mar 02, 2015 3:14 pm

Thank you for answering my question! :)

User avatar
ragstian
Posts: 1181
Joined: Thu Oct 11, 2012 2:44 am
Location: Stavanger-Norway

Re: Maintain length while moving nodes.

Postby ragstian » Mon Mar 02, 2015 3:23 pm

Hi.

Wow - your internet connection must be slow!! 2 years, 8 months, and 6 days since the last reply!
BTW thanks for posting, did not know of the shift while rotating trick!
Last edited by ragstian on Mon Mar 02, 2015 10:40 pm, edited 1 time in total.
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar

Jonathan Francoeur
Posts: 19
Joined: Tue Jan 31, 2012 5:29 am

Re: Maintain length while moving nodes.

Postby Jonathan Francoeur » Mon Mar 02, 2015 4:01 pm

Here are the warnings etc. This may not work in all versions of Inkscape. This requires you to activate the appropriate icons on control bar and select preferences correctly.

I'm using inkscape 0.48.3.1 and I can't get it to work.
I have activated :tool_node: and click on a segment to select the two nodes however clicking on one of the selected nodes deselects the other one.

tylerdurden
Posts: 2344
Joined: Sun Apr 14, 2013 12:04 pm
Location: Michigan, USA

Re: Maintain length while moving nodes.

Postby tylerdurden » Mon Mar 02, 2015 10:36 pm

Jonathan Francoeur wrote:I'm using inkscape 0.48.3.1 and I can't get it to work... clicking on one of the selected nodes deselects the other one.

Shift+click should allow selection of another node. Also there is dragging a box to select.

Once you have two nodes selected, activate the transform handles button (if not active). and click one node to get rotation handles.
RotateNodes1.jpg
RotateNodes1.jpg (45.75 KiB) Viewed 4389 times


shift+click on a corner handle to rotate.
Have a nice day.

I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1

The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/


Return to “Help with using Inkscape”