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
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…
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:
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
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.
This is a great too Mitch. It has been very useful to me. I’m going to se if I can adapt this to work with surfaces in order to clean up Alias files I bring in from colleagues that have flipped normal directions and so on.