Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions lib/measures/tbd/measure.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<schema_version>3.1</schema_version>
<name>tbd_measure</name>
<uid>8890787b-8c25-4dc8-8641-b6be1b6c2357</uid>
<version_id>4934dc58-443d-436f-9358-2d221b4de65a</version_id>
<version_modified>2026-04-17T10:47:02Z</version_modified>
<version_id>51c8811e-5901-4d36-a106-9bd4e377d0bb</version_id>
<version_modified>2026-08-27T12:41:28Z</version_modified>
<xml_checksum>99772807</xml_checksum>
<class_name>TBDMeasure</class_name>
<display_name>Thermal Bridging and Derating - TBD</display_name>
Expand Down Expand Up @@ -499,7 +499,7 @@
<filename>geo.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>AD9546E1</checksum>
<checksum>16067F9B</checksum>
</file>
<file>
<filename>geometry.rb</filename>
Expand All @@ -523,7 +523,7 @@
<filename>psi.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>9F7B97ED</checksum>
<checksum>7AE7FE72</checksum>
</file>
<file>
<filename>tbd.rb</filename>
Expand All @@ -541,13 +541,13 @@
<filename>ua.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>0FB3F654</checksum>
<checksum>666C0F59</checksum>
</file>
<file>
<filename>utils.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>26EC8C4F</checksum>
<checksum>61243A64</checksum>
</file>
<file>
<filename>version.rb</filename>
Expand Down
11 changes: 5 additions & 6 deletions lib/measures/tbd/resources/geo.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ def matches?(e1 = {}, e2 = {}, tol = TOL)
a = false
return mismatch("e1", e1, Hash, mth, DBG, a) unless e1.is_a?(Hash)
return mismatch("e2", e2, Hash, mth, DBG, a) unless e2.is_a?(Hash)
return mismatch("e2", e2, Hash, mth, DBG, a) unless e2.is_a?(Hash)

return hashkey("e1", e1, :v0, mth, DBG, a) unless e1.key?(:v0)
return hashkey("e1", e1, :v1, mth, DBG, a) unless e1.key?(:v1)
Expand Down Expand Up @@ -644,8 +643,8 @@ def concave?(s1 = nil, s2 = nil)

valid1 = s1[:angle].is_a?(Numeric)
valid2 = s2[:angle].is_a?(Numeric)
return mismatch("s1 angle", s1[:angle], Numeric, DBG, false) unless valid1
return mismatch("s1 angle", s1[:angle], Numeric, DBG, false) unless valid2
return mismatch("s1 angle", s1[:angle], Numeric, mth, DBG, false) unless valid1
return mismatch("s2 angle", s2[:angle], Numeric, mth, DBG, false) unless valid2

angle = 0
angle = s2[:angle] - s1[:angle] if s2[:angle] > s1[:angle]
Expand Down Expand Up @@ -687,8 +686,8 @@ def convex?(s1 = nil, s2 = nil)

valid1 = s1[:angle].is_a?(Numeric)
valid2 = s2[:angle].is_a?(Numeric)
return mismatch("s1 angle", s1[:angle], Numeric, DBG, false) unless valid1
return mismatch("s1 angle", s1[:angle], Numeric, DBG, false) unless valid2
return mismatch("s1 angle", s1[:angle], Numeric, mth, DBG, false) unless valid1
return mismatch("s2 angle", s2[:angle], Numeric, mth, DBG, false) unless valid2

