Determine if objects overlap

Hi. Is there any good ways of checking if objects in scene overlap/intersect?

2-dimensionally from a certain viewing angle? or do you mean interpenetrating in 3D?

In 3d. If they touch at all

see:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Modeling/Meshes#Intersections

Thanks. will check it out when I get the time

I can’t seem to figure it out. can’t find anything called intersections in edit mode?
What i’m after is to be able to determine if any objects overlap of even touch at all. From a script.
I’m writing this script that import and add many object(meshes to the scene based on data from a file that the scripts read. And I need a function that can detect if two or more object/meshes overlap in any way. The positions of the objects are in the file that the scripts reads.

Anyone got any good ideas? :slight_smile:

it’s an addon, 3d print toolbox

Okei, I’ve tried it, but it did not work? I put added two cubes and placed them on each other press “Intersections” and the output is always = 0. Btw can I call the addon functions from my python script? I think its best to just write my own function do determine if any intersect. maybe just on location and and size?

oh well, it’s for single meshes, so actually self-intersections. If you got two object, you would have to join them first. But you might be able to port the code of the addon to work across objects (you need to take object transformations into account!). Check out the addon’s code and see how the intersection test is done!

If you want an easy an fast way to make sure nothing overlaps, my first idea would be to calculate bounding spheres from bounding box data. Using bounding spheres you should be able to quickly test if objects are potentionally overlapping by comparing the distance between the two sphere centers and the sum of the two radii.