Cleaning a set of curves

Good afternoon,
I’ve got a big set of curves that are fully or partially overlapping.
Is there an easy way to find/remove duplicates by keeping only the curves as seen? The display order is good and I’d like to keep only the curves that are on top.

Thanks for your help

I’m not sure what this means. Do you have a sample file that illustrates what you have and what you want?

– Dale

Hi Dale,
The example attached is the result of a HiddenLineDrawing.Compute() with clipping planes.
I’d like to remove every overlapped curves and keep only the curves that are visible in rhino (the green ones in this particular example + the left section of a black curve that is not overlapped).

To make it short, I’d like to keep only the objects that I can see from my top view, ideally from rhinocommon (at worse even if you have a rhino command for that it still would help a lot).

Example_McNeel.3dm (28.6 KB)

Thanks for helping

Hi @Matthieu_from_NAVINN,

Intersection.CurveCurve will detect overlaps. Then you just need to decide which curve to throw away.

– Dale

Hi @dale, I thought of doing this, but I’ll have thousands of curves, and testing such a number by itself will be really heavy and time consuming.
It would be great to have something to natively clean this kind of set. For most CAD design companies I know, duplicated or overlapped curves are big “no” in the design quality specifications.
Thank you anyway for you help

Hi @Matthieu_from_NAVINN,

A function that helps with this is on the to-do list.

https://mcneel.myjetbrains.com/youtrack/issue/RH-47496

– Dale

Nice, I’m looking forward to see this in RH7.
By the way, if you add this kind of feature, I could be nice to also embed it as a HiddenLineDrawing.Compute() option