Test multiple objects intersect

I’m busy working on a script to create rocks. So far it’s not looking too bad, but it’s still in a very early stage. I’ve started making more than one, scattered at random.

I was wondering if anybody knows of a quick and easy way in scripting to check if any of the objects created intersect with each other(two rocks going through each other)…so that I can either move them away from each other or apply a boolean.

Any advice would be much appreciated! :smiley:

You have to decide what API you are coding for. It can be done, but the two techniques are different.

Hi Atom. Thanks for the reply. I’m a bit new to the python coding part of Blender(I have been using Blender for a couple of years though)…thought I’ll get into it with the new Blender 2.5X.

I’m not sure exactly what you mean by which API I use? I’m currently using Blender 2.54 and will probably be moving to 2.55 soon. I’m also using Python to code with. Does that help?

This thread has a function to detect if a point intersects with a mesh. Perhaps you could modify it to process multiple point and or multiple meshes.
http://blenderartists.org/forum/showthread.php/195605-Detecting-if-a-point-is-inside-a-mesh-2.5-API?highlight=