Importing Outside Geometry (from Rhino) into Processing?

edited August 2014 in How To...

Hello all!

I'm new to the forum and have just started to re-discover Processing. I am currently working on a project that is using processing and transferring active swarm agents into Rhino via Grasshopper. That all works.

My question is: Can I model geometry in Rhino (say buildings, walls, etc) and bring that into Processing to use for attractor points or boundaries? I'm working on a optimized swarm agent code and would like to use Rhino modeled geometry for the swarms attractor points and boundary objects.

Any help would be greatly appreciated! Thanks in advance.

Answers

  • Yes, but doing collision checks on custom 3D geometry is computationally costly. So if you have a whole swarm that must stay inside/outside one or more shapes, you may have to look into some optimization strategies (spatial hashing/binning, parallel computing), if you want to run it in realtime.

    To get the basics started, you could look into the HE_Mesh 2014 library, which can import binarySTL and 3DS files or construct shapes from triangle/quadlists etc. and it has a contains() method for 3D shapes among many other goodies.

Sign In or Register to comment.