tbd 3.4.0 → 3.4.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 55fa99f5424c92aa2e6d8d8ad36c38258ed6bf6470e83b7ddfe76484e2305e6e
4
- data.tar.gz: 4287113e3b51879461fd48b5172e4e338f76d310695932ba66a64a4d269a6908
3
+ metadata.gz: abfbf89a3f613a331c4bf58b25832bc2d9e8942a4872e73f76d534ee015eae57
4
+ data.tar.gz: a7c0be9d974075a0f7f1e2b661c5a2e2afffb3793f81b232d14a914bd79acc71
5
5
  SHA512:
6
- metadata.gz: 364663c82eb9ff346e62ce14fa53ac99d72d8e4e13aea8b36c6ad1efce5ea5a592e5bef91d640113c16f82def4a4372e6970b5befe50c320c0a4377125e91323
7
- data.tar.gz: b031ed88478b6f91b6f20285bd0c375bde08fa74bc5036aff153beb9dad485bb5eeaeec2a1deba525b2da63f14b8f8d6937183971818b23bd2012ebc94fded9a
6
+ metadata.gz: 2b685fbad6b1964db44f7afeb782cc2a59b7a4e8322ee3b14ec402cc3fc0cbe4e7a6d177cb4dc07deab1c184dd3afd0fe66b4d49f5b985c4296138b24889aa48
7
+ data.tar.gz: 1f153539250dc61b2da7f5b7badb8bcbe5e6fbdaa8ae316a20bf3b743e57bee27b3cd061b9cbf49cc867db7d9fb867f21f6fcb32252ab60fade7e1e17131ab6e
@@ -118,3 +118,19 @@ jobs:
118
118
  docker exec -t test bundle update
119
119
  docker exec -t test bundle exec rake
120
120
  docker kill test
121
+ test_380x:
122
+ runs-on: ubuntu-22.04
123
+ steps:
124
+ - name: Check out repository
125
+ uses: actions/checkout@v2
126
+ - name: Run Tests
127
+ run: |
128
+ echo $(pwd)
129
+ echo $(ls)
130
+ docker pull nrel/openstudio:3.8.0
131
+ docker run --name test --rm -d -t -v $(pwd):/work -w /work nrel/openstudio:3.8.0
132
+ docker exec -t test pwd
133
+ docker exec -t test ls
134
+ docker exec -t test bundle update
135
+ docker exec -t test bundle exec rake
136
+ docker kill test
@@ -3,8 +3,8 @@
3
3
  <schema_version>3.1</schema_version>
4
4
  <name>tbd_measure</name>
5
5
  <uid>8890787b-8c25-4dc8-8641-b6be1b6c2357</uid>
6
- <version_id>bd35a453-60b3-4329-9699-3c7e8e49b5bf</version_id>
7
- <version_modified>2024-01-01T12:58:55Z</version_modified>
6
+ <version_id>3ebf3217-230b-4420-b679-4bdf8cc51519</version_id>
7
+ <version_modified>2024-05-22T14:33:33Z</version_modified>
8
8
  <xml_checksum>99772807</xml_checksum>
9
9
  <class_name>TBDMeasure</class_name>
10
10
  <display_name>Thermal Bridging and Derating - TBD</display_name>
@@ -499,7 +499,7 @@
499
499
  <filename>geo.rb</filename>
500
500
  <filetype>rb</filetype>
501
501
  <usage_type>resource</usage_type>
502
- <checksum>1D9996A0</checksum>
502
+ <checksum>6C7ACC99</checksum>
503
503
  </file>
504
504
  <file>
505
505
  <filename>geometry.rb</filename>
@@ -517,13 +517,13 @@
517
517
  <filename>oslog.rb</filename>
518
518
  <filetype>rb</filetype>
519
519
  <usage_type>resource</usage_type>
520
- <checksum>E4978588</checksum>
520
+ <checksum>8CD57B9A</checksum>
521
521
  </file>
522
522
  <file>
523
523
  <filename>psi.rb</filename>
524
524
  <filetype>rb</filetype>
525
525
  <usage_type>resource</usage_type>
526
- <checksum>9B29CA06</checksum>
526
+ <checksum>5ABDA733</checksum>
527
527
  </file>
528
528
  <file>
529
529
  <filename>tbd.rb</filename>
@@ -541,13 +541,13 @@
541
541
  <filename>ua.rb</filename>
542
542
  <filetype>rb</filetype>
543
543
  <usage_type>resource</usage_type>
544
- <checksum>928C5E7B</checksum>
544
+ <checksum>4133AC61</checksum>
545
545
  </file>
546
546
  <file>
547
547
  <filename>utils.rb</filename>
548
548
  <filetype>rb</filetype>
549
549
  <usage_type>resource</usage_type>
550
- <checksum>7385DFE0</checksum>
550
+ <checksum>E3B4AF4B</checksum>
551
551
  </file>
552
552
  <file>
553
553
  <filename>version.rb</filename>
@@ -251,7 +251,7 @@ module TBD
251
251
  #
252
252
  # @return [Topolys::Vector3D] true normal vector of s
253
253
  # @return [nil] if invalid input (see logs)
254
- def trueNormal(s = nil, r = 0)
254
+ def truNormal(s = nil, r = 0)
255
255
  mth = "TBD::#{__callee__}"
256
256
  cl = OpenStudio::Model::PlanarSurface
