Follow Along: CB Stochastic Lattice

In this lesson, we will walk through creating a custom block from a stochastic lattice workflow and use this custom block in another workflow. To learn how this workflow was created, check out our lessons on Non-Periodic Lattices in the Intro to Latticing course.

Transcript

In this lesson, we will use the completed stochastic lattice workflow that you can download below this video and use that workflow to create a custom block that can add a stochastic LCE and union it to another body on any two implicit bodies. So, if you haven’t viewed our intro to lacing course, we recommend that you check out the lesson linked below if you are interested to see how we can produce this non-periodic lattice. But I’ll also review what is going on in this file.

So I have this bracket and it’s split into two bodies. I have my outer body, I have my inner body, and I take that CAD inner body and convert it to an implicit body, and my outer body is also an implicit body. And our inner body, we want to add that lattice structure, that Voronoi lattice. So I first take a set of random points in the body and then I apply my Lattice Body to Volume Voronoi to create this stochastic lattice with a thickness of 5 mm. And I trim this lattice body so that we only have the lattice structure that’s within that inner body.

Once I’ve done that, I then fully union this lattice structure to our outer body and I have this 5 mm L radius. So taking this whole piece, we’re going to think about how to create a custom block, and I’m going to save this file as is. And then I’ll save this as what our custom block will be labeled, which will be CB Stochastic Lattice (CB for custom block). I’ll also rename that title to CB Stochastic Lattice. It’s a good practice to have your file name equal that of a notebook name as well. And I’ll change this description to say that this workflow adds a Voronoi lattice to a bracket and unions the two bodies together. So especially if you’re sharing this custom block, it’s good to add a description just to let others know what this block does.

And we also need to think about what are our key variables. I’ll right-click on that thickness and make it a variable. Maybe we want to change that input, and I want to place it into this input section. So you can just drag and move that. So any of those variables we want to change, we’ll move into the inputs. I’ll also right-click and make our point spacing a variable, and we can either drag and drop it or we can right-click and choose to make model input, that bottom option. So then once I have that, I can also maybe make my blend radius a variable, and I’ll also select make model input to bring it to the input section. Now I also need my CAD bodies, but if I try to drag and drop those into the input, it won’t let me. And that is because it is using that CAD Box body that’s in our notebook. So in order to drag and drop this into my notebook, I have to remove that variable from that option, and then once I do that, I can now drag and drop my inner body variable to that top input. I’ll do the same thing for my outer body, deleting that variable and placing it in there.

And if I want to add a comment, I can hover above that block and type in my comment as I have for my further body. So also, you might want to think about the unit types that you have for this. So for instance, my point spacing is a scaler, but I might want to change it to scalar field, and that will allow me to have a varying point spacing. It’s also a good practice to organize your inputs in the steps that you took to create them. And my inputs are complete. So now I have to think about my output, what do I want to produce after this custom block runs, which will be that final part.

Now before I’m done creating this custom block, I also want to remove any block that I’m no longer using, especially this geometry section, because keeping that pad body in there will increase that file size. I can just right-click and delete that section, and now I have everything that I need to create my custom block. So what I’ll do is file and save this custom block, and let’s try importing this into another file. We can import this in the file import. We can save it in my nTop folder. So if you save it in here, you’ll always be able to access it in the search bar. You don’t have to import each time. So I type CB. These are all those custom blocks that I typically use. Another option is to click on this plus button. So I’ll import that block that CB Stochastic Lattice nTop file. We can see that I now have this in my notebook and I have one item in my imported block since I have one imported custom block, and all of my five inputs I defined earlier are here. As you can see, our point spacing is now that scalar field option. And I can export this block as well if you see that custom block with the double lines.

So I’m going to test this out by importing two-part small bracket. So that should be the file that you downloaded below this video. And if you don’t see it on your screen, you can select that block and just type V to zoom in on that part. And very similar to the path bracket I made to slightly different dimensions, and I’ll right-click and make that CAD Body variable labeled CAD inner, and I’ll double-click on my outer body, right-click and label this our CAD outer. So all I will do is place those into our inner body and outer body options. And if I type I to isolate my view to that stochastic lattice, now I can also change these inputs. So for instance, I can change that blend radius that I have like so, and that’s how we can create a custom block, implement it into our workflow, and use it across a very various sort of parts.

0:00 Introduction to Stochastic Lattice Workflow
1:40 Preparing for Custom Block Creation
2:00 Annotating Your Custom Block
2:33 Identifying and Setting Inputs
4:25 Setting an Output
4:55 Using the My Blocks Folder
5:35 Importing and Testing the Custom Block

Please download the nTop 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. 

Example File:

This file was last updated in nTop 5.20.2

230_8_1 2part_smbracket.x_t

230_8_1 Follow Along — CB Stochastic Lattice.pdf