Patch: Eliminate duplicate path segments
Migrated from: https://bugs.launchpad.net/inkscape/+bug/521988
Original description from David Turner:
"This patch eliminates duplicate path segments. Say you make a path by taking two squares and lining them up so that the left edge of one is exactly congruent to the right edge of the other. Now you combine them (as in ctrl-k). Your path has eight edges, but two of them overlap for their entire length. The path can be simplified by removing the extra segments.
The use case is that I use Inkscape to design laser-cut parts. The redundant segments cause the laser to retrace the same cut, costing me money."
Originally attached extension files:
Subsequent files offered by David Turner and others:
There's a good bit of technical discussion in the original report, which I am unable to summarize. Part of the discussion seems to be related to including this feature as part of Extensions menu > Render > Random Tree. And I can see in 1.0beta2 that such an option is available in that extension.
From my own participation in this report, and the reason I'm migrating it, is because it only works when the nodes of the overlapping segments are precisely on the same coordinates. I would like to see it work when the nodes are reasonably close enough (like maybe within a pixel or 2 - so that snapping nodes makes them close enough). One of the subsequently provided PY files (the last one) is supposed to do this. But my testing with it was not successful.
So I'm hoping someone can pick it up, and make it workable.
Thank you very much!