Joining or connecting lines

Post questions on how to use or achieve an effect in Inkscape.
Ailurus
Posts: 115
Joined: Fri Oct 22, 2010 9:53 am
Location: The Netherlands
Contact:

Joining or connecting lines

Postby Ailurus » Mon Nov 28, 2011 3:44 am

Hi all,

I just viewed my profile and it has been over a year since I visited, time really flies :D... Anyway, I just launched Inkscape again for some figures for my report, when I came across this issue.

From a large pentagon (not all equal sides, just a general polygon where n = 5) I created 5 lines which are half the original size, so they should form a pentagon too. However, how can I join or connect these lines? It is not as simple as selecting two nodes and press join, because the lines should remain unaltered. So somehow, I need to allign the two nodes such that they exactly overlap, and then press join. But how to do that? See attached file with the 5 lines.

Image

Two other quick questions, each line has a node in the center (because of the way I constructed them). How can I easily remove this node without changing the line?
And when scaling a line, the properties (like linewidth) change along. How can I prevent that, i.e. my line should still have the same line width after resizing. Thanks!
Attachments
ConstructPentagon.svg
(3.28 KiB) Downloaded 203 times

User avatar
tomh
Posts: 218
Joined: Sat Feb 14, 2009 10:14 pm

Re: Joining or connecting lines

Postby tomh » Mon Nov 28, 2011 4:31 am

Could you not just scale the original pentagon by 50% (Object -> Transform).

Anyway, you could probably do it by selecting two lines at a time and using the Align and Distribute dialogue ( Shift + Ctrl + A ) using the option to align to the biggest object / last selected and the relative to bottom/top of bounding box.

Alternatively turn on snapping View->Show->Snap control bar and turn on the middle set of icons (node snapping) and snap the ends together. Then combine and use the node tool to join.


Scaling

to toggle this in the select tool ( :tool_selector: ) there are 4 icons on the far end of the toolbar (see bottom of thefloss manual page) which can toggle how scaling/moving objects changes stuff like this.

Ailurus
Posts: 115
Joined: Fri Oct 22, 2010 9:53 am
Location: The Netherlands
Contact:

Re: Joining or connecting lines

Postby Ailurus » Mon Nov 28, 2011 5:36 am

Thanks Tom for your answers. I completely forgot about the node snapping :D. Scaling part is also clear, I do not recall using these options before.

As for deleting the center node of each line, there are actually two (overlapping) nodes in the center. After I join these two, I can delete the joined node, resulting in two cusp node handles appearing (the cusp nodes on both ends of the line). However, when I choose Simplify (Ctrl + L), the node is deleted but these handles do not appear. Any way to mimic this behaviour?
Edit: Actually the behaviour is exactly the same, but for some reason the handles are drawn after deleting the node manually, whilst when using Simplify, they aren't drawn until I click on such a cusp node.

By the way, I really need to create the lines this way, because originally the original lines are divided into 4 equal parts (for purposes too elaborate to discuss ;)).

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

Re: Joining or connecting lines

Postby brynn » Mon Nov 28, 2011 7:40 am

Edit: Actually the behaviour is exactly the same, but for some reason the handles are drawn after deleting the node manually, whilst when using Simplify, they aren't drawn until I click on such a cusp node.

The nodes are always there, but you don't see them until you select the segment.

To extend the lines in both directions, until they meet, I think I might duplicate each segment twice. Move one duplicate to one side, until the ends snap, and the other in the other direction. Then of course you have to join them. Then you would have to make new nodes where the lines cross, break them at those points, and finally join the corner nodes together. A lot of node editing!

Maybe there would be a way to do it using Object to Guides? Ah, oh yes! So duplicate each segment. Select each duplicate and do Object menu > Object to Guide. This creates a guide line that lies along the exact angle as the segment. Now with snapping engaged, you can drag each end node along the guides, and snap them to the guide intersections. Then it's just a matter of joining the already overlapping nodes.


Return to “Help with using Inkscape”