Follow Along: Intro to Remapping

Transcript

In this lesson, we will start with our starter file that you can download below and implement some of the concepts discussed in our previous lessons on remapping. In our starter file, we have a box that we’ll use to create a gyroid, and we have that here as well. We have a plane that we’ll use as a reference, and then I also have when we’re doing our cylindrical and spherical remap, we also have this box with a square hole in it.

So, let’s first start with that wall TPMS gyroid variable. We’re beginning by just creating a mirror image of it. So I’ll add a new section and label this mirror. And we’re going to use our Remap Field. So I can search for that in the search bar or go to fields, and we’ll use that Remap Field. So the object I want to mirror is that gyroid, so I’ll drag and drop that variable. And I want to have that mirror along the Y, so the X and the Z will stay the same, and our Y will be what’s different. So for our X, we’ll keep that the same. Z, I’ll keep the same.

And to show the comparison between our two different fields, I’ll also make our scalar field variable, which will just be our Y axis. So I’ll add a Scalar Field variable into that input and I’ll label this as Y, and I can just type in Y, and that will indicate the Y axis. So if I select this block and type F, let’s add that contour interval. Let’s do five millimeters and probe our values. These are all going to be positive going up the Y axis, negative going down. And to do the mirror, all we have to do is take that negative. So I’ll do Y. negative Y and then I can take that negative. So by just clicking on that, I’m now going into those block details, and then I’ll click out of it. And now we can see we have this mirror that just appeared, that Remap Field. And the reason for this is because instead of having all this positive, it’s now negative, and the positive where we are placing our geometry, it’s now below. So if I wanted to make this a variable, we’ll drag and drop that just so we can see the difference. We can see it’s just flipped. So that’s how we can create that mirror using that Y axis.

So that’s how I created our mirror of our gyroid. The next thing that I’ll do is translate. So I’ll hide that section, add a new section, and I’ll label this translate. And we’ll go back to viewing that gyroid by typing I to isolate our view. I’ll put my cursor under that translate section, and again, we’re going to grab that Remap Field. Our geometry that will again change is that gyroid variable, and the Y and the Z will stay the same this time, but now we’re going to just shift that over along the X. So remember that subtracting moves the body in the positive direction. So if I wanted to move this to the right by five, I would subtract. If I wanted to move to the left by five, I would add. So if I subtract the X by five, now what we can see is it’s just been shifted over five.

And actually, to see this better too, I can also go to my view and add my display grid. And we can see that this has just been shifted over to the right by five. And again, the reason that it’s shifted, if we type F, we can see that on the X axis, is that our origin along that X axis has just been shifted over to the right by five. So we just subtract everything by five. That’s how we get something like this. So this is another way that you can translate something. If I want to scale, let’s add that next section, label that scale, and hide that translate, and again, still using that Remap Field. So I’ll just add that, and we’ll continue to use that gyroid. This time, I’m going to show two different types of warps. So we’ll do a constant warp and a varying warp. We’ll start with a constant. So we’ll keep the X and the Y scale the same, and then for the Z, we’re going to just multiply the Z axis by 0.5. So I’ll add a Multiply Block and multiply this by 0.5.

So now if we see this, this is twice the size. Similar to how when we were translating, we need to remember that subtracting by five actually moves us to the right five. If we’re multiplying by 0.5, that’s going to give us a part that’s twice the size. And again, the reason for that is if we type F, let me change that plane from normal and let’s do a contra interval of five again. So notice that we have our box along Z is going to be 30 mm. So when we’re looking at that Z axis with that multiply by 0.5, we’re multiplying all those values by 0.5, so it’s going to really be 15 at that original max point. And for this one, we now have it twice the size, is where it’s going to be 30 mm within our field. So that’s how we’re going to be able to create that constant warp. It’s just scaled that by five. And if you look at the X and Y, without looking at that, see, it looks exactly the same. And really the only thing that’s changing is that size of that.