angle = 0
angle = s2[:angle] - s1[:angle] if s2[:angle] > s1[:angle]
Expand Down Expand Up @@ -761,8 +760,8 @@ def resetKIVA(model = nil, boundary = "Foundation")
# boundary conditions.
#
# @param model [OpenStudio::Model::Model] a model
# @param floors [Hash] TBD floors
# @param walls [Hash] TBD walls
# @param floors [Hash] TBD floors
# @param edges [Hash] TBD edges (many linking floors & walls
#
# @return [Bool] true if Kiva foundations are successfully generated
Expand Down
28 changes: 14 additions & 14 deletions lib/measures/tbd/resources/psi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ def gen(id = "")
h[:partyconcave ] = @set[id].key?(:partyconcave)
h[:partyconvex ] = @set[id].key?(:partyconvex)
h[:parapet ] = @set[id].key?(:parapet)
h[:partyconcave ] = @set[id].key?(:parapetconcave)
h[:parapetconcave ] = @set[id].key?(:parapetconcave)
h[:parapetconvex ] = @set[id].key?(:parapetconvex)
h[:roof ] = @set[id].key?(:roof)
h[:roofconcave ] = @set[id].key?(:roofconcave)
Expand All @@ -557,10 +557,10 @@ def gen(id = "")
h[:balconyconcave ] = @set[id].key?(:balconyconcave)
h[:balconyconvex ] = @set[id].key?(:balconyconvex)
h[:balconysill ] = @set[id].key?(:balconysill)
h[:balconysillconcave ] = @set[id].key?(:balconysillconvex)
h[:balconysillconcave ] = @set[id].key?(:balconysillconcave)
h[:balconysillconvex ] = @set[id].key?(:balconysillconvex)
h[:balconydoorsill ] = @set[id].key?(:balconydoorsill)
h[:balconydoorsillconcave] = @set[id].key?(:balconydoorsillconvex)
h[:balconydoorsillconcave] = @set[id].key?(:balconydoorsillconcave)
h[:balconydoorsillconvex ] = @set[id].key?(:balconydoorsillconvex)
h[:rimjoist ] = @set[id].key?(:rimjoist)
h[:rimjoistconcave ] = @set[id].key?(:rimjoistconcave)
Expand All @@ -572,10 +572,10 @@ def gen(id = "")
v[:head ] = 0; v[:headconcave ] = 0; v[:headconvex ] = 0
v[:sill ] = 0; v[:sillconcave ] = 0; v[:sillconvex ] = 0
v[:jamb ] = 0; v[:jambconcave ] = 0; v[:jambconvex ] = 0
v[:doorhead ] = 0; v[:doorheadconcave ] = 0; v[:doorconvex ] = 0
v[:doorhead ] = 0; v[:doorheadconcave ] = 0; v[:doorheadconvex ] = 0
v[:doorsill ] = 0; v[:doorsillconcave ] = 0; v[:doorsillconvex ] = 0
v[:doorjamb ] = 0; v[:doorjambconcave ] = 0; v[:doorjambconvex ] = 0
v[:skylighthead ] = 0; v[:skylightheadconcave ] = 0; v[:skylightconvex ] = 0
v[:skylighthead ] = 0; v[:skylightheadconcave ] = 0; v[:skylightheadconvex ] = 0
v[:skylightsill ] = 0; v[:skylightsillconcave ] = 0; v[:skylightsillconvex ] = 0
v[:skylightjamb ] = 0; v[:skylightjambconcave ] = 0; v[:skylightjambconvex ] = 0
v[:spandrel ] = 0; v[:spandrelconcave ] = 0; v[:spandrelconvex ] = 0
Expand Down Expand Up @@ -712,7 +712,7 @@ def gen(id = "")
v[:roofconcave ] = @set[id][:parapet ] if h[:parapet ]
v[:roofconvex ] = @set[id][:parapet ] if h[:parapet ]
v[:roofconcave ] = @set[id][:parapetconcave ] if h[:parapetconcave ]
v[:roofconvex ] = @set[id][:parapetxonvex ] if h[:parapetconvex ]
v[:roofconvex ] = @set[id][:parapetconvex ] if h[:parapetconvex ]
v[:roof ] = @set[id][:roof ] if h[:roof ]
v[:roofconcave ] = @set[id][:roof ] if h[:roof ]
v[:roofconvex ] = @set[id][:roof ] if h[:roof ]
Expand Down Expand Up @@ -758,12 +758,12 @@ def gen(id = "")
v[:balconysillconcave ] = @set[id][:balcony ] if h[:balcony ]
v[:balconysillconvex ] = @set[id][:balcony ] if h[:balcony ]
v[:balconysillconcave ] = @set[id][:balconyconcave ] if h[:balconyconcave ]
v[:balconysillconvex ] = @set[id][:balconyconvex ] if h[:balconycinvex ]
v[:balconysillconvex ] = @set[id][:balconyconvex ] if h[:balconyconvex ]
v[:balconydoorsill ] = @set[id][:balcony ] if h[:balcony ]
v[:balconydoorsillconcave] = @set[id][:balcony ] if h[:balcony ]
v[:balconydoorsillconvex ] = @set[id][:balcony ] if h[:balcony ]
v[:balconydoorsillconcave] = @set[id][:balconyconcave ] if h[:balconyconcave ]
v[:balconydoorsillconvex ] = @set[id][:balconyconvex ] if h[:balconycinvex ]
v[:balconydoorsillconvex ] = @set[id][:balconyconvex ] if h[:balconyconvex ]
v[:balconysill ] = @set[id][:balconysill ] if h[:balconysill ]
v[:balconysillconcave ] = @set[id][:balconysill ] if h[:balconysill ]
v[:balconysillconvex ] = @set[id][:balconysill ] if h[:balconysill ]
Expand All @@ -786,10 +786,10 @@ def gen(id = "")
v[:rimjoistconvex ] = @set[id][:rimjoistconvex ] if h[:rimjoistconvex ]

