Creating railway line riute on a map

Post questions on how to use or achieve an effect in Inkscape.
WokingWounded
Posts: 3
Joined: Sat Nov 06, 2010 3:18 am

Creating railway line riute on a map

Postby WokingWounded » Sat Nov 06, 2010 3:41 am

I'm using inkscape to make maps. I want to create a path for a railway line. The traditional symbol is a black and white dashed line bordered by thin black tramlines. I'm now stuck. This is what I have done:
1. First draw the line of the railway
2.Adjust the Fill and stroke to Fill: no paint; Stroke paint black; stroke style: width 6px, dashes: solid line
3. Now Edit..Duplicate which creates an identical path on the same nodes
4. Adjust Fill and stroke to Fill: no paint; stroke paint white; stroke style: width 5px, dashes: dashes (select as appropriate)

What you end up with is something that looks perfect. BUT. If you want to do some final adjustments to the railway line's position on the map, when you nudge it, only one element moves, leaving the other behind.
Is there a way round this?

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

Re: Creating railway line riute on a map

Postby brynn » Sat Nov 06, 2010 7:27 am

Welcome to the forum !

If you mean nudge it with the Tweak tool or the Selection tool, then select both elements of the train track (solid black, dashed white lines) and Group. Then they should be moved all at once. (....although I'm having 2nd thoughts about this working with the Tweak tool.... :? )

But if you mean nudge it with the Node tool, that might be trickier.....and I might need to see it. You've done a good job of explaining what you're doing, and I think I understand what it looks like. But just to be clear, let me ask -- the white dashed line lies exactly on top of the solid black line, so that the nodes are also exactly on top of each other? If that's the case, then you can edit using the Node tool by selecting the same nodes on each line. Then they can be moved AS one.

If I've missed your meaning, lmk and I'll try again, or someone else will :D

User avatar
RobA
Posts: 335
Joined: Fri Aug 10, 2007 1:22 am

Re: Creating railway line riute on a map

Postby RobA » Sun Nov 07, 2010 3:04 am

Use clones.

1 Draw the line, set the fill to None and the stroke to Unset
2 Edit-Clone-Create Clone and make it black stroke, 6px, solid line
3 Select the original (shift D) then make another clone (Alt D) and make it white stroke, 5 px, dashes.

Now click on the line and select the original (shift D) then use the nide tool and edit it how you wish (or continue drawing from the end with the pen tool).

I've attached a sample.

I like to group the original and clones as one object so they I don't accidentally grab and move the cloned copy. then use ctrl click on the group to select the top object and shift D to select the original for editing.

-Rob A>
Attachments
clonetrack.svg
Clone track
(2.38 KiB) Downloaded 430 times

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

Re: Creating railway line riute on a map

Postby brynn » Sun Nov 07, 2010 1:15 pm

Clones, interesting....
I am admitedly not so familiar with clones; more so with tiled clones. And I thought a clone cloned everything, including stroke width and color....?

Hhm, good solution, Rob A! And thanks for providing sample file. The only thing that doesn't sit well with me, is that when node editing on the clones, you can't see what you're doing, while you're doing it, as you can with normal paths. You have to move the node or handle and release mouse button, before the new position is rendered on the canvas. Is that like a bug or something? Or normal behavior?

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

Re: Creating railway line riute on a map

Postby ~suv » Sun Nov 07, 2010 3:35 pm

brynn wrote:The only thing that doesn't sit well with me, is that when node editing on the clones, you can't see what you're doing, while you're doing it, as you can with normal paths.

You can't node-edit the clone(s). Edit the original and the clones will update automatically as soon as you release the mouse button after dragging a node, handle or segment:

Select one of the clones and use 'Shift+D' to look up the original, switch to the node tool 'n' and drag the nodes/handles/segments or change node types as needed (make sure you have the path outline visible in the node tool).

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

Re: Creating railway line riute on a map

Postby brynn » Mon Nov 08, 2010 4:06 am

Edit the original and the clones will update automatically as soon as you release the mouse button

Yes, that's what I said.

...(make sure you have the path outline visible in the node tool).

Ok yes, I see that the path outline does change immediately while the node or handle is being dragged. But path outline is not required with regular paths. Changes can be seen in real time to the path itself.

WokingWounded
Posts: 3
Joined: Sat Nov 06, 2010 3:18 am

Re: Creating railway line riute on a map

Postby WokingWounded » Mon Nov 08, 2010 8:19 pm

I've been away but returned to find these incredibly helpful edits. Thanks so much. I gave it a go and had some difficulty selecting the appropriate clone to make colour / width changes but this was sorted by jacking up the magnification. Thanks a lot ffaat, brynn and ~suv. I think I'll start a new thread to discuss the rendering problem I'm getting with svg files uploaded to Wikipedia!


Return to “Help with using Inkscape”