Follow Along: Cleaning and Simplifying a Mesh
Transcript
In this lesson, we will walk through examples of how to clean and simplify a mesh. So, to start off, please download the mesh file linked below this video, and I’m going to click on that section I have labeled as cleaning a mesh. And I can go to my utilities and I’m going to import that mesh. So, I’ll go to my path and I have it labeled as unclean mesh. It’s an STL. And we can see, like so, it’s our sphere cube with a gyroid. But the way that I created this, I created this unclean mesh, and we can see that I have this warning. And if I click on that, I can see that some vertices were merged, some removed. But then a key issue is that the output mesh is self-intersecting.
And if we go to our properties tab, we can also see that this is the case, that it is self-intersecting. So, some ways, if you happen to have a mesh like this that you’re either bringing in, you can use some of those processes we discussed in the lessons above, such as using a voxel grid. So, taking that voxel grid from a mesh and then converting it back into a mesh. But in this example, we’re going to show another option, which is using our Split and Filter Block. So, I’ll grab our Split Mesh and our Filter Mesh List.
And so sometimes we have our self-intersecting meshes because multiple meshes were produced that are not connected. So, if I bring in my Import Mesh, let me right-click and make this a variable, which I will label self-intersecting mesh, and I’m just going to place that into that mesh option. And we can see, even though I had only one mesh in here, I go to my properties, I have one mesh. But using our Split Mesh, we’ll have 10 different meshes come out of that. And to see what some of those meshes look like, if I go to my block details, if I grab this first one and type I, we can see, let me zoom in by typing Z, that we have this creation. So, part of the reason you might have a self-intersecting mesh if you’re planning to export an nTop ology, especially you have a very complex part, maybe you’re sharpening and simplifying, and it causes some errors like this. You might see these disconnecting pieces within your part. So, doing that Split Mesh will help you avoid those and remove those disconnected pieces. So, I’ll double-click and rename this just disconnected piece as an example.
Another way that you can grab the design that you want, so instead of having to go through this entire list to find which is the actual part you wanted to export for instance, or work with, is using our Filter Mesh List. So, let me type I, and we can see where that is placed in our part right there. And I’m going to type Z, so we can see this whole sphere cube. And for our mesh list, for our Filter Mesh List, because our Split Mesh is already a list, I can delete that mesh list and place in Split Mesh. Then we have this volume threshold. So, it will only keep the meshes that are above that. So, if I put something like one, we can see out of those 10 meshes we had in our Split Mesh, only one is going to be larger than that volume threshold. And so, then we have the part that we’re actually looking for, and we just removed all those other disconnected pieces. So, that’s one way that you can work to clean that mesh a little bit.
You might want to also simplify your mesh. So, our Mesh From Implicit Body, let me grab that block and add that to our simplifying a mesh section, has a simplify option. If you want a bit more control over how much your part is simplified, we can use those blocks we discussed in the lessons before this. So, for this example, I’ll turn off that sphere cube, hide that section, and go to the create tab, and we’ll use a Taurus for this example. So, I’ll place this in as my body. I’ll do a tolerance one, and I haven’t simplified it. If I do, we can see what that looks like. Maybe that’s too much of a simplification. So, I’m going to right-click and make this a variable, and I’ll just label this mesh Taurus and show two of the options that we can simplify using different blocks. So, the first one I’ll show you, type in simplify, we have a Simplify Mesh By Threshold and Amount. I’ll use Simplify Mesh By Amount. And for the amount, let’s do 50%. So, this way we can control that if we don’t want that basically 90% simplification, similar to what we had if we had simplified this, we can control that a bit better and get more of that shape that we’re looking for with that simplification.
We can also use a Remesh Surface block to control that edge length. So, I’ll place that mesh Taurus in there, and let’s do an edge length of 2 mm. So, that’ll be that maximum edge length that we might see in certain regions. And that shape I’ll choose as a triangle. So, now we’re also going to have that simplified mesh where in certain areas we might have an edge length of 2 mm, but when we need to have a smaller edge length, it will maintain that as well. And you can control that span angle growth rate, etc., as we’ve discussed in the past lessons. So, these are some options for cleaning and simplifying a mesh.
This lesson will walk through an example of using the Split Mesh, Filter Mesh Volume, Simplify by Amount, and Remesh Surface blocks.
Please download the mesh file below to follow along with the tutorial. If you would prefer to walk through this lesson in PDF format, you can download our PDF guide below.
For a faster or slower speed for the video, click on the settings in the bottom right of the video.