max = [v[:parapetconcave], v[:parapetconvex]].max
v[:parapet] = max unless @has[:parapet]
v[:parapet] = max unless h[:parapet]

max = [v[:roofconcave], v[:roofconvex]].max
v[:roof] = max unless @has[:roof]
v[:roof] = max unless h[:roof]

@val[id] = v

Expand Down Expand Up @@ -982,7 +982,7 @@ def shorthands(id = "")
mth = "TBD::#{__callee__}"
sh = { has: {}, val: {} }
id = trim(id)
return mismatch("set ID", id, String, mth, ERR, a) if id.empty?
return mismatch("set ID", id, String, mth, ERR, sh) if id.empty?
return hashkey(id, @set , id, mth, ERR, sh) unless @set.key?(id)
return hashkey(id, @has , id, mth, ERR, sh) unless @has.key?(id)
return hashkey(id, @val , id, mth, ERR, sh) unless @val.key?(id)
Expand Down Expand Up @@ -1736,9 +1736,9 @@ def process(model = nil, argh = {})
next unless point_V_mag > TOL
next unless point_V_mag > farthest_mag

farthest = point
farthest_V = origin_point_V
fathest_mag = point_V_mag
farthest = point
farthest_V = origin_point_V
farthest_mag = point_V_mag
end

angle = reference_V.angle(farthest_V)
Expand Down
2 changes: 1 addition & 1 deletion lib/measures/tbd/resources/ua.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1002,7 +1002,7 @@ def ua_md(ua = {}, lang = :en)
model = "* modèle : #{ua[:file]}" if ua.key?(:file) && lang == :fr
model += " (v#{ua[:version]})" if ua.key?(:version)
report << model unless model.empty?
report << "* TBD : v3.6.0"
report << "* TBD : v3.6.1"
report << "* date : #{ua[:date]}"

if lang == :en
Expand Down
10 changes: 5 additions & 5 deletions lib/measures/tbd/resources/utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,8 @@ module OSut
# returned if a valid surface tilt [0, PI] is provided. Otherwise, generic
# tilt-independent air film resistances are returned instead.
#
# @param [:to_sym] surface type, e.g. :roof, :wall, :partition, :ceiling
# @param [Numeric] surface tilt (in rad), optional
# @param type [:to_sym] surface type, e.g. :roof, :wall, :partition, :ceiling
# @param tilt [Numeric] surface tilt (in rad), optional
#
# @return [Float] surface air film resistance(s)
# @return [0.0] if invalid input (see logs)
Expand Down Expand Up @@ -587,7 +587,7 @@ def resetUo(lc = nil, film = nil, index = nil, uo = nil, uniq = false)
mt.setName(id)

