en14960 0.1.7 → 0.2.0
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 +4 -4
- data/README.md +3 -3
- data/lib/en14960/calculators/anchor_calculator.rb +1 -1
- data/lib/en14960/calculators/slide_calculator.rb +21 -11
- data/lib/en14960/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bd8d12842a3b54fa5bcdd2c2386a23aac0a1c48c56ca71499355890ff213088e
|
4
|
+
data.tar.gz: 4b0b49a18dc2f69ca5543c836f7651c8f080d40bfdc42ade1542ade68dc7828c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 27854d031bda2d5d2492848f23b8ca840911ef78656f334095c4fc3d9592258178120f9fdaa302a37279e0678b20caa12eb5ff7cb58d43c5856ad4129e2e697e
|
7
|
+
data.tar.gz: 9b723fb971121fd27e4fb483196e1ae5146739b24fcbb62d23c39e724eecd2ab4bb92420f003536a2b7759310ddc83dc8be87c980b18fc24a12115424e77783b
|
data/README.md
CHANGED
@@ -63,7 +63,7 @@ puts result.breakdown
|
|
63
63
|
# ["Sides area", "5m (L) × 3m (H) = 15m²"],
|
64
64
|
# ["Front & back anchor counts", "((12.0 × 114.0 * 1.5) ÷ 1600.0 = 2"],
|
65
65
|
# ["Left & right anchor counts", "((15.0 × 114.0 * 1.5) ÷ 1600.0 = 2"],
|
66
|
-
# ["
|
66
|
+
# ["Calculated total anchors", "(2 + 2) × 2 = 8"]
|
67
67
|
# ]
|
68
68
|
```
|
69
69
|
|
@@ -140,8 +140,8 @@ You can also use the calculator modules directly:
|
|
140
140
|
```ruby
|
141
141
|
# Using AnchorCalculator directly
|
142
142
|
result = EN14960::Calculators::AnchorCalculator.calculate(
|
143
|
-
length: 10,
|
144
|
-
width: 8,
|
143
|
+
length: 10,
|
144
|
+
width: 8,
|
145
145
|
height: 4
|
146
146
|
)
|
147
147
|
|
@@ -52,7 +52,7 @@ module EN14960
|
|
52
52
|
["Sides area", "#{length}m (L) × #{height}m (H) = #{sides_area}m²"],
|
53
53
|
["Front & back anchor counts", formula_front],
|
54
54
|
["Left & right anchor counts", formula_sides],
|
55
|
-
["
|
55
|
+
["Calculated total anchors", "(#{required_front} + #{required_sides}) × 2 = #{calculated_total}"]
|
56
56
|
]
|
57
57
|
|
58
58
|
# Add minimum requirement note if applicable
|
@@ -144,23 +144,33 @@ module EN14960
|
|
144
144
|
}
|
145
145
|
when (thresholds[:basic_walls]..thresholds[:enhanced_walls])
|
146
146
|
required_height = (user_height * enhanced_multiplier).round(2)
|
147
|
-
breakdown = [
|
148
|
-
["Height range", "3.0m - 6.0m"],
|
149
|
-
["Calculation", "#{user_height}m × #{enhanced_multiplier} = #{required_height}m"],
|
150
|
-
["Alternative requirement", "Permanent roof (can replace heightened walls)"]
|
151
|
-
]
|
152
147
|
|
153
|
-
#
|
154
|
-
if
|
155
|
-
breakdown
|
148
|
+
# Skip wall height requirement message if permanent roof is present
|
149
|
+
if has_permanent_roof
|
150
|
+
breakdown = [
|
151
|
+
["Height range", "3.0m - 6.0m"],
|
152
|
+
["Wall requirement", "#{required_height}m (1.25× user height) - skipped due to permanent roof"],
|
153
|
+
["Alternative requirement", "Permanent roof (can replace heightened walls)"],
|
156
154
|
["Permanent roof", "Fitted ✓"]
|
157
|
-
|
158
|
-
|
155
|
+
]
|
156
|
+
text = "Permanent roof fitted - wall height requirement satisfied"
|
157
|
+
else
|
158
|
+
breakdown = [
|
159
|
+
["Height range", "3.0m - 6.0m"],
|
160
|
+
["Calculation", "#{user_height}m × #{enhanced_multiplier} = #{required_height}m"],
|
161
|
+
["Alternative requirement", "Permanent roof (can replace heightened walls)"]
|
162
|
+
]
|
163
|
+
|
164
|
+
# Add roof status if known
|
165
|
+
if !has_permanent_roof.nil?
|
166
|
+
breakdown << ["Permanent roof", "Not fitted ✗"]
|
159
167
|
end
|
168
|
+
|
169
|
+
text = "Walls must be at least #{required_height}m (1.25× user height)"
|
160
170
|
end
|
161
171
|
|
162
172
|
{
|
163
|
-
text:
|
173
|
+
text: text,
|
164
174
|
breakdown: breakdown
|
165
175
|
}
|
166
176
|
when (thresholds[:enhanced_walls]..thresholds[:max_safe_height])
|
data/lib/en14960/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: en14960
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chobble.com
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-08-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|