For a project i was working on, i needed to optimize for game engines an enormous industrial CAD mesh with gazillion of bolts, washers etc. I needed to separate all these small objects into a new collection and doing it by hand, selecting every single one of them would have killed also the most patient modeler in the world. So i needed a huge, fantastic, amazing time saver. This script allows you to automatically select all the objects in the scene that are identical or similar to the ACTIVE one. It compares the number of vertices and dimensions of each mesh in the scene with that of active object, and selects ONLY the objects that match these criteria.
The script starts by defining a tolerance threshold, epsilon, which is used to determine the acceptable percentage difference for dimensions and volume comparisons. It then iterates over all the objects in the scene and checks if they are of type "MESH". For each mesh object, it compares the number of vertices with the active object. If they have the same number of vertices, it proceeds to further comparisons. First, it checks if the dimensions of the current object match exactly with the active object's dimensions. If they match, the object is selected. Next, it calculates the volume of the bounding box for both the active object and the current object. If the percentage difference between their volumes is within the tolerance threshold, the object is selected. Lastly, it compares each individual dimension of the current object with that of the active object. If the percentage difference for each dimension is within the threshold, the object is selected.
Install this addon like any other addon in Blender