feat(ground): pile-tip embedment check and soil layers from the ground model
- ground.ts: G04 when a pile tip is above the 연암 상면 minus 1.0 × D; G05 (info) when layers are entered but there is no 연암 row. No message while no layers are entered at all. - ground-model.ts: reads the Python soil.layers as strata rows; the project file keeps and checks them. - ② card: a button fills the layer rows from the ground model for the pier. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
16ab317094
commit
325c841733
6 files changed
+152
-5
No files matched your search
@@ -1,6 +1,6 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { buildPier } from '../src/core/geometry';
|
||||
import { validateGround } from '../src/core/ground';
|
||||
import { validateGround, validatePileEmbedment } from '../src/core/ground';
|
||||
import { changedKeys } from '../src/core/changes';
|
||||
import { COPY_ITEMS, applyCopy, planCopy } from '../src/core/copy';
|
||||
import type { Issue, PierInput } from '../src/core/types';
|
||||
@@ -103,3 +103,35 @@ describe('단면 그림 (삽도)', () => {
|
||||
expect(svg).toContain('지반고 28.931');
|
||||
});
|
||||
});
|
||||
|
||||
describe('말뚝 선단 근입 (G04·G05)', () => {
|
||||
// P1 model: pile tips at about EL 2.2 m, D 0.6096 m, so the limit is the 연암 top minus 0.6096.
|
||||
const model = buildPier(base);
|
||||
const deepest = Math.max(...model.piles.map((p) => p.bottom));
|
||||
|
||||
function embed(input: PierInput): string[] {
|
||||
const issues: Issue[] = [];
|
||||
validatePileEmbedment(input, model, issues);
|
||||
return issues.map((i) => i.code);
|
||||
}
|
||||
|
||||
it('no check and no message when no layers are entered yet', () => {
|
||||
expect(embed(withGround({}))).toEqual([]);
|
||||
});
|
||||
|
||||
it('G04: a pile tip above the 연암 top minus the embedment', () => {
|
||||
// 연암 top = the 매립토 bottom 2.5 m, so the limit is 2.5 − 0.6096 = 1.89 m, above the tips at 2.2 m.
|
||||
expect(deepest).toBeGreaterThan(2.5 - 0.6096);
|
||||
const rows = [{ name: '매립토', bottomEl: 2.5 }, { name: '연암', bottomEl: 1 }];
|
||||
expect(embed(withGround({ strataRows: rows }))).toEqual(['G04']);
|
||||
});
|
||||
|
||||
it('no G04 when the 연암 top is high enough above the tips', () => {
|
||||
const rows = [{ name: '매립토', bottomEl: 20 }, { name: '연암', bottomEl: 10 }];
|
||||
expect(embed(withGround({ strataRows: rows }))).toEqual([]);
|
||||
});
|
||||
|
||||
it('G05 (info): layers entered but no 연암 row, so the embedment is not checked', () => {
|
||||
expect(embed(withGround({ strataRows: [{ name: '풍화토', bottomEl: 20 }] }))).toEqual(['G05']);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user