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.

  • No, but it could be built with scripting. Just not very conductive for graphics. – joojaa May 28 '17 at 18:55
  • 2
    In metal industry laser cutting optimization software is used. One designer cannot do it alone because putting different jobs onto the same plate can greatly boost the efficiency. (and cause serious disorder, if the parts do not have proper numbers etched). See the link: radan.com/profiling/radanradnest – user287001 May 28 '17 at 20:09

I don't believe that there's an automatic way of doing it. How would the computer know which shapes you want combined and which you don't?


As an alternative, you can use pathfinder.

Select the shapes you want to combine,

Go to: Window → Pathfinder (Command/Ctrl+Shift+F9) and use Merge option from pathfinder.


Done with Pathfinder


You can also use the Shape Builder Tool (Shift+M)

Done with Shapebuilder


As of Illustrator CC (2015.2) there is also the Shaper tool which works similar to Shape Builder tool - Read more at Adobe

  • 1
    +1 for the shape builder tool which everyone forgets about or doesn't want to try. – LateralTerminal Mar 15 at 14:19
  • "How would the computer know?" Its pretty straightforward; For any two line segments that have less than x inches (mm/pts/etc) of overlap (where x is some very small but non-zero distance) then delete one if they are equal length, delete the shorter one if its between the endpoints of the longer, or if they overlap but both have line endings outside the overlap, add a new anchor to one and delete between the anchor and the endpoint. – Garth Winter Webb Sep 4 at 18:15
  • That would likely require a script of some sort. – WELZ Sep 4 at 18:19
  • The problem with the shapebuilder tools is that I don't want to join the volumes, I still need the dividing line. The above example would be more apropos if one side of the two rounded rectangles were shared. By merging, I'd get a single volume when I actually still want one dividing line so that the laser cuts me two equal rectangles. A better example is if I wanted to cut out this arrow shape (i.stack.imgur.com/9Yejj.png) and found they nest well. Nesting saves space and cutting time. It seems existing tools won't do this but I feel certain there must be a plugin. – Garth Winter Webb Sep 4 at 18:30
  • You can Click in the shape you want to extract and then do the same for all the shapes, you can then select just those shapes (Shift+Click) and Cut them, then select all and delete > paste in place (the cut shape from before) – WELZ Sep 4 at 18:46

Illustrator has no method to remove overlapping paths which I'm aware of.

It takes manual deletion of any overlapped path in all instances since two shapes can't "share" a common path segment in terms of construction. Pathfinder/Shape Builder are also generally no help with this either. They are both geared more towards creating/removing individual objects, not recognizing overlapping paths. They will both generate the same path overlaps you get from manual construction when they deem it necessary.

All you can really do is create objects differently. For example, create a primary outer shape, then manually draw interior division as separate, single paths.

enter image description here

In the case of entire shapes overlapping path, then Shape Builder may be of use. But it'll still fail miserably for just paths which overlap due to adjacent shapes.

Just use the Direct Selection (White Arrow) Tool to select the overlapped paths and delete them.

Say I have the following shapes with overlapping paths:

Overlapping paths

I would:

  1. Lock the two center shapes in the Layers Panel

enter image description here

  1. Make sure all paths are deselected (Ctrl+Shift+A)

  2. Using the Direct Selection tool, click directly on the path segment you want to remove. Shift-click to select multiple segments at once, then just hit Delete:

enter image description here

Hope that helps...

  • The issue is not as much how to "remove lines" as it is "how to remove lines automatically." There are a number of ways I can easily remove these lines by hand. However, if the pattern is repeated, say, 100 times (as it would be for laser cutting many copies) then any manual technique becomes extremely tedious. Also the above example has the advantage of good alignment. if you shifted the outer rectangles so that no shape shared a full side overlap, there would be no single side that could be removed. You'd have to add extra anchor point, then delete what's between them. – Garth Winter Webb Sep 4 at 18:08

The option to do this is in the pathfinder (CC 2018 second to last option: circumference? not sure what its called since i use a dutch version of ai)

Select all the shapes and click it. the line color will disapear so you'll need to color them again but this works for me.

To remove overlapping path lines, select the overlapping lines with the direct selection tool. Then select cut path icon from control menu bar. Click on white space...then click on the cut lines and drag, one of the 2 overlapping lines will move.Select the separated line and its endpoint anchors and hit delete.

Takes a few minutes but does the job of optimizing overlapping parallel lines that share anchor endpoints to reduce laser passes and double cutting the material.

Depending on the graphic, I've had some success exporting it as a very high-quality jpeg, then opening it in Illustrator, and using the images trace tool to make new paths. This is an decent method for patterns and such.

Use pathfinder and click on "outline".

It removes automatically all overlapping paths and you have an outline without color,so resign a color for your outline.

Another trick can be useful for your work:

Select all the paths and with appearance panel radius opacity on 40% and dedicate a larger stroke weight, so you can see all overlapping lines for correct them. At the end of process you can adjust the opacity to 100% and the stroke weight.

New contributor
farzad is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
  • This does not actually work. A laser cutter then would just ignore cutting altogether. – joojaa Nov 8 at 18:39

best would be if you had access to autocad (overkill) or rhino (seldup)

New contributor
user129249 is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
  • 3
    This does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker. - From Review – Danielillo Nov 10 at 11:13
  • Unfortunately this isn't a clear answer or even a stub... perhaps you could expand what you mean for the OP? Moreover, Acad is cost-prohibitive for a lot of folks who might have no other use-case for CAD - would DraftSight (which is free) work for the method you're thinking of? Can you describe the duplicate line removal process you're advocating? – GerardFalla 4 hours ago

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.