257
257
  return mismatch("surface", s, cl, mth) unless s.is_a?(cl)
@@ -285,18 +285,18 @@ module TBD
285
285
  surf = {}
286
286
  subs = {}
287
287
  fd = false
288
- return invalid("#{nom}", mth, 1, FTL) if poly(surface).empty?
288
+ return invalid("#{nom}", mth, 1, ERR) if poly(surface).empty?
289
289
  return empty("#{nom} space", mth, ERR) if surface.space.empty?
290
290
 
291
291
  space = surface.space.get
292
292
  stype = space.spaceType
293
293
  story = space.buildingStory
294
294
  tr = transforms(space)
295
- return invalid("#{nom} transform", mth, 0, FTL) unless tr[:t] && tr[:r]
295
+ return invalid("#{nom} transform", mth, 0, ERR) unless tr[:t] && tr[:r]
296
296
 
297
297
  t = tr[:t]
298
- n = trueNormal(surface, tr[:r])
299
- return invalid("#{nom} normal", mth, 0, FTL) unless n
298
+ n = truNormal(surface, tr[:r])
299
+ return invalid("#{nom} normal", mth, 0, ERR) unless n
300
300
 
301
301
  type = surface.surfaceType.downcase
302
302
  facing = surface.outsideBoundaryCondition
@@ -1,6 +1,6 @@
1
1
  # BSD 3-Clause License
2
2
  #
3
- # Copyright (c) 2022-2023, Denis Bourgeois
3
+ # Copyright (c) 2022-2024, Denis Bourgeois
4
4
  # All rights reserved.
5
5
  #
6
6
  # Redistribution and use in source and binary forms, with or without
@@ -1598,14 +1598,14 @@ module TBD
1598
1598
  tr = transforms(group)
1599
1599
  t = tr[:t] if tr[:t] && tr[:r]
1600
1600
 
1601
- log(FTL, "Can't process '#{id}' transformation (#{mth})") unless t
1602
- return tbd unless t
1601
+ log(ERR, "Can't process '#{id}' transformation (#{mth})") unless t
1602
+ next unless t
1603
1603
 
1604
1604
  space = group.space
1605
1605
  tr[:r] += space.get.directionofRelativeNorth unless space.empty?
1606
- n = trueNormal(s, tr[:r])
1607
- log(FTL, "Can't process '#{id}' true normal (#{mth})") unless n
1608
- return tbd unless n
1606
+ n = truNormal(s, tr[:r])
1607
+ log(ERR, "Can't process '#{id}' true normal (#{mth})") unless n
1608
+ next unless n
1609
1609
 
1610
1610
  points = (t * s.vertices).map { |v| Topolys::Point3D.new(v.x, v.y, v.z) }
1611
1611
 
@@ -1695,14 +1695,10 @@ module TBD
1695
1695
  dx = (origin.x - terminal.x).abs
1696
1696
  dy = (origin.y - terminal.y).abs
1697
1697
  dz = (origin.z - terminal.z).abs
1698
- horizontal = dz.abs < TOL
1698
+ horizontal = dz < TOL
1699
1699
  vertical = dx < TOL && dy < TOL
1700
1700
  edge_V = terminal - origin
1701
-
1702
- if edge_V.magnitude < TOL
1703
- invalid("1x edge length < TOL", mth, 0, ERROR)
1704
- next
1705
- end
1701
+ next if edge_V.magnitude < TOL
1706
1702
 
1707
1703
  edge_plane = Topolys::Plane3D.new(origin, edge_V)
1708
1704
 
@@ -1766,10 +1762,8 @@ module TBD
1766
1762
  farthest_V = origin_point_V if farther
1767
1763
  end
1768
1764
 
1769
- angle = reference_V.angle(farthest_V)
1770
- invalid("#{id} polar angle", mth, 0, ERROR, 0) if angle.nil?
1771
- angle = 0 if angle.nil?
1772
-
1765
+ angle = reference_V.angle(farthest_V)
1766
+ angle = 0 if angle.nil?
1773
1767
  adjust = false # adjust angle [180°, 360°] if necessary
1774
1768
 
1775
1769
  if vertical
@@ -3314,9 +3308,9 @@ module TBD
3314
3308
  match2 = /files/.match(file_paths[1].to_s.strip)
3315
3309
  match = match1 || match2
3316
3310
 
3317
- if file_paths.size >= 2 && File.exists?(file_paths[1].to_s.strip) && match
3311
+ if file_paths.size >= 2 && File.exist?(file_paths[1].to_s.strip) && match
3318
3312
  out_dir = file_paths[1].to_s.strip
3319
- elsif !file_paths.empty? && File.exists?(file_paths.first.to_s.strip)
3313
+ elsif !file_paths.empty? && File.exist?(file_paths.first.to_s.strip)
3320
3314
  out_dir = file_paths.first.to_s.strip
3321
3315
  end
3322
3316
 
@@ -1000,7 +1000,7 @@ module TBD
1000
1000
  model = "* modèle : #{ua[:file]}" if ua.key?(:file) && lang == :fr
1001
1001
  model += " (v#{ua[:version]})" if ua.key?(:version)
1002
1002
  report << model unless model.empty?
1003
- report << "* TBD : v3.4.0"
1003
+ report << "* TBD : v3.4.2"
1004
1004
  report << "* date : #{ua[:date]}"
1005
1005
 
1006
1006
  if lang == :en