Hello,
I started to use inkscape a week ago but i can't figure how to do the road of a racetrack.
I can draw a shape of the track adding various nodes, but then i can't convert this "skeleton" into a road (such like circle -> toro) because the copy+scale+aligning will produce always some asymmetrical road, expecially during the unconvess bends.
May you help me?
Thank you.
[Sorry for bad english]
How can i create a racetrack?
Re: How can i create a racetrack?
It sounds like you need to increase the stroke width using the Fill and Stroke dialog (Shift+Ctrl+F), and then maybe convert the stroke to a path (Ctrl+Alt+C).
Re: How can i create a racetrack?
Actually, if I understand correctly (and that's not a given), I think you'd do well with a path effect something like as follows.
1. Using the ellipse tool draw your racetrack oval. With the oval selected convert it to a path.
2. Using the bezier tool draw a straight horizontal line with a thick stroke (maybe 4 px). Duplicate the line and move it the width of your race track lane apart. Duplicate again and place this third line in the middle of the first two and set the stroke width to 2px (or 1/2 of whatever you chose above).
3. Select the three line paths you just drew with and do path>stroke to path. Now with all three paths still selected to path>combine. You'll need to make this path width very small compared to your racetrack oval.
4. Select your lines and your oval and do Extensions>Generate from Path>Pattern along Path. You'll want the "repeated, stretched" and "snake" options selected and no space between intervals.
EDIT TO ADD:
If you don't want a center stripe you don't need the middle horizontal line path in your pattern. If you want a dashed center stripe just make the middle horizontal line path in your pattern shorter than the outer two lines. Alternatively, for better control of a dashed center stripe do the outer lines as one pattern along path and do the center line as a separate pattern along path with some non-zero amount for the space between intervals.
1. Using the ellipse tool draw your racetrack oval. With the oval selected convert it to a path.
2. Using the bezier tool draw a straight horizontal line with a thick stroke (maybe 4 px). Duplicate the line and move it the width of your race track lane apart. Duplicate again and place this third line in the middle of the first two and set the stroke width to 2px (or 1/2 of whatever you chose above).
3. Select the three line paths you just drew with and do path>stroke to path. Now with all three paths still selected to path>combine. You'll need to make this path width very small compared to your racetrack oval.
4. Select your lines and your oval and do Extensions>Generate from Path>Pattern along Path. You'll want the "repeated, stretched" and "snake" options selected and no space between intervals.
EDIT TO ADD:
If you don't want a center stripe you don't need the middle horizontal line path in your pattern. If you want a dashed center stripe just make the middle horizontal line path in your pattern shorter than the outer two lines. Alternatively, for better control of a dashed center stripe do the outer lines as one pattern along path and do the center line as a separate pattern along path with some non-zero amount for the space between intervals.
- Attachments
-
- racetrack.svg
- (87.38 KiB) Downloaded 204 times
Re: How can i create a racetrack?
llogg: I like your solution, helped me to understand more about "pattern along path"
For the racetrack there is another solution to it:
1. convert ellips to path (shift+ctlr+C)
2. Duplicate ellipse
3. do "path"-->"dynamic offset"
The offset can be afterwards defined via the xml-editor.
Select offset path (after being dragged by mouse) and change px-value in xml-editor.
For the racetrack there is another solution to it:
1. convert ellips to path (shift+ctlr+C)
2. Duplicate ellipse
3. do "path"-->"dynamic offset"
The offset can be afterwards defined via the xml-editor.
Select offset path (after being dragged by mouse) and change px-value in xml-editor.
Re: How can i create a racetrack?
Path>Linked Offset is one step shorter. The difference between this method and the pattern along path method is the first one gives two objects and the second gives a single object. Probably not a significant difference for a simple example like this, but if things get more complicated you may wish that your racetrack was all together. With a couple extra steps you can also get a single path using the linked offset solution:
1. Select the original oval path and the linked offset and do Path>convert object to path.
2. With both paths selected do Path>difference. This cuts out the middle of the oval, leaving only the track.
1. Select the original oval path and the linked offset and do Path>convert object to path.
2. With both paths selected do Path>difference. This cuts out the middle of the oval, leaving only the track.
Re: How can i create a racetrack?
@sas: thank you very much, i didn't know that command exists
@llogg: thank you too, it's a nice function but i don't know how to color the road created because the fill coulor fills only the lines and not the road space between lines.
@llogg: thank you too, it's a nice function but i don't know how to color the road created because the fill coulor fills only the lines and not the road space between lines.
Re: How can i create a racetrack?
if you use the linked offset + path>difference method above you will get a racetrack oval path that you can color. If you want the strip in the middle do a third offset before you do the difference that is midway between the two other paths.