Rhino WIP Feature: Overlapping Geometry Cleanup

What is Overlap?

In the Rhino WIP, we’ve added the Overlap command. It’s designed to help you clean up messy 2D drawings by finding and selecting duplicate and overlapping linework within a user-defined distance.

In previous versions of Rhino, the SelDup command would only detect exact copies. If the geometry was slightly overlapping or had different attributes, the SelDup would not be of help. Overlap bypasses these limitations.

*NOTE: Overlap does not work with surfaces & solids.

Why is Overlap Useful?

Duplicate/stacked linework is a common problem and can cause:

  • Selection/edition headaches (you think you grabbed one line, but it’s actually several)
  • Larger/heavier files and slower downstream operations
  • Incorrect toolpaths (multiple passes over the same segment)
  • Bad laser/plasma results (extra burn time, overcutting, inconsistent kerf)

Overlap targets these issues directly, especially in “2D production” pipelines.


How the Command Works

The commands we’ve included are:

  • Overlap

Try it:

  1. Download and open OverlapTest2.3dm (93.0 KB) in the Rhino WIP.
  2. Run the Overlap command.
  3. Set an OverlapDistance (start with a default 0.001 “overlapping” tolerance).
  4. Choose a Mode and select Segments.
  5. Choose a Delete option (Select or Delete)
  6. Optionally, set Filters (these control which objects are compared).
  7. Press Enter to select or delete overlapped linework.

Overlap Distance

Use this tolerance to define how strictly linework must coincide to be considered duplicates/overlapping:

  • Smaller tolerance = stricter matching (safer, but may miss near-duplicates)
  • Larger tolerance = more aggressive cleanup (may merge/select things you intended to keep)

Two Operating Modes

1) WholeCurves Mode

Best when duplicates are truly duplicated linework.

  • Only selects entire linework that is completely overlapped by other linework (within tolerance)
  • Great for stacked linework coming from imports or scripts

Typical results: Selects exact (or near) duplicate linework without changing remaining ones.

2) Segments Mode

Best for partially duplicated linework and “overdrawn” drawings.

  • Can select sub-sections of linework that are partially overlapped
  • Allows selection of portions of polylines & lines (not just whole objects)

Typical results: Cleans up partially redundant linework where only part of the geometry is duplicated.


Filtering Options (control what gets compared)

Overlap includes Filters, so you can decide whether linework is considered “the same” only when certain attributes match:

  • Locked | Ignore (Off), Participate (works with other filters), or Exclusive (this filter only)
  • Color | Ignore or On
  • PrintColor | Ignore or On
  • Layer | Ignore or On
  • Linetype | Ignore or On
  • LinetypeScale | Ignore or On
  • PrintWeight | Ignore or On

NOTE: Filters are set to Ignore by default. Below, the image depicts Segments Mode, OverlapDistance = 0.1, and Locked=Participate.

Why filters matter

These options let you:

  • Preserve layer structure (only compare within the same layer)
  • Or Selectively compare geometry based on attributes (useful in imported files where duplicates may be split across layers/colors)

Example filter-based workflows:

  • Imported PDF linework where duplicates exist on multiple layers → compare across layers by disabling the Layer filter.
  • Fabrication drawing where layer naming is meaningful → enable Layer filter so cleanup doesn’t cross-contaminate organization.

Common Overlap Use Cases

  • Cleaning up imported PDF/DWG linework with stacked duplicates
  • Reducing “mystery doubles” before joining curves, offsetting, or generating hatches
  • Fixing output from scripts that generate duplicate linework
  • Preparing geometry for laser cutting, CNC, plotting, or other toolpath workflows

Tips for Best Results

  • Switch to a clear 2D view that represents the projection you want cleaned (since it works from the current camera projection and linework is initially projected to the current CPlane). If any linework is stacked in 3D, DO NOT use the Perspective viewport.
  • Start with a small tolerance (e.g. the 0.001 default), preview results, then increase if needed.
  • If your file is organized (layers/colors), use filters to prevent unintended cross-comparisons.
  • For partially duplicated linework, try Segments mode first; for obvious stacked duplicates, use WholeCurves mode.

Try Out Overlap!


24 Likes

Nice command! But maybe I’m missing something.

I selected the four circles in your example, then ran _Overlap

One circle is selected. Shouldn’t there be an option to flip the selection so that instead of one circle to keep, three circles are selected and can be deleted.

1 Like

Overlap selects the geometry to be deleted. Only 1 of the 4 “segmented circles” overlaps with the 0.001 OverlapDistance default. If you raise the OverlapDistance, it’ll select all of the overlaps based on that tolerance. Try it with a 0.01 OverlapDistance.

2 Likes

I use SelDup command a lot.

What are the differences between the Overlap command and Seldup? I haven’t tried it yet. :sweat_smile:

1 Like

Thanks for clarifying.

I still think a toggle to switch between keep and delete would be nice.

1 Like

Oh yes that’s good!

Tooling requires the treatment of arcs and circles.
Is this planned?


Found such a function in a CAM app, and it also takes care of arcs:

3 Likes

Yes, definitely needs to include arcs…

1 Like

This is a very cool new tool, @stevefuchs. Is there any possibility of adding a similar tolerance option to the SelDup command?

1 Like

The difference between SelDup and Overlap in the Rhino WIP is that Overlap includes an OverlapDistance (tolerance) & multiple Filters. The current state of Overlap is limited to lines & polylines only, but you are well heard about including arcs & circles for fabrication prep purposes.

@Matthew_Sorensen can help clarify if there’s anything else planned for Overlap.

2 Likes

Another difference is that SelDup only works with exact duplicates. If you have two geometrically identical curves, and flip one of them, SelDup won’t identify the duplicate.

5 Likes

@Charles @Helvetosaur - It should include arcs now. In fact, as of this week’s WIP it will work with NURBS curves. We will update the post above.

4 Likes

RH-92563 Add Delete option for Overlap

2 Likes

This command is really useful, something I’ve been wanting for a long time

2 Likes

This is awesome.

Can we please please please get this as a native Grasshopper component?

In GH this has a lot of potential to go beyond all the great utility use cases you’ve mentioned.
It would be super useful for things like filtering recursively drawn patterns to keep them from crashing the solver as they grow

2 Likes

Hi Martin, I have not downloaded the WIP and I haven’t run overlap so I don’t know what you’re seeing, but if this is similar to seldup in that it gives you the geometry selected/highlighted at the end of the command… you can just type “invert” to invert your selection? I’m sure if you isolated or the curves in question first this would do the trick?

1 Like

Yes that would definitely work.

Circles and arcs: Perfect result.

Lines:
In this example Overlap misses 1 element.


On a 2nd run it’s found.
2026-02-20_OGC.3dm (851.3 KB)

We can preselect geometry, and then Overlap.
I expect that the preselection is cleared internally, and after the command only the superfluous elements are selected.
To delete them.
Doesn’t work, DEL doesn’t do anything.

Preselection makes no sense this way.

1 Like

Noted, @Charles. Working on this with @Matthew_Sorensen. Thank you.

Overlap has been updated to include a Delete feature (Select is still the default, but you can also change to Delete). As @Vanessa mentioned, circles & arcs are working, and now NURBS curves and points also part of the geometry that works with Overlap.

NOTE: I also updated this original post to reflect these changes with an updated command description, images, and a new test file. However, you’ll need to wait for a new public WIP release for testing, unless you DM one of us for the latest daily WIP build link. Happy to help you with that, and thank you for all the great feedback! :slight_smile:

4 Likes