Skip to content

Commit 7a3c2a7

Browse files
committed
fix: copilot suggestions
1 parent 916fbb6 commit 7a3c2a7

2 files changed

Lines changed: 14 additions & 13 deletions

File tree

frontend/src/components/qualityIndex/QualityIndexCalculator.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<ul class="q-mt-xs">
3333
<li>A masonry wall in category A is very unlikely to fail;</li>
3434
<li>A masonry wall in category B may crack, but its collapse is rare;</li>
35-
<li>A masonry wall in category C will likely crack under the effect of vertical loading.</li>
35+
<li>A masonry wall in category C will likely crack under the effect of vertical loading.</li>
3636
</ul>
3737
</div>
3838
</div>
@@ -51,10 +51,10 @@
5151
]"
5252
:rows="[
5353
{ property: 'Shear strength τ₀, failure mode I', min: (0.0004 * ((IMQI ?? 0) ** 2) + 0.0055 * (IMQI ?? 0) + 0.0173).toFixed(4), r_min: '0.825', mean: (0.0006 * ((IMQI ?? 0) ** 2) + 0.0075 * (IMQI ?? 0) + 0.0224).toFixed(4), r_mean: '0.913', max: (0.0008 * ((IMQI ?? 0) ** 2) + 0.0094 * (IMQI ?? 0) + 0.0275).toFixed(4), r_max: '0.843' },
54-
{ property: 'Young\'s modulus E', min: (608 * Math.exp(0.154 * (VMQI ?? 0))).toFixed(4), r_min: '0.709', mean: (742.1 * Math.exp(0.153 * (VMQI ?? 0))).toFixed(4), r_mean: '0.720', max: (876 * Math.exp(0.151 * (VMQI ?? 0))).toFixed(4), r_max:' 0.724' },
55-
{ property: 'Compressive strength f', min: (1.055 * Math.exp(0.193 * (VMQI ?? 0))).toFixed(4), r_min: '0.803', mean: (1.444 * Math.exp(0.182 * (VMQI ?? 0))).toFixed(4), r_mean: '0.824', max: (1.892 * Math.exp(0.175 * (VMQI ?? 0))).toFixed(4), r_max:' 0.828' },
56-
{ property: 'Shear modulus G', min: (201.4 * Math.exp(0.142 * (IMQI ?? 0))).toFixed(4), r_min: '0.652', mean: (254.6 * Math.exp(0.141 * (IMQI ?? 0))).toFixed(4), r_mean: '0.680', max: (298.7 * Math.exp(0.141 * (IMQI ?? 0))).toFixed(4), r_max:' 0.695' },
57-
{ property: 'Shear strength fᵥ₀, failure mode II (stepped or zig-zag failure mode)', min: (0.03 * Math.pow((IMQI ?? 0), 0.909)).toFixed(4), r_min: '0.893', mean: (0.0475 * Math.pow((IMQI ?? 0), 0.854)).toFixed(4), r_mean: '0.928', max: (0.0654 * Math.pow((IMQI ?? 0), 0.822)).toFixed(4), r_max:' 0.918' },
54+
{ property: 'Young\'s modulus E', min: (608 * Math.exp(0.154 * (VMQI ?? 0))).toFixed(4), r_min: '0.709', mean: (742.1 * Math.exp(0.153 * (VMQI ?? 0))).toFixed(4), r_mean: '0.720', max: (876 * Math.exp(0.151 * (VMQI ?? 0))).toFixed(4), r_max: '0.724' },
55+
{ property: 'Compressive strength f', min: (1.055 * Math.exp(0.193 * (VMQI ?? 0))).toFixed(4), r_min: '0.803', mean: (1.444 * Math.exp(0.182 * (VMQI ?? 0))).toFixed(4), r_mean: '0.824', max: (1.892 * Math.exp(0.175 * (VMQI ?? 0))).toFixed(4), r_max: '0.828' },
56+
{ property: 'Shear modulus G', min: (201.4 * Math.exp(0.142 * (IMQI ?? 0))).toFixed(4), r_min: '0.652', mean: (254.6 * Math.exp(0.141 * (IMQI ?? 0))).toFixed(4), r_mean: '0.680', max: (298.7 * Math.exp(0.141 * (IMQI ?? 0))).toFixed(4), r_max: '0.695' },
57+
{ property: 'Shear strength fᵥ₀, failure mode II (stepped or zig-zag failure mode)', min: (0.03 * Math.pow((IMQI ?? 0), 0.909)).toFixed(4), r_min: '0.893', mean: (0.0475 * Math.pow((IMQI ?? 0), 0.854)).toFixed(4), r_mean: '0.928', max: (0.0654 * Math.pow((IMQI ?? 0), 0.822)).toFixed(4), r_max: '0.918' },
5858
]"
5959
row-key="property"
6060
:pagination="{ rowsPerPage: 10 }"

frontend/src/pages/LineOfMinimumTracePage.vue

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -177,14 +177,7 @@
177177
}}
178178
</div>
179179
<div>
180-
<template v-if="value.params.analysisType === 0">
181-
<strong>LMT Result (Vertical):</strong> {{ (value.result.total_length && sliceStore.sliceData.wallDimensions.height) ?
182-
(value.result.total_length / sliceStore.sliceData.wallDimensions.height).toFixed(4) : 'N/A' }}
183-
</template>
184-
<template v-else>
185-
<strong>LMT Result (Horizontal):</strong> {{ (value.result.total_length && sliceStore.sliceData.wallDimensions.length) ?
186-
(value.result.total_length / sliceStore.sliceData.wallDimensions.length).toFixed(4) : 'N/A' }}
187-
</template>
180+
<strong>LMT Result ({{ value.params.analysisType === 0 ? 'Vertical' : 'Horizontal' }}):</strong> {{ computeLMTResult(value)?.toFixed(4) ?? 'N/A' }}
188181
</div>
189182
</template>
190183
<template v-else>
@@ -234,6 +227,14 @@ function setOverlayError(str: string) {
234227
}, 5000);
235228
}
236229
230+
function computeLMTResult(trace: LineComputeTrace): number | null {
231+
if (!trace.result.total_length) return null;
232+
const divider = trace.params.analysisType === 0 ? sliceStore.sliceData.wallDimensions.height : sliceStore.sliceData.wallDimensions.length;
233+
if (!divider) return null;
234+
235+
return trace.result.total_length / divider;
236+
}
237+
237238
const lineInputCoords = ref<LineComputeInputLineCoords>({
238239
startX: 0,
239240
startY: 0,

0 commit comments

Comments
 (0)