If I want to see some type of varied warp, especially in the cell size of this gyroid, what I can do is add a Ramp block with this. So I’ll multiply my X, and this time I can have it change from 0.5 to 1 that I’m multiplying it by. So I’ll add a Ramp. I’ll use that original plane that we have, so that’s our plane. I’ll turn off that SP grid. We just see that, see our gyroid. And using this plane as our scalar field, that reference for where change is going to occur, I’m going to start seeing that change right at that plane. And I’m going to have this go to 100 mm, so all there that part. And we’re going to begin with that larger value, or that larger scaling. So it’s going to be twice the size starting off that cell size, and then it’s going to go back to how it was originally, the geometric warp. So now we can see how that looks, and if I type F, I can make this 0.1. We can see that ramp is only going to affect. It starts 0.5 and then goes down to one, it goes back to one, to create our original cell size. And we have that twice the size, and we can see what that looks like on the different angles. So when we’re not looking at that X of view, we’re going to have that constant size change. We can see what that looks like along the Z to the X. So now we have twice the size of that box, but now we’re just going to have that cell size change the gyroid. And you can see that also through here when we have the same height, the box, and we’re just changing that cell size. So that’s one way that we can scale using that constant warp, that constant scaling and the varied scaling using the Ramp block. And the last example I’ll show with just using the Remap Fields is our array.

Block, so let’s add another section. Label this array. And again, we’ll have Remap Field with our dry. So if I wanted to have multiple of these displayed for instance, what I can do is use our Mod block in addition to this. So the X axis I won’t have any change. I’ll have that, I’ll have that array along the Y axis, and C will stay the same. And so I’ll add a Mod block for our Y axis, and we’re going to just have this repetition every 50 mm. So I’ll do Y and then mod oper and B, it would be 50. So when we look at this, you can go back to that mirror where we have that Y and type F. Let’s do contra interval of 10 and then compare this to our mod. So if I type F now, we can see I have no more of those negative values, and I’m only going to be going from 0 to 50, 0 to 50, and it’s going to keep on repeating. So when I’m placing my geometry, I’m going to be placing it in each one of these, and this is just, you know, that one section of the field on this plane, on this size of 200, but it’s going to be continuously changing. So if I try to visualize this, you can see I get this kind of interesting shape that’s because it’s continuous. We don’t have any kind of finite stopping point. So I’m actually going to turn off that visibility, but what I can do is view this as a field. So if I type F now, we can see, let me move this over a little bit. We can see where our part is actually being placed in those negative fields. So anything that’s that pink to dark blue. So each time it’s going to be placed from that location that 0 to 30 mm, similar to how we originally had that in our original gyroid. So in order to visualize this and be able to use a nTop designs, we’re going to set the Field Bounding Box. So I’ll add that block by just searching for it. So we can set the Body Bounding Box, but we’ll just set the Field Bounding Box. Add that to the right section. And what this will do is, I can say, okay, you know, this is infinite, but I’m just going to only view anything within this bounding box that we had. So I’ll place this into the Remap Field for the bounding box. I’ll type in bounding box. I can put that in. So you see that’s pretty small, that’s right there, and it does show whatever in that space. But I want to show a decent amount of these. So I’ll start at the origin, so 0 0 for 0.1. And then for my 0.2, because this is going to be 100 mm along the X, I’ll make this 100. I’ll make the Y, let’s do since we have this by 50, let’s do a little bit under 50 so we don’t have that additional one. So I’ll do 199, and then the height or the along the Z, it’s going to be 30 mm.

So now we can see that I have selected four of those to visualize. Look at that bounding box. I could always change that. So if I wanted to make this only 150, you can see you just want to make sure that you don’t have that at the edge. You’re going to have a little bit of that shown. So you want to make sure you have some space in between if you’re using this. But you can continue to, you know, play around with the height, how much you want to include, for instance. So that’s how we would be able to array.

