How to do _SelDup followed by _Delete using RhinoCommon methods?

Check the upper script. It distinguishes between curve duplicates on top of each other, or not, flipped or not.

1 Like

Thanks a lot.

I also like the idea of using xrange(). I want to see how that will help with the performance before using multithreding and probably a different language

1 Like

There are a couple of special cases, notably lines and polylines, where SelDup does detect identical but flipped objects. I’ve never figured out why it hasn’t been special cased to work with circles though.

I also have a couple of “SelNearDup” scripts… They’re not very fast in any case, because it requires checking quite a number of criteria if the object is close to being a duplicate.

1 Like

I’m not a programmer but for cases like this one I always run _make2d after having projected the curves on xy plane. This will remove any duplicated curve on top of another, no matter if it has flipped direction. I’ve attached a simple example to illustrate it. Maybe you can use the same command in your script??
SelDup.3dm (3.0 MB)

3 Likes

interesting, thanks.