0
$\begingroup$

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: enter image description here

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?

$\endgroup$
0
$\begingroup$

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.

Node Tree

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

Hide

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.

| improve this answer | |
$\endgroup$
  • $\begingroup$ Thank you so much for your input on this! I'm sure that will give me exactly what I wanted but I didn't realize how much of a rookie I was at this. I installed the animation node, and i've stumbled my way through it to the point where I ALMOST have duplicated your screenshot above. Silly questions for you though: instead of "object list" I have "create object list" and I cant seem to put the "filter objects" in it. Any help would be greatly appreciated! Is there a good resource for learning this? $\endgroup$ – Joe Crozier Jul 12 '18 at 15:17
  • $\begingroup$ @JoeCrozier Don't worry, It takes sometime to get used to Animation Nodes. Animation Nodes has a rather comprehensive documentation, feel free to read the getting started guide and look up nodes you want to use. The Object List is not a node, but a generator, you can add that generator by pressing the plus button New Generator Output in the Loop Input Node and search for Object, read the documentation on loops for more info. $\endgroup$ – Omar Emara Jul 12 '18 at 18:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.