boost::optional<IdfObject> ForwardTranslator::translateDaylightingDeviceShelf( model::DaylightingDeviceShelf & modelObject ) { IdfObject idfObject(openstudio::IddObjectType::DaylightingDevice_Shelf); m_idfObjects.push_back(idfObject); idfObject.setString(DaylightingDevice_ShelfFields::Name, modelObject.name().get()); OptionalString s = modelObject.getString(OS_DaylightingDevice_ShelfFields::WindowName, false, true); if (s){ idfObject.setString(DaylightingDevice_ShelfFields::WindowName, *s); }else{ LOG(Error, "Missing required input 'Window Name' for DaylightingDevice:Shelf named '" << modelObject.name().get() << "'"); } // TODO: make sure inside shelf is converted to a surface s = modelObject.getString(OS_DaylightingDevice_ShelfFields::InsideShelfName, false, true); if (s){ idfObject.setString(DaylightingDevice_ShelfFields::InsideShelfName, *s); } s = modelObject.getString(OS_DaylightingDevice_ShelfFields::OutsideShelfName, false, true); if (s){ idfObject.setString(DaylightingDevice_ShelfFields::OutsideShelfName, *s); } // TODO: map construction from shading surface s.reset(); if (s){ idfObject.setString(DaylightingDevice_ShelfFields::OutsideShelfConstructionName, *s); } OptionalDouble d = modelObject.getDouble(OS_DaylightingDevice_ShelfFields::ViewFactortoOutsideShelf, false); if (d){ idfObject.setDouble(DaylightingDevice_ShelfFields::ViewFactortoOutsideShelf, *d); } return boost::none; }