And the last thing that I’ll show is our cylindrical remap field and our. And the last thing I’ll show is our Remap Cylindrical Field and our Remap Spherical Field. So I’ll close that array, add our last section, and this will just be our cylindrical and spherical field. And instead of using our gyroid, I’ll use this body for remap. So I’ll type “I” to just view that and then “Z” to zoom in.

And let’s add that cylindrical and spherical remap into this section. So note that both of these are also our tool. Those custom blocks and we can see that has those double lines. So if you wanted to, you can always right click and Export This Block if you want to see how this works. Or for instance, with this cylindrical field, it happens along one axis. So if you wanted to change that axis, you could go into that custom block, change that. Same thing with that spherical field. But for our Remap Cylindrical Field, I’ll keep these both as is for this example. And the field we want to use is this body for remap. And then we have this Y mapping length. So you can also click learn more and you can go to our documentation to see some more of this as well and review those lessons that we have. But this is going to be where we are actually going to remap. So you’re going to determine that size, that length that we want along that Y axis to wrap around. And for this example, I’ll use .25 mm. And I’ll right click and make this a variable since we’ll use the same values for our spherical field remap.

So if we look at this, I get this new change. And to better visualize what’s really going on, I’m just going to make a region to show where that Y mapping length is really occurring. So if I add a box to this section, the length and tenna is fine. And for the width, that’s going to be our Y mapping length. So if we have this base in the origin, it’s going to take, you know, that region that we had that .25 in between that and use that for remapping. And if we want to see what that region looks like on our original body for remap, I’m just going to do a Boolean intersect of this box and that body for remap. And I’ll change the color. Let’s make that red, for instance.

So what we can see is we have this, and it’s just going to take this. I’ll put back that view of our display grid so we can see where that origin is. And using that cylindrical field, it’s just going to start that origin using this mapping length and it’s going to rotate this around. So we can see that there around that Z axis. So that’s why while we have that box with square holes, we’re going to have this shape where we have that hole going all the way around in that cylindrical wrap. So if you’re using something like our gyroid field, you want to have that cylindrical design. If you’re thinking about some of our lattices, that Cylindrical Cell Map, Spherical Cell Map, or our TPMS Cylindrical or Spherical, it uses a lot of these concepts. So being able to kind of take that origin and then just rotate this around, that’s why we have only that one section that we’re working with. So I’ll right click, make this a variable, label this our revolved.

And I’m using the Remap Cylindrical Field. You could also use, if you look up remap, you can also use a Remap Cylindrical Body. So if I hold control and just move both of these inputs over, we’re going to get the same exact result. So one just has that input of a field, output of a field. So one just has that output of a field, the other one is a body.

And then we can also get that field out or that body out by going into those properties. So if we had that Remap Cylindrical Body, it would have that field in the inputs. The body is one of those inputs for our scaler. And for our spherical field, let’s see what that looks like. Our Remap Spherical Field.

And if we wanted to do the Remap Spherical Field, let’s see what that looks like. So I’ll put in our body for remap, and we’ll use the same Y mapping length for the Y, and that C option, turn off that cylindrical field. And what we look and see is just something that looks like a sphere. But if we do a section cut by typing X, we can see that it has that same kind of cut that we had in our Remap Cylindrical Field. So we’re just going to have that spherical remap. We’re taking in that region and just going to rotate that around to get something like this. So this is just an example of that implicit body in doing this remap. So a lot of times, we’ll see this use case, and we’ll talk about this later in some of our other applications. But especially if you’re doing something like that TPMS Spherical, this uses that same type of concept.

This video walks through the examples from the previous text lessons in the Intro to Remapping section on how to use Remapping to mirror, translate, scale and array an implicit body. 

Please download the nTop file below to follow along with the tutorial.

For a faster or slower video speed, click on the settings in the bottom right of the video.  

Example File:

This file was last updated in nTop 4.6.2