unless mt.setThermalResistance(r)
return invalid("Failed #{id}: RSi#{r.round(2)}", mth)
return invalid("Failed #{id}: RSi#{r.round(2)}", mth, 0, DBG, 0.0)
end

lc.setLayer(index, mt)
Expand Down Expand Up @@ -621,11 +621,11 @@ def resetUo(lc = nil, film = nil, index = nil, uo = nil, uniq = false)
mt.setName(id)

unless mt.setThermalConductivity(k)
return invalid("Failed #{id}: K#{k.round(3)}", mth)
return invalid("Failed #{id}: K#{k.round(3)}", mth, 0, DBG, 0.0)
end

unless mt.setThickness(d)
return invalid("Failed #{id}: #{(d*1000).to_i}mm", mth)
return invalid("Failed #{id}: #{(d*1000).to_i}mm", mth, 0, DBG, 0.0)
end

lc.setLayer(index, mt)
Expand Down
11 changes: 5 additions & 6 deletions lib/tbd/geo.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ def matches?(e1 = {}, e2 = {}, tol = TOL)
a = false
return mismatch("e1", e1, Hash, mth, DBG, a) unless e1.is_a?(Hash)
return mismatch("e2", e2, Hash, mth, DBG, a) unless e2.is_a?(Hash)
return mismatch("e2", e2, Hash, mth, DBG, a) unless e2.is_a?(Hash)

return hashkey("e1", e1, :v0, mth, DBG, a) unless e1.key?(:v0)
return hashkey("e1", e1, :v1, mth, DBG, a) unless e1.key?(:v1)
Expand Down Expand Up @@ -644,8 +643,8 @@ def concave?(s1 = nil, s2 = nil)

valid1 = s1[:angle].is_a?(Numeric)
valid2 = s2[:angle].is_a?(Numeric)
return mismatch("s1 angle", s1[:angle], Numeric, DBG, false) unless valid1
return mismatch("s1 angle", s1[:angle], Numeric, DBG, false) unless valid2
return mismatch("s1 angle", s1[:angle], Numeric, mth, DBG, false) unless valid1
return mismatch("s2 angle", s2[:angle], Numeric, mth, DBG, false) unless valid2

angle = 0
angle = s2[:angle] - s1[:angle] if s2[:angle] > s1[:angle]
Expand Down Expand Up @@ -687,8 +686,8 @@ def convex?(s1 = nil, s2 = nil)

valid1 = s1[:angle].is_a?(Numeric)
valid2 = s2[:angle].is_a?(Numeric)
return mismatch("s1 angle", s1[:angle], Numeric, DBG, false) unless valid1
return mismatch("s1 angle", s1[:angle], Numeric, DBG, false) unless valid2
return mismatch("s1 angle", s1[:angle], Numeric, mth, DBG, false) unless valid1
return mismatch("s2 angle", s2[:angle], Numeric, mth, DBG, false) unless valid2

