tbd 3.4.0 → 3.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 55fa99f5424c92aa2e6d8d8ad36c38258ed6bf6470e83b7ddfe76484e2305e6e
4
- data.tar.gz: 4287113e3b51879461fd48b5172e4e338f76d310695932ba66a64a4d269a6908
3
+ metadata.gz: 4d894d405f77c1eb33517cb957ca0a9a8f87319841c983047acdb8055aa5d79c
4
+ data.tar.gz: 6788f593ac0bb66c52b81d0be2f5140dd6c4ef9c6dfb0f9df5e684bdd41c714a
5
5
  SHA512:
6
- metadata.gz: 364663c82eb9ff346e62ce14fa53ac99d72d8e4e13aea8b36c6ad1efce5ea5a592e5bef91d640113c16f82def4a4372e6970b5befe50c320c0a4377125e91323
7
- data.tar.gz: b031ed88478b6f91b6f20285bd0c375bde08fa74bc5036aff153beb9dad485bb5eeaeec2a1deba525b2da63f14b8f8d6937183971818b23bd2012ebc94fded9a
6
+ metadata.gz: 753541a1202a93df6346b8ce164679fbecdce11413d017977d62f9edb386ad0ab03e8b4b2a43be00eac01f0b0d3f45f9f4c91d9ec3db9c5e34a482a2b45a3600
7
+ data.tar.gz: 945278734bc73490690e8fdc37e0bf9fe910ea29f4eef43370234f76f3032c8f0d25cf38a648ffde44f990db39c17fcc0fc115662dc4150b4fa1b0c5df8a8776
@@ -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>4eec2792-b3ef-4152-95c8-a7dd6a6bf9c4</version_id>
7
+ <version_modified>2024-04-17T14:29:06Z</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>5ABDEC60</checksum>
527
527
  </file>
528
528
  <file>
529
529
  <filename>tbd.rb</filename>
@@ -547,7 +547,7 @@
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