Revit add-in to load a WaveFront OBJ model and generate a DirectShape element from it.
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
Jeremy Tammik, The Building Coder, Autodesk Inc.
DirectObjLoader uses the FileFormatWavefront NuGet package based on Dave Kerr's file-format-wavefront GitHub library.
This sample is licensed under the terms of the MIT License. Please see the LICENSE file for full details.