Select duplicate objects

How to Select Objects/Duplicate Objects as typically shown below.
Have 100s of these lines in model not detected as duplicates.
Tolerance problem or domain problem?

Geometry:
Valid curve.
Open NURBS curve
start = (-1.44781,4.7059,0)
end = (-1.5774,4.70158,0)
degree = 2
control points: non-rational, count=3
knots: uniform (delta=1), domain = 303.411 to 304.411
clamped at start and end

Geometry:
Valid curve.
Open NURBS curve
start = (-1.44781,4.7059,0)
end = (-1.57739,4.70158,0)
degree = 2
control points: non-rational, count=3
knots: uniform (delta=1), domain = 0 to 1
clamped at start and end

Hello - probably domain - try selecting some of these and Reparameterize > Automatic and see if that sorts it out.

-Pascal

Thanks, Pascal – best I got was detecting 7 of several duplicates as shown here.

Ideally I want to delete the duplicates and their doppelgangers in one shot.

Just finding dupes and deleting those would require much hand-weeding of the originals.

Not always working with a convenient orthogonal selection box.

Attached is a Rhino file of the above model.

Tom Longtin

dupe lines.3dm (243 KB)

Hello - use SelDupAll for this.

-Pascal

Thanks - SelDupAll works exactly as wanted when duplicates are found.

Changing the line segments in question to degree 1 bumps up the duplicates found rate.

SelDup & SelDupAll not finding duplicates as shown below which apparently vary only in domain.

Geometry:

Valid curve.

Open NURBS curve

start = (-33.3451,4.5828,0)

end = (-33.4744,4.58522,0)

degree = 1

control points: non-rational, count=2

knots: uniform (delta=1), domain = 787.387 to 788.387

clamped at start and end

Geometry:

Valid curve.

Open NURBS curve

start = (-33.3451,4.5828,0)

end = (-33.4744,4.58522,0)

degree = 1

control points: non-rational, count=2

knots: uniform (delta=1), domain = 0 to 1

clamped at start and end

You can try this script from my library - it may be a bit slow with huge numbers of curves. You can specify a tolerance for what you consider “near-duplicates”. Note there are a number of options that are semi-hard coded into the script, but can be easily changed. By default it is set to check everything visible/selectable and leave one original, but those can be changed to examining only selected objects and that it can select all copies…

SelNearDupCrvs.py (4.9 KB)

Hello -

that is why I suggested Reparamterize > Automatic, in my first resp to reset the domains. That plus setting all to degree 1 and SimplifyCrv will get a lot more, but the lengths vary, so selDup will simply not consider those.


Valid curve.
Line
  start = (-32.83039,2.31347,0.00000)
  end = (-32.69713,2.31600,0.00000)
  domain = 0.00000 to 0.13329
  line length = 0.13329

  start = (-32.83039,2.31347,0.00000)
  end = (-32.69713,2.31600,0.00000)
  domain = 0.00000 to 0.13328
  line length = 0.13328

Some are not so duplicate:

image

Keep in mind, too, that duplicates are not, in the context of the SelDup command, the same to within some tolerance, they need to be the same in the Rhino database - these are different:

line length = 0.12923788037735379
line length = 0.12923961125260042

I’d use Mitch’s script…

-Pascal

Hmm, while it would probably catch situation in the above image, it will not necessarily select the “bad” hooked end object instead of the “good” continuous line… At one point I worked on a script to just find near-dup lines/polylines, never finished it though.