lib/measures/tbd/resources/psi.rb
##
# Return OpenStudio site/space transformation & rotation; nil if unsuccessful
#
# @param [OpenStudio::Model::Model] model An OS model
# @param [OpenStudio::Model::Space or ::ShadingSurfaceGroup] group An OS group
#
# @return [OpenStudio::Transformation] Returns group/site transformation
# @return [Float] Returns site + group rotation angle [0,2PI) radians
Return OpenStudio site/space transformation & rotation; nil if unsuccessful
Return OpenStudio site / space transformation & rotation ; nil if unsuccessful
def transforms(model, group)
  gr1 = OpenStudio::Model::Space
  gr2 = OpenStudio::Model::ShadingSurfaceGroup
  unless model && group && model.is_a?(OpenStudio::Model::Model) &&
        (group.is_a?(gr1) || group.is_a?(gr2))
    TBD.log(TBD::DEBUG,
      "Invalid arguments for transformation/rotation - skipping")
    return nil, nil
  end
  t = group.siteTransformation
  r = group.directionofRelativeNorth + model.getBuilding.northAxis
  return t, r
end
def transforms ( model , group ) gr1 = OpenStudio :: Model :: Space gr2 = OpenStudio :: Model :: ShadingSurfaceGroup unless model && group && model . is_a? ( OpenStudio :: Model :: Model ) && ( group . is_a? ( gr1 ) || group . is_a? ( gr2 ) ) TBD . log ( TBD :: DEBUG , "Invalid arguments for transformation/rotation - skipping" ) return nil , nil end t = group . siteTransformation r = group . directionofRelativeNorth + model . getBuilding . northAxis return t , r end
Return OpenStudio site/space transformation & rotation; nil if unsuccessful
Return OpenStudio site / space transformation & rotation ; nil if unsuccessful
Returns group/site transformation
Returns group / site transformation
OpenStudio::Transformation
Returns site + group rotation angle [0,2PI) radians
Returns site + group rotation angle [ 0 2PI ) radians
Float
model
group
group An OS group
group An OS group