A common problem while laser cutting or vinyl cutting for example, is the problem with duplicating lines which are overlapping invisibly. Often you won't find them in your drawing. If you use graphics without filtered duplications you might run into issues like burnt edges, rough-cut edges, long running cutting processes, etc.
This plugin removes duplicates from paths with respect to their type (bezier or straight line segments). Please note that maybe you need to combine all lines/paths to one common path to make this work. So this plugin is ideal to remove common edges like professional nesting software is doing too.
Key phrases: remove overlapping lines, remove duplicated lines, purge redundant lines, purge doubled lines, remove common edges, remove occulted lines, hidden line removal, retrace edges, chain paths, clean paths
Annotation belonging to the lines
This extension also helps removing straight line duplications where start or end point is duplicated by using "z" or "Z" in "d" descriptor, which invokes a closing contour, like the following
Example on how to remove duplicates
Draw a line and copy/paste it
for each line a path 'd' is defined:
Make the paths overlapping visually (to enforce having some example of duplicated, invisible path)
Combine the lines (Ctrl + K)
Der Pfad ist nun dupliziert. Siehe Eintrag 'd' - dieser wiederholt sich
Run the extension
Now check the XML element tree to see the cleaned up path
Real example and known limitation(s)
Get some parts you want to optimize by rearranging and removing common edges
Check the node count
Calculate the total number of nodes by clicking through XML tree and noting down the nodes count. We use this information to check how good we can reduce the duplicates in the drawing.
For this example we have 13 paths witha total of 38 * 5 + 21 *8 = 358 nodes
Check the total line length
We can also get a goodcomparison by measuring the total length of all paths before and after purging duplicate lines.
Rearrange and combine all paths
CTRL + K to combine the things. You might need to ungroup all items before.
Run the extension and get the result
Check the line length again
We reduced the set by 8 nodes (only). The limitation can be found in detail: Duplicated paths are only removed if start and end point of the line segment are exactly equal. It will not work if one line segment is shorter or longer because the X1Y1 or X2Y2 coordinate will be different. A more complicated algorithm is required to get optimal results. The following screenshots just shows one line segments moved to reveal the remaining underlying common edge. To avoid this problem we would need to intersect all lines with each other to receive the whole set of intersecting points. Then we proceed to remove duplicate segments.
Check the total line length again
We reduced the line length from 2893.74 mm to 2882.45 mm. Not a great saving for this example, but still a reduction.