angle = 0
angle = s2[:angle] - s1[:angle] if s2[:angle] > s1[:angle]
Expand Down Expand Up @@ -761,8 +760,8 @@ def resetKIVA(model = nil, boundary = "Foundation")
# boundary conditions.
#
# @param model [OpenStudio::Model::Model] a model
# @param floors [Hash] TBD floors
# @param walls [Hash] TBD walls
# @param floors [Hash] TBD floors
# @param edges [Hash] TBD edges (many linking floors & walls
#
# @return [Bool] true if Kiva foundations are successfully generated
Expand Down
28 changes: 14 additions & 14 deletions lib/tbd/psi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ def gen(id = "")
h[:partyconcave ] = @set[id].key?(:partyconcave)
h[:partyconvex ] = @set[id].key?(:partyconvex)
h[:parapet ] = @set[id].key?(:parapet)
h[:partyconcave ] = @set[id].key?(:parapetconcave)
h[:parapetconcave ] = @set[id].key?(:parapetconcave)
h[:parapetconvex ] = @set[id].key?(:parapetconvex)
h[:roof ] = @set[id].key?(:roof)
h[:roofconcave ] = @set[id].key?(:roofconcave)
Expand All @@ -557,10 +557,10 @@ def gen(id = "")
h[:balconyconcave ] = @set[id].key?(:balconyconcave)
h[:balconyconvex ] = @set[id].key?(:balconyconvex)
h[:balconysill ] = @set[id].key?(:balconysill)
h[:balconysillconcave ] = @set[id].key?(:balconysillconvex)
h[:balconysillconcave ] = @set[id].key?(:balconysillconcave)
h[:balconysillconvex ] = @set[id].key?(:balconysillconvex)
h[:balconydoorsill ] = @set[id].key?(:balconydoorsill)
h[:balconydoorsillconcave] = @set[id].key?(:balconydoorsillconvex)
h[:balconydoorsillconcave] = @set[id].key?(:balconydoorsillconcave)
h[:balconydoorsillconvex ] = @set[id].key?(:balconydoorsillconvex)
h[:rimjoist ] = @set[id].key?(:rimjoist)
h[:rimjoistconcave ] = @set[id].key?(:rimjoistconcave)
Expand All @@ -572,10 +572,10 @@ def gen(id = "")
v[:head ] = 0; v[:headconcave ] = 0; v[:headconvex ] = 0
v[:sill ] = 0; v[:sillconcave ] = 0; v[:sillconvex ] = 0
v[:jamb ] = 0; v[:jambconcave ] = 0; v[:jambconvex ] = 0
v[:doorhead ] = 0; v[:doorheadconcave ] = 0; v[:doorconvex ] = 0
v[:doorhead ] = 0; v[:doorheadconcave ] = 0; v[:doorheadconvex ] = 0
v[:doorsill ] = 0; v[:doorsillconcave ] = 0; v[:doorsillconvex ] = 0
v[:doorjamb ] = 0; v[:doorjambconcave ] = 0; v[:doorjambconvex ] = 0
v[:skylighthead ] = 0; v[:skylightheadconcave ] = 0; v[:skylightconvex ] = 0
v[:skylighthead ] = 0; v[:skylightheadconcave ] = 0; v[:skylightheadconvex ] = 0
v[:skylightsill ] = 0; v[:skylightsillconcave ] = 0; v[:skylightsillconvex ] = 0
v[:skylightjamb ] = 0; v[:skylightjambconcave ] = 0; v[:skylightjambconvex ] = 0
v[:spandrel ] = 0; v[:spandrelconcave ] = 0; v[:spandrelconvex ] = 0
Expand Down Expand Up @@ -712,7 +712,7 @@ def gen(id = "")
v[:roofconcave ] = @set[id][:parapet ] if h[:parapet ]
v[:roofconvex ] = @set[id][:parapet ] if h[:parapet ]
v[:roofconcave ] = @set[id][:parapetconcave ] if h[:parapetconcave ]
v[:roofconvex ] = @set[id][:parapetxonvex ] if h[:parapetconvex ]
v[:roofconvex ] = @set[id][:parapetconvex ] if h[:parapetconvex ]
v[:roof ] = @set[id][:roof ] if h[:roof ]
v[:roofconcave ] = @set[id][:roof ] if h[:roof ]
v[:roofconvex ] = @set[id][:roof ] if h[:roof ]
Expand Down Expand Up @@ -758,12 +758,12 @@ def gen(id = "")
v[:balconysillconcave ] = @set[id][:balcony ] if h[:balcony ]
v[:balconysillconvex ] = @set[id][:balcony ] if h[:balcony ]
v[:balconysillconcave ] = @set[id][:balconyconcave ] if h[:balconyconcave ]
v[:balconysillconvex ] = @set[id][:balconyconvex ] if h[:balconycinvex ]
v[:balconysillconvex ] = @set[id][:balconyconvex ] if h[:balconyconvex ]
v[:balconydoorsill ] = @set[id][:balcony ] if h[:balcony ]
v[:balconydoorsillconcave] = @set[id][:balcony ] if h[:balcony ]
v[:balconydoorsillconvex ] = @set[id][:balcony ] if h[:balcony ]
v[:balconydoorsillconcave] = @set[id][:balconyconcave ] if h[:balconyconcave ]
v[:balconydoorsillconvex ] = @set[id][:balconyconvex ] if h[:balconycinvex ]
v[:balconydoorsillconvex ] = @set[id][:balconyconvex ] if h[:balconyconvex ]
v[:balconysill ] = @set[id][:balconysill ] if h[:balconysill ]
v[:balconysillconcave ] = @set[id][:balconysill ] if h[:balconysill ]
v[:balconysillconvex ] = @set[id][:balconysill ] if h[:balconysill ]
Expand All @@ -786,10 +786,10 @@ def gen(id = "")
v[:rimjoistconvex ] = @set[id][:rimjoistconvex ] if h[:rimjoistconvex ]

