This posting isn’t about how to use the API but is an example of what can be done with the API and hopefully is useful to some of you. A big reason I’m posting it here is that I continue to get requests for the program and this will provide a better way to distribute and update it than the newsgroup.
The program came about after I visited a university a couple of years ago that is using Inventor as part of their engineering program. In one of their classes the students need to create an Inventor model to fit around a model that’s defined by an OBJ file. (OBJ and STL files are formats that define a model using a mesh of triangles.) It was difficult for them to use this data in Inventor and it seemed to me like something could be done to improve the process and it became a pet project of mine.
The Facet Enabler add-in became the result. It’s an add-in that uses client graphics and client features, plus a lot of code of my own. It allows you to read in an OBJ or STL file and see it in Inventor. What you see is just client graphics which means it’s only for display and doesn’t affect the model and can’t be used for other operations like interference checking, measure, etc. To be able to make use of the mesh data for modeling the add-in supports a command that lets you cut a section through the client graphics, which creates a sketch that can then be cleaned up and used as input for standard Inventor features.
The add-in adds two commands to Inventor. The first is added to the part environment. Its icon is the yellow pyramid as shown below (the second to the last command in the panel bar). If using the ribbon interface it is in the Add-Ins panel of the Part ribbon. When you read in the OBJ or STL data a new icon is created in the browser to represent the data. There are also several options to control how it is displayed that are accessed from the context menu, as shown below. (The “Smooth Shading” option is only available if that information existed in the OBJ file. It’s never available for STL data.)
In the sketch environment there’s one new button that’s added. It looks like a sectioned pyramid and is the last command in the panel menu below. It will create sketch geometry that represents a section cut through the faceted model as shown below. You can use the sketch geometry for standard Inventor modeling.
To install the program just download the zip file and run the install program it contains. It will run with Inventor 2009 and later.
Facet Enabler Install Download
Please let me know if you find any problems, have suggestions to improve the program, or want to be notified if there are updates. I’ll also update this blog post when I update the program.
Revisions
July 14, 2009 – Initial Post
July 23, 2009 – Posted version 1.5 which contains a fix to correctly handle line continuation characters in OBJ files.



Leave a Reply to Pet monkeys for saleCancel reply