Merge remote-tracking branch 'origin/main_laptop_1' into main_desktop_1
This commit is contained in:
@@ -216,8 +216,10 @@ const PAIR_LABELS = ["단면적", "입 적"];
|
||||
|
||||
const flatColumns = (): Column[] => GROUPS.flatMap((g) => g.sub.flatMap((s) => s.cols));
|
||||
|
||||
/** 측점 표기 — `20` → `NO.1`, `25` → `NO.1+5`. 실무 토적표가 이 모양이다. */
|
||||
function stationLabel(chainage: number, interval = 20): string {
|
||||
/** 측점 표기 — `20` → `NO.1`, `25` → `NO.1+5`. 실무 토적표가 이 모양이다.
|
||||
* 구조물 원단위 표도 같은 표기를 쓰므로 **한 벌로 두고 내보낸다**(2026-09-09) —
|
||||
* 두 벌이면 같은 측점이 화면 두 곳에서 다르게 적힌다. */
|
||||
export function stationLabel(chainage: number, interval = 20): string {
|
||||
const no = Math.floor(chainage / interval);
|
||||
const plus = chainage - no * interval;
|
||||
const rounded = Math.round(plus * 100) / 100;
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
* ⚠ 반올림은 여기서만 한다(PLAN 8-16 표기 자리 ≠ 계산 자리). 서버가 준 값은 전정밀이다.
|
||||
* ========================================================================== */
|
||||
|
||||
import { stationLabel } from "./B08_Quantity_UI_EarthworkGrid";
|
||||
|
||||
export interface MaterialRow {
|
||||
name: string;
|
||||
unit: string;
|
||||
@@ -45,6 +47,10 @@ export interface UnitQuantityStructure {
|
||||
name: string;
|
||||
length_m: number;
|
||||
height_m: number;
|
||||
/** 구조물이 덮는 구간(m) — 표기(`NO.4 ~ NO.4+10`)는 화면 몫이다
|
||||
* (`B08_Quantity_Engine_Handoff_Rows_Prep.py:182` 「표기는 만들지 않는다」). */
|
||||
start_m?: number | null;
|
||||
end_m?: number | null;
|
||||
notes: string[];
|
||||
components: {
|
||||
name: string;
|
||||
@@ -97,6 +103,12 @@ export interface MaterialResponse {
|
||||
}[];
|
||||
}
|
||||
|
||||
/** 구조물이 덮는 구간을 실무 표기로 — 값이 없으면 빈 문자열(지어내지 않는다). */
|
||||
function stationRange(startM?: number | null, endM?: number | null): string {
|
||||
if (typeof startM !== "number" || typeof endM !== "number") return "";
|
||||
return startM === endM ? stationLabel(startM) : `${stationLabel(startM)} ~ ${stationLabel(endM)}`;
|
||||
}
|
||||
|
||||
/** 거푸집·동바리 안내에 쓰는 값. */
|
||||
export interface FormworkInfo {
|
||||
formwork_notes?: string[];
|
||||
@@ -420,7 +432,12 @@ export function renderUnitQuantityGrid(response: MaterialResponse): HTMLElement
|
||||
|
||||
const body = document.createElement("tbody");
|
||||
for (const structure of unit.structures) {
|
||||
const spec = `H=${num(structure.height_m, 1)} · L=${num(structure.length_m, 1)}m`;
|
||||
// 규격 + **구간 표기** — 구간은 길이와 같은 값에서 나오므로 둘이 갈릴 수 없다
|
||||
// (`length_m` 은 겹침을 지운 구간 목록의 합, 2026-09-09 확인).
|
||||
const span = stationRange(structure.start_m, structure.end_m);
|
||||
const spec =
|
||||
`H=${num(structure.height_m, 1)} · L=${num(structure.length_m, 1)}m` +
|
||||
(span ? ` · ${span}` : "");
|
||||
if (!structure.components.length) {
|
||||
const tr = document.createElement("tr");
|
||||
tr.append(textCell(structure.name, "b08-grid__station"));
|
||||
|
||||
Reference in New Issue
Block a user