max = [v[:parapetconcave], v[:parapetconvex]].max
v[:parapet] = max unless @has[:parapet]
v[:parapet] = max unless h[:parapet]

max = [v[:roofconcave], v[:roofconvex]].max
v[:roof] = max unless @has[:roof]
v[:roof] = max unless h[:roof]

@val[id] = v

Expand Down Expand Up @@ -982,7 +982,7 @@ def shorthands(id = "")
mth = "TBD::#{__callee__}"
sh = { has: {}, val: {} }
id = trim(id)
return mismatch("set ID", id, String, mth, ERR, a) if id.empty?
return mismatch("set ID", id, String, mth, ERR, sh) if id.empty?
return hashkey(id, @set , id, mth, ERR, sh) unless @set.key?(id)
return hashkey(id, @has , id, mth, ERR, sh) unless @has.key?(id)
return hashkey(id, @val , id, mth, ERR, sh) unless @val.key?(id)
Expand Down Expand Up @@ -1736,9 +1736,9 @@ def process(model = nil, argh = {})
next unless point_V_mag > TOL
next unless point_V_mag > farthest_mag

farthest = point
farthest_V = origin_point_V
fathest_mag = point_V_mag
farthest = point
farthest_V = origin_point_V
farthest_mag = point_V_mag
end

angle = reference_V.angle(farthest_V)
Expand Down
2 changes: 1 addition & 1 deletion lib/tbd/ua.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1002,7 +1002,7 @@ def ua_md(ua = {}, lang = :en)
model = "* modèle : #{ua[:file]}" if ua.key?(:file) && lang == :fr
model += " (v#{ua[:version]})" if ua.key?(:version)
report << model unless model.empty?
report << "* TBD : v3.6.0"
report << "* TBD : v3.6.1"

@brgix brgix Aug 27, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug description from Claude:

ua_md hard-codes "* TBD : v3.6.0" while ua_summary uses the passed-in SDK :version; two independent version sources.

Claude appears to be confounding:

  • the TBD gem version (now v3.6.1)
  • the OpenStudio SDK/CLI version

... they're totally unrelated.

report << "* date : #{ua[:date]}"

if lang == :en
Expand Down
2 changes: 1 addition & 1 deletion lib/tbd/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@
# SOFTWARE.

module TBD
VERSION = "3.6.0".freeze
VERSION = "3.6.1".freeze
end
Loading