[Radiance-general] Revit to Radiance proof of concept

Guglielmetti, Robert Robert.Guglielmetti at nrel.gov
Thu Feb 25 08:02:43 PST 2016


Also just great to hear from you again, Schorsch!

On 2/24/16, 5:58 PM, "Greg Ward" <gregoryjward at gmail.com> wrote:

>Wow, Schorsch -- that's quite the unexpected gift!  We were just talking
>about a Revit exporter at the last Radiance workshop.  Everyone agreed it
>was a good idea, but no one really knew where to start.  Thanks for
>giving us the leg up!
>
>Cheers,
>-Greg
>
>> From: Georg Mischler <schorsch at schorsch.com>
>> Subject: [Radiance-general] Revit to Radiance proof of concept
>> Date: February 24, 2016 2:53:15 PM PST
>> 
>> Hi all,
>> 
>> I have recently had access to a Revit installation and decided to
>>experiment
>> a bit with its API. The resulting Python file is attached for anyone to
>>try.
>> I consider this a proof of concept implementation at the moment. There
>>are many
>> rough edges, and lots of features missing that would be expected in a
>>full blown
>> translator. It has been tested on the sample files supplied with Revit,
>>but not
>> on any other files.
>> 
>> I may or may not have access to Revit in the coming months, so this is
>>what
>> you get for now...
>> 
>> 
>> Technical considerations
>> 
>> Revit doesn't have the same geometry primitives as Radiance, but
>> uses B-Rep geometry in winged edge representation.
>> Surface elements don't close in on themselfes. This eliminates
>> ambiguous positioning issues for the software. For an exporter,
>> it means that eg. a cylinder is not one surface, but typically
>> composed of two half-cylinders. A circle consists of two half
>> arcs, etc.
>> Recognizing simple volume types requires analyzing and reassembling
>> several surface elements. This only seems to make sense for
>> circles/rings and cylinders (cones?) which are sufficiently easy.
>> 
>> 
>> Working features:
>> 
>> * Exports all geometry visible in the active 3D view (minus RPCs)
>> * Seperate function for exporting topography meshes.
>> * cylinders and circles/rings as Radiance primitives.
>> * Planar faces as polygons (including holes)
>> * All other surfaces tesselated into triangles (rectangles for
>>  partial cylinders.
>> * Names based on level and leaf node family name (type name for
>>  non-family types) and material
>> * Metric or imperial export (configured in code)
>> 
>> 
>> To do
>> 
>> * Turn into an external add-in
>> * Export RPCs in some way
>> * Export regions (parts of a surface using different color/material)
>> * Alternative primitive naming options (substitution lists?)
>> * Possibly split up the output into several files (eg. by level?)
>> * Detect cones (are those always coaxial in Revit?)
>> * Export unmodified (other than positioning/scaling) Family instances
>>  as seperate objects to be included via replmarks.
>> * Export (sufficiently large) meshes as Radiance meshes
>> * Export normals with curved surfaces for smoothing
>> * Export material properties in addition to the names
>> * Export light sources
>> * Export views
>> * Maybe export elements via selection instead of a complete view
>> * Dialog box to configure output interactively
>> * others?
>> 
>> 
>> Issues to research
>> 
>> * 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.
>> * Installing an export function as a macro is clumsy. There may be a
>>way to create
>>  an external installable via the Revit Python Shell.
>> 
>> 
>> Installation
>> 
>> Due to my lazyness, I created the exporter as an "Application Macro".
>> Not sure if it can be installed as an external add-on without changes
>>to the code.
>> 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 application a name, chose "Python" as a language and
>>press "Ok".
>> 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
>>two macros
>> named "ExportToRadiance" and "ExportTopoToRadiance". Select one of
>>those and
>> press "Run" (only works if the current view is a 3D-view).
>> 
>> 
>> Configuration
>> 
>> 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 (default: "revout_topo.rad" on your
>>desktop)
>> 
>> 
>> The attached jpg is from one of the Revit samples. The scene file is
>>around 50MB.
>> Ironically, just in this example, the Brown chair at left shows some
>>missing
>> faces at the front of the armrest... Not sure if this is my fault or
>>Revit's.
>> 
>> Anyone who wants to try improving and extending RRadout, just go ahead
>>and share your
>> results. Depending on the feedback, I may create a Github project.
>> 
>> 
>> Have fun!
>> 
>> -schorsch
>
>_______________________________________________
>Radiance-general mailing list
>Radiance-general at radiance-online.org
>http://www.radiance-online.org/mailman/listinfo/radiance-general




More information about the Radiance-general mailing list