Inkscape.org
Beginners' Questions Width of path and width of object after "stroke to path" do not match (ever so slightly, but they don't!)
  1. #1
    ian727 ian727 @ian727

    Hello community,

    As this is my first post, let me start off by saying that Inkscape is wonderful. I've been using it for many years and a wide variety of tasks.

    However, today I encountered something strange and I cannot tell if this is new or if it just always happened and I just didn't see it. The following:

    I am interested in traffic/mobility planning and I use Inkscape to draw roads, railways, cyclepaths on satellite imagery (top view, 2D). To do this, I have been following the same procedure for a long time: I create the main road, with all its turns, as a path/line. To add side markings, I copy the whole path, put it exactly on top of the other one, then select [stroke --> path], remove the filling and edit the new stroke to my liking. Normally, the new stroke (road edge/side markings) is perfectly aligned to the primary path (road). However, today, I noticed an ever so slight offset.

    I tried the same operation multiple times to make sure that I did not mess up at some point. But the object created by the [stroke --> path] operation does not exactly match the original path. It actually does match the original path for the most part, but in specific turns, there is a slight offset. You can see it here as I made the object slightly transparent:

    [img]https://i.imgur.com/4XnMI3M.png[/img]

    Now I am not sure if this has always happened but the offset was too small for me to notice or if this is case-related. The only thing I did differently this time is that I used the function "smoothen knots" (My Inkscape is in German, I have no idea if it is called like this in English?!) along my primary path to get better turns. However, I also tried converting them all to "corners" (once again, might not be the English term) and the same problem occurs, the stroke --> path result does not match my original path.

    Am I doing something wrong this time? I really don't get it. Is there always an offset and my paths were just never long or warped enough for me to notice it?

    If there is no simple solution to this, I can also gladly send my file with the problem.

    I'm thankful for any advice!

    ian

  2. #2
    Tyler Durden Tyler Durden @TylerDurden

    The stroke to path will not be reliably precise. 

    Here is another way to make map elements http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Attributes-Stroke.html#Attributes-Stroke-Complex

  3. #3
    ian727 ian727 @ian727

    Thanks Tyler,

    yes, I could use cloning, as well as I could simply copy and paste the same path, align it with the original one and then edit its attributes. The reason why I cannot use these options is because I work a lot with transparencies (to better blend in with the background image). That means that my paths actually need to be next to eachother, and not on top of eachother. It also makes the editing more convenient.

    What causes the loss of precision? I drew a complex railway before using countless of paths and stroke --> path operations and never had any trouble with offsets. Maybe more nodes in the path help? I'll try that.

  4. #4
    ian727 ian727 @ian727
    👍

    Sorry for two replies, but I just doubled the number of nodes in the path by simply adding another node between two existing ones - and now stroke --> path is (at least visibly) 100% accurate.

Inkscape Inkscape.org Inkscape Forum Beginners' Questions Width of path and width of object after "stroke to path" do not match (ever so slightly, but they don't!)