How to select "LIKE" objects

Let’s say I have 30 circles in a drawing. 10 are 100 mm in dia and red. 10 are 200mm in dia and red and 10 are 300mm in dia and blue.

Is there any way to select objects by characteristic, let’s say I click on one 200mm red circle and then want all the 200mm red circles to be automatically selected.

This is a very trivial example but the basic principle applies; how do I select all the objects that are like the current object in geometry and other selectable criteria.

Lets say I get a drawing from an architect and all the couches in the drawing were drawn at the wrong scale. I need to select all of them and move them onto another layer so that I can then work on them.

Any ideas?

For simple elements like a circle, there are scripted solutions possible. Attached are two of mine, with one you can select circles less than, equal to or greater than a particular radius; with the other you select one circle and all others of the same radius will select.

That works because a circle is a recognizable object with a radius property that can be read. However, for something more complex than that, there is no real remedy - the remedy is actually upstream, said couches for example should be blocks, that way you can fix the master block and all the other instances will update.


SelByRad.rvb(2.4 KB)

SelSameRadCircles.rvb(663 Bytes)

Could one not do the following:

Take the selected object and hold it in memory.

Then step through the elements that make up the object. While stepping through this loop check each object on the drawing and check if the object is similar. if it not similar discard it from the step list.

Now take the next element in the master object and check the objects left in the list…and discard it if it is different.

It should work very much like traversing trees of grouped objects.

You should be able to narrow it down that way for complex objects.

Then it would be a matter of looking at specified criteria, be it colour or whatever.

I just think that one should be able to do this with complex objects by looping through them in exactly the same way one would look for information in tables in a non-relational database.

What do you think?

Well, yes, something like that… There are ways to quickly narrow the search like measuring the object’s bounding box and eliminating all objects that don’t have the same dimensions… but… Rhino does not really have a concept of “similar” for objects. Either it’s exactly the same geometrically, or you have to check a lot of criteria to make sure it’s really the same. Now multiply those checks by the number of objects in the file, including trying to figure out if it’s the same object with a different orientation in space… The process can get very time- and resource- consuming.

As I said, objects like circles, lines, boxes, etc. with simple, well defined criteria are easy to search for and find. However, most objects are not made like this - they are a complex combination of joined curves and surfaces that need far more criteria to fully define.

If you were willing to accept the possibility of some “false positives”, it might be able to use a simpler set of search criteria perhaps… Like for a group of curve objects ones that have the same bounding box, same total number of curve elements, same types of curve elements, same total curve length, etc… But there would still exist the possibility of getting something included in the selection that wasn’t an exact duplicate. On top of that, there would need to be a bunch of different sets of search criteria for different classes of objects - curves, surfaces, etc…

I’m not saying it isn’t possible - it’s actually a pretty interesting type of program to write - but there is a fair amount of work involved… :sweat:


hmmm…I suppose it would have been easy if each object had some form of checksum across its characteristics. Yes, I see now how difficult it would be to do.

Yes, it would be easier if there was a real sort of database for each object as in parametric modelers. But that’s just not how Rhino works, so all we can really do is analyze objects after they have been created to see if they are “similar”. As I said earlier, often this stuff is done with blocks (which are a sort of database object) in advance - which programs like AutoCAD also use…