RRadout 0.2 - Export Geometry from Autodesk Revit to Radiance
RRadout is a Python module for Autodesk Revit,
exporting geometry data to the
lighting simulation package.
Warning: This is beta software!
(Release 0.2 has advanced from "Proof of Concept" to "Prototype" status.)
There are many (metaphorical) rough edges, and lots of features missing that
would be expected in a translator ready for production.
It has been tested on the sample files supplied with Revit, but not on any
Development and tests were done on Revit 2014, but it should work on newer
(and possibly older) releases as well.
Performance should be sufficient for most models, despite being implemented
in a bytecode-interpreted language. Most of the heavy lifting (eg. transforms) is done within Revit in C++ via the API.
RRadout 0.2 has the following capabilities:
- Export all normal geometry visible in the active view (except RPCs)
- Circular PlanarFaces as rings where possible (including coaxial hole).
- Other PlanarFaces as polygons (including holes)
- CylindricalFaces as cylinders where possible (otherwise rectangles).
- ConicalFaces as cones where possible (otherwise triangles).
- RevolvedFaces as (sequence of) cones where possible (otherwise triangles).
- All other surfaces tessellated into triangles.
- Names based on level, leaf node family name (type name for
non-family types), and material
- Export in metric or imperial units (configured in code)
- Separate function for exporting topography meshes as triangles.
- Separate function for exporting topography meshes as Wavefront
Object files for use with obj2mesh (with normals for smoothing and
UV-coordinates scaled to model units).
- Refactor into an external add-in
- Refactor into a modular system, seperating any Radiance specific code from the framework, so it may be more easily adapted to export other formats.
- Dialog box to configure output interactively
- Create a test model to systematically demonstrate that all geometry
types are exported correctly in all possible configurations and
- Alternative primitive naming options (substitution patterns)
- Possibly split up the output into several files (eg. by level)
- Export RPCs in some way
- Export partial RevolvedFaces as rectangles instead of triangles.
- Handle regions (parts of a surface using different color/material)
- Export unmodified (other than positioning/scaling) Family instances
as separate objects to be included via
- Export (sufficiently large) meshes other than topography as Wavefront
- Export normals for curved surfaces (other than obj meshes) for
- Make sure that all output surfaces are oriented the right way.
- Export material properties in addition to the names.
- Export light sources (not just lamp geometry).
- Export views.
Issues to Solve
I don't have access to a Revit installation anymore for the time beeing.
Further development of RRadout will
therefore depend on contributions from others.
If you think you can solve any of the issues mentioned here, or add one of the missing features above, please don't hesitate!
- The exporter is currently an "Application Macro", which is rather
clumsy. There seems to be a way to make it an external installable with a
ribbon menu by means of the Revit Python Shell extension, but I had no
opportunity yet to experiment with that.
- It's not always easily possible to figure out on which level a certain
element resides (assuming they are associated with a level at all).
- Small objects with fine detail may result in many zero-area polygons.
It seems that Revit may produce incorrect triangulation when the resulting
mesh is very crowded. But I had no chance yet to figure out the reasons for
this, or whether actually Revit or me are to blame.
- The primitive IDs and modifier names created by RRadout can get
extremely long and descriptive (based on Revit Level, Family/Type, and
Material names). But to maintain sufficiently practical granularity in
material assignment, there is no easy way around that.
Any third party application importing such files would be well advised to
apply some reasonable substitution into shorter and more readable names.
Maybe a separate module applying substitution rules could be created.
Note that those names currently may include non-ASCII characters, which
is not a problem for Radiance, but may still be confusing.
- In some cases, tessellating the two curve edges of a partial
CylindricalFace does not result in the same number of vertices. I haven't
isolated such an object to analyze the reason. Most likely the resulting
output is currently incorrect in this case (missing a triangle and/or
rectangles not parallel to axis).
Download RRadout 0.2
To install as a macro, select the "Manage" tab, click on "Macros".
Select the "Application" tab in the opening dialog, and press "Create Module".
Give your new module a suitable name, chose "Python" as a language and press
The SharpDevelop IDE should open with a new project containing boilerplate
code. Replace that with the contents of my file and press F8 to compile.
Now open the "Macros" dialog again, and your module will have sprouted three
Select one of those and press "Run" (this only works if the current view is a
Currently all relevant configuration happens in the code, near the top of
the file. Configuration options are:
- Metric or Imperial
- Output file name (default: "revout.rad" on your desktop)
- Output file name for topography as Radiance triangles (default: "revout_topo.rad" on your
- Output file name for topography as Wavefront Object files (default: "revout_topomesh.rad" on your desktop; one or several numbered *.obj files with same base name)
The MIT License (MIT)
Copyright (c) 2016 Georg Mischler, Munich, Germany
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE