# How to find objects by the same?

I have many objects. Them repeater. Do you have solution to selected the objects by the same faster? i compare area them then get objects by the same but it too slowly.

First filter by the length of the curve,
Next, how about comparing the number of edges in the curve?

i think not good because length of A like length of B1 but B1 + B2 =>B (one object)

how are these objects created? also with a script or not?

you could first check if curves are inside another curve with this:
https://developer.rhino3d.com/api/RhinoCommon/html/M_Rhino_Geometry_Curve_PlanarClosedCurveRelationship.htm

then check their combined length

It is not possible to search for an object in an object because there is a case where Object A nested object B .The object be copied

So if I give you a solution, then you make a different case out of your problem
In your new case: see if curve A is in the inner curve of B.

These are all of case

The logic of this type of thing is always the same - you need to find a set of characteristics that make this object uniquely identifiable and that only exact copies (displaced in space) will match. Then you need to take all the other objects in the file and analyze them for this criteria, using a â€śshort-circuitâ€ť logic, with the fastest analysis methods first - that way as soon as an object does not match one criteria, you remove it from the list and move on.

However, if you are going to look for â€śobjectsâ€ť which are actually sets of two nested curves (not grouped) you will first need to establish which curves are nested inside each other and create potential â€śobject pairsâ€ť with an inside/outside curve before going on to the comparison stage. Or, determine which is the outermost curve in the original, then look for all similar curves, then when those are found, see if they contain a similar inside curve. You will also need to check the geometric relationship of the inner curve to the outer curve.

If there are many curves, all this will take some time.

1 Like

my solution is made â€śbrepâ€ť then compared area of them. This solution too slowly

How many objects to you have to check? Note that just comparing the area is not a very precise comparison, many different shapes could have the same area within tolerance.

About 3000 objects to check. I know this it bad solution but havenâ€™t solution another. Sometime wrong with area comparison.

But if you have breps, it should be easy to compare the curves as above mentioned with length, number of edges etc. Deconstruct the breps, so you get a list with all the boundary curves. This means a â€śrectangle brep with a circular hole in the middleâ€ť canâ€™t be a â€śrectangle brepâ€ť and â€ścircular brepâ€ť.

That is also a good.