Thursday, September 5, 2019

Inventor: From STEP file to Parametric Model

I have been using Inventor for over 13 years now.  In the early days, when you would import a STEP file, you were mostly stuck with the geometry of the model.  You could edit the model by adding features, but something like moving a hole was not a simple process.

Several years ago, Autodesk added Direct Editing to Inventor, which gave users the ability to edit STEP files, and other imported models.  Direct Editing has given users the ability to move faces, change the diameter of holes, scale the model, rotate features, and delete faces.  An added benefit is that any entered values for these changes become parameters.  So if we use these tools just right, we can take an imported model and make it parametric.

I have explained how to do this in classes for years, so I decided I should write a blog post about it.  Before I make a video or write a post,  I will typically test out the workflow to make sure I don't have any issues.  While testing this workflow, I was slightly surprised by an issue.  I discovered that if the entered parameter values don't change the model, compared to the original imported model, the Direct Edit feature will error.  For example, if the original STEP model is two inches long, and I edit the Direct Edit parameter so the model is two inches long, I will get a model error.  Once I discovered why I was getting the error, I realized that I could just suppress the Direct Edit feature when the parameter changed the model back to the original size.

There are two ways to suppress a feature depending on a parameter value, iLogic and Feature Properties.  I have done plenty of blogs and videos showing how to work with iLogic, so I wanted to use Feature Properties in this case.  I also find that most Inventor users either don't know about Feature Properties or they forgot that they exist.

You can access a feature's properties by right-clicking on the feature. 


The Feature Properties dialog box will allow you to suppress the feature, or conditionally suppress the feature, depending on the value of any parameter.


So how can we apply these to make a parametric part from a STEP file?  We can create Direct Edit features that change the size of the model and use feature properties to suppress the Direct Edit feature if the feature is returned to its original size.

In my sample, I can create a Direct Edit feature that adjusts the length of the part.  If I use the "Measure From" option and the face on the opposite end of the part, the entered value will be the length of the part. 


The entered length automatically becomes a parameter.  Parameters are automatically named d0, d1, d2, and so on.  It is up to the user if they want to give the parameter a descriptive name.  I like to do that because it makes editing them easier.  Since I can name a parameter "Length," I don't have to remember which parameter controls the length of the part.  Renaming a parameter is easy.  All you have to do is open the Parameter dialog box and edit the name field for the parameter.  See the image below.


The last step in the process will be to edit the properties of the Direct Edit feature to enable a conditional suppression.  In the sample shown, the Direct Edit feature will be suppressed if the Length parameter is equal to 2 inches.


I do have a few pieces of advice when applying this technique.  First, you can put more than one operation, or change, in every Direct Edit feature.  I would not do this because the suppression will control the entire feature, not individual operations in each feature.  Secondly, I gave the Direct Edit features descriptive names, I find it makes the model easier to work with and easier to identify what the direct edit controls.  Thirdly, every time we use the Feature Properties to conditionally suppress a feature, Inventor creates another parameter for that value as well.  This can make it hard to find the driving parameters in the Parameter dialog.  Creating an iLogic form of the driving parameters can solve this problem.  The image below shows the iLogic Form I created in this example.  If you like this approach there is plenty of help documents that will explain how to create a form. 


If you would like to see a demonstration of this technique, please watch the video below. 




So even though an imported STEP file has no features at all, we can use Direct Edit to change the model.  Then if you apply those tools in a very specific way, we can turn that STEP file into a parametric model.





No comments:

Post a Comment