Revit add-in to load a WaveFront OBJ model and generate a DirectShape element from it.
The Building Coder provides a dedicated topic group where you can read all there is to know about the DirectShape Element.
The initial implementation and development history is documented in the article From Hack to App - OBJ Mesh Import to DirectShape.
Sample fire hydrant OBJ file:
Resulting DirectShape element in Revit model:
Input scaling factor 1 versus 0.5 happily produces a gargoyle and a half:
OBJ files defining groups generate a separate DirectShape element for each one:
After adding support for faces with more than four vertices, the sandal.obj test file is loaded successfully, albeit with some missing faces:
Switched from TessellatedShapeBuilder target Mesh to AnyGeometry generated more internal model structure from the sandal.obj test file, still with some missing faces:
Release 2015.0.0.17 improved error handling on degenerate faces:
- Progress bar
- Support for materials, minimally colour, preferably textures
- Support for the options provided by the StlImport StlImportProperties class