Join John Helfen for an in-depth discussion in this video Driving constraints, part of Autodesk Inventor 2018 Essential Training.
- [Voiceover] Now that you know how to place constraints, let's look at how we can drive constraints. Up to this point in the course, all you've ever done is you've left click on parts, and you've moved them by dragging. What drive constraints will do is allow you to create a constraint that Inventor will change the offset value in an automated fashion to show motion. Let me show you what I mean. I'm going to right click in the Graphics window and select Constraint. And from within the dialog box, I'm going to set the Flush solution so that we can create a connection between the end of the block and the end of the base.
Now these are flush and are perfectly aligned. While we're in here, Inventor's placed us in the offset and let's take a minute and look at what that does just as a reminder. In the offset, if we were to hit one, you'll see that this block moves further away from the end of the base. If we backspace and enter two, it continues its way down the channel. I'm going to go ahead and set this back to zero and select OK to create the constraint and exit the dialog box. Now that that constraint's created, if we left click and drag on the block, you can see that it can't move. And that's because it has three constraints on it.
If we click the plus symbol in the browser next to slide one, you can see we have a Mate that connects the bottom of the block to the bottom of the channel, we have a Mate that connects the side of the block to the side of the channel, and finally we have the flush we just created, which connects the end of the block to the end of the channel. And that's the one we want to drive. What we're going to do is we're going to right click and select Drive, and what you'll see is a dialog box that will allow us to drive this constraint. In the title you can see Flush1 is identified, and just below that you can see that we're driving offset or parameter d2, and it has its position.
And as we play this and if we automate this, this number is going to update to show you where it is in the drive. Just below that you have information about how far you want to drive this constraint. The start position is zero, and that's what we want, that's what we're currently at, we're at an offset zero for this flush constraint. Next, we need an endpoint. We're going to enter five, and let's go ahead and just click the play button. You can see it happens very quickly, but what's happened is Inventor has taken that offset constraint, d2 here in the top of the dialog, and it's changed its position to five.
What you might not have seen is Inventor took five different steps in order to move the block from this end to where it sits now. If we click the double arrows in the bottom right of the dialog, you can see where that comes from. If you expand the details of this dialog, you can see additional information most specifically about increment and repetitions. We're not going to cover the adaptivity and collision detection, that's a little bit beyond an essentials course, but what is critical are these two areas. In the increment section you can see the Amount of value is selected, and that is set to one inch.
What that tells us is Inventor is moving this offset one inch at a time across that distance. Therefore, it's five steps. If we switch to total number of steps, you can see that value. By entering either one of these, and switching back and forth, Inventor will automatically convert back and forth between those. If we were to change this to 0.05, and then play this in reverse, you'll see that it happens much more smoothly. If we go down to 0.01, we even get more fine movement.
Now, I'm going to bump this back up to 0.05 and look at repetitions. Each time we play it moves from one position to the next. If we were to select this second option, start and start, we could enter a value of say, three, and this will make three cycles of that. It will move to the opposite end from where it was, it'll return, and then it'll go back. This allows you to see motion over a few different cycles. And while it's not super critical in this assembly, if this block caused the motion of other things, for example if we had a steam engine or we have some sort of engine model, we could generate motion by driving the flush constraint on this block and then having it move all the constraints that may be connected to it.
Let's go ahead and cancel this. And this time what I want to do is I want to take a quick second to delete these constraints and show how you can drive an angle constraint. It works in the same way. Let's go ahead and select the Mate, hold shift down on the keyboard and select the flush, then right click and select Delete. Now we have the ability to left click and drag this block around and we're ready to add the angle constraint. We can right click in the Graphics window and select Constraint to do that. Before we do that, let's go ahead and position the block. We're going to start by selecting the face on the side of the block and the face on the side of the channel.
We're going to hit Apply, and then we're going to select the edge of the block and the edge of the channel. Now if we select OK we create that constraint and we exit the dialog box. And if we left click and drag the block now you can see it rotates around that axis. And that's what we want. So I'm going to rotate it up so that we can create an angle constraint, and I'm going to rotate around to the other side of the block so that we can see the end of the block and the opposite end of the base. We'll right click in the Graphics window and select Constraint, we'll set our type to Angle, and we'll select Undirected as the solution.
To finish this, all we have to do is select the face on the end of the block, and the face on the end of the base. You can see the 0° offset is created, and we can click OK to create that. Now that we have that, you see the angle constraint is in the browser, and if we right click on it, we have the ability to select Drive. We're set right now to go from 0° to 10° and we'll change that to 90. Then we can look at some of the settings by clicking the double arrow in the bottom right. Right now it's set to move in one degree increments and I think that'll create good motion.
So let's go ahead and zoom in just a little bit on this and see how our driving actually works. I'm going to go ahead and hit play, and you can see just by creating that constraint, we can toggle back and forth to see that motion of the angle being updated. Here we're at 90°, driving in reverse returns it back to zero in one degree increments.
- Reviewing interface changes
- Projecting and importing geometry
- Working with Autodesk AnyCAD
- Understanding part modeling
- Building parts with placed features
- Working with partial chamfers