Join John Helfen for an in-depth discussion in this video Mate or Flush constraint, part of Autodesk Inventor 2018 Essential Training.
- [Voiceover] Up to this point in the course you should already know how to create sketch geometry in parts. You even know how to put those parts into assemblies. Now what we need to look at is how you can build intelligence into those assemblies by adding constraints. Constraints are what tell parts where they're supposed to be positioned and how they're supposed to move or act within the assembly. On the screen, you can see the universal joint system I've been using, and one thing's changed here. For this movie, I've gone ahead and turned these three parts in the center into a universal shaft assembly.
What we're going to do is look at how we could attach those parts together, and create that assembly. I've created a file that you can start from called Universal Shaft Start.iam. On the screen you can see the three parts that we need to connect together to generate that subassembly. To do that, we need to add some constraints. You can find the Constraint command in the Assemble tab under the Relationships panel here in the middle. The other way to access is to right click in the graphics screen and select Constraint. By doing that, you bring up the Constraint dialogue box, and we can start to look at all of the information needed in order to create the constraint.
Now just like when we were learning about features, we've spend an extra amount of time on extrude, because not only was it the most common feature, but the user interface in the process is the same for all types of features. Constraints are the same way. By default, when you create a constraint, you're placed in the mate type constraint. You can see that here in the dialogue box. If you hover over it, you'll see the word mate, and that's the default. It's the one you're going to use most frequently, and since it's the first one, we're going to spend a little extra time talking about these settings in detail, because once you understand how the mate and flush constraints work, the rest should fall into line quite easily.
Let's real quickly look through the dialogue and talk a little bit about some of the settings. Then we'll go ahead and create some constraints and finish this assembly so that you understand how to connect your parts together. In the dialogue, you can see that we have different types of constraints, we have different selections that can be made for each constraint, we have an offset and some distance information, and we have a solution section. Now just like when we were placing the hole, when we change the type of hole, or the type of placement, we had the inputs change. The same is going to be true for constraints.
Depending on what type of constraint you select, these selections may update accordingly to support that type of constraint. An offset allows you to set a distance that that is going to be offset from the planes that are selected when you create the constraint. We'll show that in just a second. Then finally, you have different solutions. By default, you're in the mate solution, which makes the phases you select face eachother or touch eachother. A flush is the opposite of that. It makes both of those faces stay in line with one another, but they don't necessarily touch.
The best way to experience that is to try it. We're going to go ahead and zoom in just a little bit so we can see the things we need to select. We're going to start by hovering over the end of the shaft. You'll notice that an arrow is presented. It's essentially this arrow you see in this dialogue box. It's showing you the direction of the face, but while you're in the mate constraint, you also have other selection capabilities. You could select the edge of the circle to get its center, you could select the face of a cylinder to get its axis, or on any other part you could select the same edges and faces, or an axis or a center point.
So what we're going to do is left click on the end of the shaft to make our first selection. You'll see here that the first selection has turned white and is looking for a second selection. We're simply going to select this face here on the joint, and the parts move into proper position. What it's done is taken those arrows on each face and pointed them towards eachother. That caused this shaft to flip over so that that constraint could be solved. After making those selections, the parts move into position. You can also see that we've automatically been moved into the offset. Let me go ahead and zoom in a little bit so we can see this a little more clearly, and I'll rotate just a bit.
Here, if we set the offset to .5 inches, you can see it simply pushes the part that we were constraining a half inch away from the surface we've connected it to. If we backspace and enter zero again, we can simply bring that back so that the faces are touching, but this isn't exactly what we want. What we really want is this flush constraint. Again, this is just a toggle. They are opposites of eachother. So right now we're in the mate solution. If we click Flush, it simply flips the part over so these two arrows are facing in the same direction.
At any point, you can simply flip back and forth to see the results. I'm going to go ahead and click Apply. We're now ready to add another constraint to tell this shaft that it needs to reside in this hole. To do that, we're going to go to the dialogue box and return to our mate solution. Then we can hover over the face on the shaft to select its axis, and we can hover over the face inside the hole and select its axis. The parts snap into position and we are now ready to select Ok to commit those changes and exit the dialogue.
Let's go ahead and hit the Home button and look at what we've created. What we've done is essentially just taken this shaft, made it flush to this face on the joint, and linked up the axis lines through the hole in the shaft so that they're aligned with one another. Let's go ahead and repeat that process one more time. I'm going to left click and drag this joint over a little bit closer so we can see it. We're going to go ahead and right click on the graphics window and select Constraint one more time. All our settings are set up and we're ready to simply select this face and the face on the other side of this shaft.
The problem we have right now is we can't get to this without rotating. Since this is a small assembly, in most cases I'd probably just rotate and select it, but I do want to call out one feature that can come in very handy when creating constraints. That's the ability to select through the part. You'll notice when I hover over the face on the cylinder, I get the axis selected. However, I can also see the circle on the back that represents the face I want to select. If I move my mouse into that ring where I could select that circle and just pause for a moment, Inventor is going to bring up a drop down list for me.
What it's done is essentially found the position of my cursor and drilled through the entire part, and made a list of everything it hit on the way through. Right here you can see the axis, and the second option is that face. All I have to do is select number two, and you can see the part moves into position. I'm going to go ahead and flip that to a flush constraint and apply its change, and then simply hover over the center of the hole, and then change back to the mate solution, so that we can select the axis of the shaft and the axis of the hole so that they're aligned as well.
I'm going to go ahead and apply that constraint, and cancel the dialogue box and look at what we have. Right now we have this joint in the browser, which is grounded, we have the connecting rod, and we have this second joint. If we left click and drag on that second joint, you can see it still rotates. I'm going to use Ctrl Z to return it to its original position. So now we need one more constraint. We need a flush constraint between these two faces. Let's go ahead and right click and select Constraint. Switch to our flush solution. Select the face on one joint and the face on the other.
Simply selecting Ok will apply that constraint and if we left click and drag, you can see we get a no go symbol. Essentially we don't have the ability to make motion with this part because it's locked into position based on those constraints. If we take a moment and look in the browser, and expand these components, you'll see that the constraints have all been added. If you hover over any constraint, you can see the components highlight, showing what is connected. Here on this bottom one is the one we just created. You can see the two faces involved in that solution.
- Reviewing interface changes
- Projecting and importing geometry
- Working with Autodesk AnyCAD
- Understanding part modeling
- Building parts with placed features
- Working with partial chamfers