Creating line networks

Post questions on how to use or achieve an effect in Inkscape.
User avatar
geotheory
Posts: 11
Joined: Wed Jan 09, 2013 9:23 pm
Location: London, UK

Creating line networks

Postby geotheory » Tue Jan 15, 2013 1:04 am

I'm exploring if Inkscape can be used to create network comprised of lines and nodes - something like a train map or stick man. I gather that lines cannot be fused at their intersections - is this right? If so I wonder how to go about creating seperate nodes at the intersecting point of two lines and locking them together so they are moved together. I need to use lines not polygons because I am not outputting graphics but extracting vector position data to use elsewhere. Very grateful for assistance.

stick.PNG
stick.PNG (10.86 KiB) Viewed 2001 times

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

Re: Creating line networks

Postby brynn » Tue Jan 15, 2013 8:24 am

Image
Welcome to InkscapeForum!

You can use snapping to make sure that 2 or more nodes occupy the exact same spot. Then you can use Grouping, to keep various individual pieces all together, so that they move as one. Or if you just want to move one "stack" of nodes, you can do a multiple selection by dragging a selection box around the "stack". Then all those nodes will move as one, while other nodes remain in place. Or instead of grouping, if all the paths share the same style, you could use Path menu > Combine, to keep them all together.

User avatar
flamingolady
Posts: 687
Joined: Wed Jun 10, 2009 1:40 pm

Re: Creating line networks

Postby flamingolady » Tue Jan 15, 2013 9:26 am

If I am reading your post correctly, in addition to Brynn's advice, seems like you could also do a Path\Union and then it'd all be one path/line. I can't quite figure out if that's what you are looking to do though.

User avatar
geotheory
Posts: 11
Joined: Wed Jan 09, 2013 9:23 pm
Location: London, UK

Re: Creating line networks

Postby geotheory » Tue Jan 15, 2013 11:08 pm

Hi brynn, flamingolady - thanks this is useful advice

User avatar
geotheory
Posts: 11
Joined: Wed Jan 09, 2013 9:23 pm
Location: London, UK

Re: Creating line networks

Postby geotheory » Wed Jan 16, 2013 12:42 am

I posted a 'quick reply' but it didn't appear - are my posts all still moderated? Trying 'postreply' instead..

Thanks both for your advice. @Flamingolady, as I understand it your suggestion closes the path to create a polygon, which is not what I want. Also if you path/union 2 simple lines they disappear!

What I'm exploring is how Inkscape might be used to model a network of intersecting lines/polylines. This is quite different to creating polygon-based vector shapes - it seems that lines can't be formally joined by a common node. I'm appreciate this is probably due to a limitation of the SVG format. It would be useful if Inkscape could enable co-located nodes to be formally locked together.

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

Re: Creating line networks

Postby brynn » Wed Jan 16, 2013 7:25 pm

Yes, Path menu > Union can sometimes do the same thing as Path menu > Combine. But not always, as geotheory found.

I think you're right about the inability to join more than 2 lines to a single node. Only 1 or 2 lines can emanate from a node (no more, no less) and I seem to recall that it's because the SVG standard doesn't allow it. (although I could be wrong -- my memory isn't spectacular these days, lol) I see in another topic that you're writing some kind of code for this behavior, and that would be awesome if you can make it work!

Btw, it's only the 1st 2 messages that are moderated. But if you post a 3rd one or more, before the 2nd is approved, they all get stacked up in moderation. But they're all approved now, and your messages will go through immediately now :D

User avatar
Xav
Posts: 1209
Joined: Fri May 08, 2009 1:18 am
Location: UK
Contact:

Re: Creating line networks

Postby Xav » Wed Jan 16, 2013 9:20 pm

In this case I think you want Path > Combine. That still won't let you have three or more lines coming from a single node (Brynn was right, the SVG spec doesn't allow for it), but you can place the nodes on top of one another and use a rubber-band selection when you want to move them as one.

If you would rather keep the various parts separate, with recent Inkscape versions you can select more than one object, then switch to the node tool and rubber-band select nodes across all the objects to achieve the same effect of being able to move the nodes from different lines as one.

It's also worth noting that you can move the rotation centre of an object. This can be useful in the case of a stick figure, for example, to make the arm rotate at the shoulder.
Co-creator of The Greys and Monsters, Inked - Inkscape drawn webcomics
Web SiteFacebookTwitter


Return to “Help with using Inkscape”