I often create designs that I need to bring to a laser cutter. To save time and material, I pack repeated shapes as close as possible. The ideal scenario is that shapes share a single line where possible; for example, two (or more) squares put adjacent so that they share a common side.
The problem with simply aligning the squares to be adjacent is that two path still exist in the overlap, and the laser will pass through that area twice. This double cut wastes time and reheats the material in that area. For this simple example, I could manually draw a long rectangle and divide it evenly into squares with single lines, but this becomes much more difficult with even slightly more complex shapes.
Is there an automatic method to merge overlapping paths into a single path? The similar questions I've seen here about this involve merging paths that overlap entirely vs paths that share an adjacent side or sides.