![inkscape stroke to path only outline inkscape stroke to path only outline](https://i.stack.imgur.com/sAXyx.gif)
Think of a simple curve as one with no trouble spots.
Inkscape stroke to path only outline series#
Most methods have degenerate cases, especially when dealing with a series of curves. There is no mathematical answer, because the curve parallel to a bezier curve is not generally a bezier curve. This page has a fairly good tutorial on bezier curves in general with a nice section on offset curves.Ī less precise but possibly faster method can be found here. Sorry if I cause a lot of confusion with this and maybe am not of much help. But I'm not sure right now whether this really covers all the potential pitfalls.
![inkscape stroke to path only outline inkscape stroke to path only outline](https://i.stack.imgur.com/92elF.png)
For closed paths, you probably need the two "delimiting" paths to run in opposite orientation. This might not be an issue for open paths when using nonzero winding rule, but I'd be cautious about this. the "crossing area" of a black path might become white. I thought that self-intersecting paths might be tricky because you might get hollow areas inside the path, i.e. (That's also basically what comes out when you use the strokepath command in Ghostscript.) You can then find delimiting parallel line segments, but have to join them correctly, using the appropriate linejoin and miterlimit rules. De Casteljau's Algorithm is typically used for turning Bézier curves into line segments. The classic way of rendering vector paths with curves/arcs in them is to approximate everything with a polyline that is sufficiently smooth. For straight line segments, the exact solution can be found comparatively easily. So you would have to approximate it one way or the other. The "simplest" case would be if you only have non-self-intersecting polylines, polygons or paths that don't contain curves because in general, you can't draw exact "parallel" Bézier curves to the right and the left of a non-trivial Bézier curve that would delimit the stroked area - it's mathematically non-existent. I just tried Path => Outline stroke in Inkscape (I think that's what the English captions should say), and what came out didn't really look the same as the stroked path. And even Inkscape doesn't really do a good job.
Inkscape stroke to path only outline code#
If you look at what Ghostscript spits out when you run the code I posted at the linked question, it's pretty ugly. As mentioned in my answer to the linked question, PostScript has a command for generating paths that produce basically the same output as a stroke, called strokepath. There has been a similar question recently:Īll in all, this is a non-trivial task. To put it another way, what does the browser do when you tell it to stroke a path – how does it work out what shape the stroke should be? Or, even better: if someone could explain to me the geometry theory about how I would do this task manually, by taking the list of line coordinates I have and working out a new path that effectively 'strokes' it, that would be amazing. Does anyone know of a library/function that would do this? I can't find any function that does this – I've looked through the docs of D3.js and Raphaël, but no luck. So I'm trying to manually 'thicken' a line into a solid shape. but I'm trying to get a filled shape rather than a stroked line, so that I can do further modifications on it, such as warping it, so the resulting 'stroke' might vary in thickness or have custom bits cut out of it (neither of these things are possible with a real SVG stroke, as far as I can tell). I can render this line as a path, and give it a stroke of a certain thickness. The line is just a simple curved line, a sequence of coordinates. I hope it makes sense and that there is some way of doing this without having to manually delete the inner stroke.I want to convert a stroked path to a filled object. Neither is what I need, However if I could get only the outline of the lower text with the fill and stroke taken into consideration (all borders between black and white) then I should have what I need. In the upper text I have done stroke to path and in the below Object to path. So is there a way where I can get just get the outlines of the stroke converted to a path? I have enclosed a picture of what I'm trying to do. That workflow would be too time consuming for what I need to use it for. I would like to remove all these extra paths and only have the "outer" path left without having to delete it all manually. This path I then increased the stroke style on and did "Stroke to Path" however it does not take the fill into account and thus I have an "inner stroke path" too. I then used Object to path but got the same result as before. However the resulting path wasn't bold enough for my use so I went back and increased the stroke style. I'm attempting to create a path for a font and to begin with I used object to path.