Separate stl into two stl's based on size of chunks-for 3d printing I always fear that this is a noobie question, I'm sorry if it was.

I have an stl file that represents a chemical structure:


The small spheres being one type of atom, the larger spheres being a different type.  My goal is to split this file into two files, one stl which includes all of the larger spheres, one stl with the smaller spheres.

My goal being to load these two files into my 3d printer software where I can assign a material to each stl for different colors or transparencies.

While still in Blender, how do I separate these two stl's based on object size?
In edit mode, separate the spheres by loose parts by pressing P >> Loose Parts. Now you have each sphere as a separate object. Put all of these objects in a group by selecting all of them and pressing Ctrl+G.

Now, in Animation Nodes, we will create a loop that only returns one type of sphere based on the vertices count. We first get the vertices count of any of the objects, lets say the first, then we loop over the objects and only return the ones that have a mesh with the same number of vertices as the vertices count we just computed.



Now, hide those objects we just computed using the Object Visibility Output Node.



Select those objects and export them using the Selection Only option, delete those object, unhide the other objects and export them. You now have two files each have only one type of spheres.

Notice that if the two spheres have the same number of vertices but different scales, then, similarly, the volume of the bounding box can be used to filter the objects.