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 :smiley:
In your new case: see if curve A is in the inner curve of B.

These are all of case :slight_smile:

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.