Three lines coming from one point

Post questions on how to use or achieve an effect in Inkscape.
kilgore661
Posts: 5
Joined: Mon Feb 01, 2010 4:48 am

Three lines coming from one point

Postby kilgore661 » Wed Feb 03, 2010 6:55 pm

Hello Everyone,

I'm a noob Inkscape user and have only had time to scan the docs so far, but I can't work out how to make a simple object - a point with three lines coming out of it as per the attachment.

Just to be clear, the problem is that I want a single object in which the centre node is connected to the three outlying nodes. (What you see in the image is a fake.)

Any thoughts, solutions, links?

BTW I think I am using an old version of the program because the Winders installer is still broken - see http://www.inkscapeforum.com/viewtopic.php?f=5&t=3564.

661
Attachments
Untitled.jpg
A node with indegree 3.
Untitled.jpg (5.15 KiB) Viewed 3412 times

User avatar
sas
Posts: 404
Joined: Sat Oct 06, 2007 5:42 am

Re: Three lines coming from one point

Postby sas » Wed Feb 03, 2010 7:30 pm

Paths cannot branch. This is a limitation of SVG. There are various ways to fake it, of course, depending on what you're trying to achieve.

kilgore661
Posts: 5
Joined: Mon Feb 01, 2010 4:48 am

Re: Three lines coming from one point

Postby kilgore661 » Wed Feb 03, 2010 7:51 pm

Thanks for the confirmation. What I am trying to achieve is a floor plan that doesn't need a lot of messing about when I want to move walls.

Imagine the top two lines horizontal (so it looks like a T not a Y). The top of the T is an outside wall and the stalk of the T is an interior wall. The free ends of all the segments that make up the T will be attached to other paths (or other T shapes). I'd like to move the outside wall and have the interior wall move with it, and to slide the interior wall left and right whilst remaining perpendicular and attached to the top of the T.

The image above was made by making a path with three nodes for the top of the T and another path for the stalk. I simply moved the top of the stalk so that it was coincident with the middle node of the top. Of course what I'd like to do is to tell Inkscape that the top of the stalk and the middle of the top are the same node. I guess grouping the two paths will help a little. I have also thought of making the top into an object and the stalk into a connector.

Any ideas greatfully received.

661

User avatar
microUgly
Site Admin
Posts: 2985
Joined: Sat Jun 02, 2007 3:13 pm
Contact:

Re: Three lines coming from one point

Postby microUgly » Wed Feb 03, 2010 9:43 pm

Unfortunately there isn't a solution. You have to do it exactly as you are doing now.

User avatar
c-quel
Posts: 68
Joined: Thu Dec 31, 2009 2:13 am
Contact:

Re: Three lines coming from one point

Postby c-quel » Thu Feb 04, 2010 2:26 am

Granted there is no "proper" solution to your problem -- as was stated, the SVG format doesn't do branching, and as far as I know it might be all the better for it (who knows what mess could result if it did). :P

Fortunately, there are plenty of ways to 'game the system' so to speak, with only varying degrees of minor inconvenience.

If you want this to be a single object, for example, you should be aware that you can safely draw over your own strokes. This is much easier to do with the grid enabled, since you can draw your nodes "snapped to specific points in space, thus making it very easy and precise to retrace your steps.

[besides, if you're doing floor plans you should be using some kind of grid] ;)

For example, if you can imagine the below diagram representing a 5x5 section on the grid:

Code: Select all

A1 A2 A3 A4 A5

B1 B2 B3 B4 B5

C1 C2 C3 C4 C5

D1 D2 D3 D4 D5

E1 E2 E3 E4 E5


I could draw your Y by clicking on A1 first, then C3, then A5, then back to C3 again, and then finally to E3. I would remove any Fills, and probably enable Round Joins and Round Caps in my stroke (in the Stroke Style tab) to ensure the shape looks perfectly smooth (although Bevel Joins and Square Caps look okay too).

And voila! Granted you can't just click and drag the center node to change the shape since there are technically TWO center nodes -- nonetheless, moving two nodes isn't really a problem. At worst you move them one at a time, at best you draw a selection box around them and move them together. ;)

The above method also lets you draw other complex shapes using only a single Stroke. An "E" shape for example can be achieved pretty much the same way:

    A5 >> A1 >> C1 >> C5 >> C1 >> E1 >> E5

Try this and see if helps you. :D

kilgore661
Posts: 5
Joined: Mon Feb 01, 2010 4:48 am

Re: Three lines coming from one point

Postby kilgore661 » Fri Feb 05, 2010 9:09 pm

Thanks for your help people.

c-quel wrote:[besides, if you're doing floor plans you should be using some kind of grid] ;)


Not if the building was built in the 17th Century :-)

661

User avatar
c-quel
Posts: 68
Joined: Thu Dec 31, 2009 2:13 am
Contact:

Re: Three lines coming from one point

Postby c-quel » Sat Feb 06, 2010 2:40 am

D'oh! ><

lol, well in that case check this post out for an example of stroke backtracing using curved lines.

http://www.inkscapeforum.com/viewtopic.php?p=20063#p20063

It's tricky, but not impossible. :)


Return to “Help with using Inkscape”