feat(view): bearing 공통 규칙 inputs (mortar h2, bearing h3, solplate T, margin) and recalculated E, L, W, T1, T2
On the bearing card, four inputs drive E = h1 + h2 + h3 + h4, L = A + margin, W = B + margin and T1/T2 = T ± L·|S|/2. The defaults are the drawing values, so every row gives back the drawing values; changed rows are marked. The values are screen state for now and do not change the model or the project file (Q16 stays open). Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
64795e0a19
commit
553c696638
4 files changed
+97
-1
No files matched your search
@@ -41,3 +41,26 @@ describe('교량받침 reference (도면값, 읽기 전용, 1단계)', () => {
|
||||
for (const d of diffs) expect(d).toBeCloseTo(0.211, 2);
|
||||
});
|
||||
});
|
||||
|
||||
import { applyBearingRules, BEARING_RULES_DEFAULT } from '../src/core/bearing-ref';
|
||||
|
||||
describe('교량받침 공통 규칙 (2단계)', () => {
|
||||
it('with the drawing values, the rules give back the drawing E, L, W, T1, T2 on every bearing', () => {
|
||||
BEARING_ELEVATION_REF.forEach((r, i) => {
|
||||
const v = applyBearingRules(r, BEARING_RULES_DEFAULT);
|
||||
expect(v.E, `No ${r.no}`).toBe(r.E);
|
||||
expect(v.L, `No ${r.no}`).toBe(SOLPLATE_REF[i].L);
|
||||
expect(v.W, `No ${r.no}`).toBe(SOLPLATE_REF[i].W);
|
||||
expect(v.T1, `No ${r.no}`).toBe(SOLPLATE_REF[i].T1);
|
||||
expect(v.T2, `No ${r.no}`).toBe(SOLPLATE_REF[i].T2);
|
||||
});
|
||||
});
|
||||
|
||||
it('a 10 mm larger mortar h2 raises E by 10 and leaves L, W and T1, T2 unchanged', () => {
|
||||
const r = BEARING_ELEVATION_REF[0];
|
||||
const v = applyBearingRules(r, { ...BEARING_RULES_DEFAULT, h2: BEARING_RULES_DEFAULT.h2 + 10 });
|
||||
expect(v.E).toBe(r.E + 10);
|
||||
expect(v.L).toBe(r.A + 100);
|
||||
expect(v.T1).toBe(SOLPLATE_REF[0].T1);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user