refactor(abut): 벽체·흉벽 카드의 삽도 삭제
- 형상 카드의 삽도 SVG 표시를 제거하고, 삽도 모듈(src/view/abut-section-svg.ts)과 테스트를 삭제 - 입력 격자, 구간 표, 확인 필요 노트는 그대로 둠 - 테스트 637건 통과, 타입 검사·빌드 통과. 브라우저 시각 확인은 미실시 Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
842d372312
commit
e1f85e5d86
4 files changed
+2
-103
No files matched your search
@@ -1,51 +0,0 @@
|
||||
import { type AbutShape, type ResolvedShape } from '../core/abut/shape';
|
||||
|
||||
/** EL values (m) the drawing names as read-only labels; they come from the record, not from this card. */
|
||||
export interface AbutLevels {
|
||||
seatEl: number;
|
||||
footingBottomEl: number;
|
||||
groundEl: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 벽체·흉벽 개략 단면 (시안 ② 삽도). Not to scale: the heights are fixed for legibility,
|
||||
* and the labels show the card's values in mm, so the numbers the user types are what the drawing names.
|
||||
* t runs along the 교대 직각 방향 (배면 −, 전면 +); the 교대축 is t = 0.
|
||||
*/
|
||||
export function abutSectionSvg(r: ResolvedShape, v: AbutShape, levels?: AbutLevels): string {
|
||||
const S = 100; // px per m
|
||||
const YMAX = 4.6; // highest drawn height (m above the footing bottom)
|
||||
const tMin = r.footingBackM - 0.4;
|
||||
const tMax = r.footingFrontM + 0.6;
|
||||
const W = (tMax - tMin) * S;
|
||||
const H = (YMAX + 0.8) * S;
|
||||
const X = (t: number) => (t - tMin) * S;
|
||||
const Y = (h: number) => (YMAX - h) * S;
|
||||
const fT = r.footingThicknessM;
|
||||
const wallTop = fT + 2.0; // illustrative wall height
|
||||
const parapetTop = wallTop + 0.9; // illustrative parapet height
|
||||
const rect = (t0: number, t1: number, h0: number, h1: number, cls: string) =>
|
||||
`<rect class="${cls}" x="${X(t0)}" y="${Y(h1)}" width="${(t1 - t0) * S}" height="${(h1 - h0) * S}"/>`;
|
||||
const text = (x: number, y: number, s: string, anchor = 'start') =>
|
||||
`<text x="${x}" y="${y}" text-anchor="${anchor}">${s}</text>`;
|
||||
const wallMid = (r.wallBackM + r.wallFrontM) / 2;
|
||||
return [
|
||||
`<svg viewBox="0 0 ${W} ${H}" width="100%" role="img" aria-label="벽체·흉벽 개략 단면 (축척 아님)">`,
|
||||
rect(r.footingBackM, r.footingFrontM, 0, fT, 'abut-footing'),
|
||||
rect(r.wallBackM, r.wallFrontM, fT, wallTop, 'abut-wall'),
|
||||
rect(r.parapetBackM, 0, wallTop, parapetTop, 'abut-parapet'),
|
||||
text(4, Y(wallTop + 0.45), `흉벽 높이 ${v.parapetHeightMm}`),
|
||||
text(X(r.parapetBackM) - 4, Y(parapetTop + 0.2), `흉벽 두께 ${v.parapetThicknessMm}`, 'start'),
|
||||
text(X(wallMid), Y(fT + 1.0), `벽체 두께 ${v.wallThicknessMm}`, 'middle'),
|
||||
text(X(r.wallFrontM) + 6, Y(wallTop - 0.3), `벽체 전면 ${v.wallFrontMm}`),
|
||||
text(X(r.wallFrontM) + 6, Y(wallTop - 0.8), `브라켓 높이 ${v.bracketHeightMm}`),
|
||||
text(X(r.wallFrontM) + 6, Y(fT + 0.4), `수축줄눈 ${v.shrinkJointCount}개`),
|
||||
text(4, Y(fT / 2) + 4, `저판 두께 ${v.footingThicknessMm}`),
|
||||
text(X(r.footingBackM), Y(0) + 18, `저판 뒷굽 ${v.footingBackMm}`),
|
||||
text(X(r.footingFrontM), Y(0) + 18, `저판 앞굽 ${v.footingFrontMm}`, 'end'),
|
||||
levels ? text(4, H - 44, `교좌면 ${levels.seatEl.toFixed(3)} · 기초 하단 ${levels.footingBottomEl.toFixed(3)} · 지반고 ${levels.groundEl.toFixed(3)} m`, 'start') : '',
|
||||
text(4, H - 22, '개략 도시 · 축척 아님', 'start'),
|
||||
text(4, H - 6, `흉벽 상단 Level 좌 ${v.parapetLevelLeftMm} · 우 ${v.parapetLevelRightMm} (계산 미사용, QA-4)`, 'start'),
|
||||
'</svg>',
|
||||
].join('');
|
||||
}
|
||||
Reference in new issue
Block a user