SVG: simplify path to remove curves?
In Inkscape:
- Select the Edit Path By Nodes tool (F2)
- Click on your path to select it
- Ctrl + A to select all the nodes in that path
- Click the Insert new nodes into selected segments. Repeat this to represent the shape of the curve/s in as much detail as you need.
- Then click Make Selected Segments Lines
These options are on the toolbar at the top - the plus icon and the straight diagonal line between two square nodes.
For automation, try the included Flatten Bezier
extension in Inkscape. Description here.
There is more technical way to simplify SVG path - https://github.com/mattdesl/simplify-path
var path = [ [250, 150], [250, 150], [25, 25], [24, 25], [10, 10] ]
var tolerance = 10
path = simplify(path, tolerance)
//result:
//[ [ 250, 150 ], [ 25, 25 ], [ 10, 10 ] ]