I'm looking for a macro that can detect distance between objects. Is there one that can do that? I want to be able to give a value and then have the script search and find any objects that are closer to each other than the value specified. Thanks
Joseph
jt123 said: I just need to detect whether any are too close or overlapping.
To clarify the requirement -- do you consider these two objects to be overlapping ?
If I calculate the bounding box of both objects, then the greatest X position of the left object exceeds the smallest Y position of the right object -- so the test would say that they overlap. But they are not actually touching at any point, and if the requirement is to allow the above situation then the test for overlap becomes a lot more complicated.
I see what your saying. I'm wanting to use this tool to check circle distances from each other. If it detects the circle object is less than the provided distance or overlapping, it can highlight it red like in the image below.
Will the individual objects always be circles?
That would make it easier, because we can take any two circles, calculate the distance between their centres (by pythagoras), subtract both of their radii and check if it exceeds the minimum distance. But if they were triangles or arbitrary shapes, then a very different procedure would be needed.