FloorspaceJS is a new, open-source, web-based 2D floor-plan editor.

FloorspaceJS is a new JavaScript widget for 2D floorplan editing. It can run in a web browser or be embedded into a desktop application. FloorspaceJS geometry is “imported” into OpenStudio and “merged” with non-geometry BEM data.

Daniel Macumber, NREL.

The OpenStudio project began in 2006 as a direct-to-EnergyPlus plug-in for the 3D drawing tool SketchUp. SketchUp’s popularity—and the fact that it was free for commercial use—helped EnergyPlus find a footing in the industry and spurred further OpenStudio development. When Trimble Navigation acquired SketchUp and began charging for commercial use, BTO “froze” the OpenStudio SketchUp plug-in and began looking for a free and open source strategy for creating energy modeling geometry input. That strategy debuted in the recent OpenStudio 2.3.0 release.

OpenStudio application users may have noticed a new geometry tab with an embedded graphical 2D floor-plan editor. Called FloorspaceJS, this new editor was developed by Denver based web-software shop Devetry. FloorspaceJS is grid based and resembles the BEopt geometry editor and supports story-by-story floor-plan definition and extrusion. It is “aware” of spaces, thermal zones, and other energy modeling concepts. A modeler can draw on a clean sheet, or over imported floor-plan images, maps, and drawings of previous stories. She can label interior spaces, assign space types, and collect spaces into zones. She can also assign surface constructions and properties such as outdoor boundary conditions and place doors, windows, shades, and daylight sensors. Features like multi-story spaces, skylights, pitched roofs, and PV will be available in follow-on versions, allowing FloorspaceJS to support many BEM projects. Designs with more complex geometry elements like pitched walls, non-rectangular windows, or non-perpendicular shading devices, can be created in full-featured CAD or BIM geometry authoring tools and imported into OpenStudio using gbXML. The modeler can view pan, zoom, and rotate both FloorspaceJS and imported geometry in 3D using OpenStudio’s View Model Measure.

FloorspaceJS is aligned with BTO’s open-source strategy and OpenStudio’s more recent emphasis on the use of web-based technologies for portability and cross-platform support. But FloorspaceJS also represents two strategic shifts for the OpenStudio project. First, although it is embedded within the OpenStudio application, FloorspaceJS does not tightly integrate with or depend on the OpenStudio core. It is a separate widget that operates on its own JSON schema. This greatly simplifies integration with non-OpenStudio based applications and makes FloorspaceJS more broadly useful. BTO plans to use FloorspaceJS in several other applications. As always, source code is published on GitHub and the current develop build is available to try live online.  The demo build illustrates another benefit of the JSON/JavaScript-based architecture—FloorspaceJS can run standalone in a browser.

Second, FloorspaceJS transitions away from integrated geometry editing towards an “import-merge” interaction model. OpenStudio does not interact with FloorspaceJS while the modeler is editing. Instead, OpenStudio “imports” the JSON file when the modeler saves the drawing, translating it to its own internal “2.5 dimensional” geometry representation. OpenStudio uses space and zone name tags to “merge” geometry changes with its internal model without losing track of non-geometry information like schedules and HVAC systems, supporting iterative geometry editing.  OpenStudio already uses “import-merge” in gbXML, IFC, and GeoJSON based geometry workflows. Unifying “embedded” geometry editing with this path allows the OpenStudio development team to focus on a smaller, simpler set of capabilities, leaving geometry editing—especially the 3D variety—to other developers.

 “We’re excited to release FloorspaceJS as a free and open source tool”, says Dan Macumber, an engineer at NREL’s Commercial Buildings Group responsible for OpenStudio’s geometry features including maintenance of the OpenStudio SketchUp plug-in. “Offering all the features needed to define basic geometry for building energy modeling in a single, lightweight JavaScript module; FloorspaceJS enables creative new applications.  We can’t wait to see where it will be used!”

With FloorspaceJS up and running, the OpenStudio SketchUp plug-in will be deprecated over the next several releases. BTO hopes that, like its predecessor, it finds a new home.

Dr. Amir Roth
Amir Roth is the Technology Manager for BTO’s Building Energy Modeling (BEM) sub-program. He has served in that role since 2010.
more by this author