feat(design): 노면공 콘크리트 포장 명세 컨테이너 · 기타 상세 종류 이름(표 08 · 52-10)

- 콘크리트 포장 = 기준 측점 + 필수 컨테이너 「상세 내용」(포장사양 고르기 · 높이 m 손 입력) · 구조물 조합 잇기
- 포장사양 선택지는 명세 한 곳(PAVE_SPEC_CHOICES · 지금 콘크리트 하나) · 새 키 pave_spec · height_m
- 구간 길이 · 전 · 후는 정의 칸 그대로 · 표에 없는 옛 상세 칸(두께 · 폭 · 확폭 · 줄눈 · 비닐 · 철망)은 화면에서 빼고 지난 정의 값으로 보존
- 일반 구조물(structures.json)도 명세 폼을 옵션 칸 아래에 그림(B05_Profile_UI_Structures_Spec) · 잠금은 옵션 칸을 따름 · [수정] 병합은 명세 키를 다시 씀
- 기타 이름 칸 = 「상세 종류 이름」(정의 판 8 · 이력 판_7) · 목록 이름으로 씀 · 종류 단위 잇기 그대로
- 시험: test_52_10_structure_spec_road · 헬퍼 road · ui_checks/52-10_노면공_기타(B05 · B06 같음 · 되돌림)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015KYZ2HWWdUwZWYnn3tQz7X
This commit is contained in:
2026-10-05 23:49:27 +09:00
co-authored by Claude Opus 5.5
parent 9f3a00041d
commit 355361bdb5
13 changed files with 3828 additions and 8 deletions
@@ -1,5 +1,5 @@
{
"판": 7,
"판": 8,
"schema_version": 1,
"comment": "B05 구조물 타입 레지스트리 정본. 근거·옵션 상세는 PLAN.md 구조물 리스트와 resources/knowledge/technical_info/01_임도 참조. 2026-08-17 선택지 재편: B군(종단배수)·F군(생태/녹화)·G군(노면공)은 enabled:false 보존 — B05 선택지에서 빠지고 B06 개별 횡단도 옵션으로 재사용한다. 바닥막이(bed_sill)·생태연못(eco_pond)은 임도 미사용 확정으로 삭제. 배관·BOX암거·물넘이·세월교는 pipe_points.json 정본 관리(managed_by) — structures.json에 저장하지 않으며, 배관 부속(유형/집수정/기슭막이/돌붙임)·날개벽 옵션 정의는 B06/B07 필수 승격의 선언 근거다. ★기본값 원칙(2026-08-16 크로스체크 2차): default를 두는 것은 ①법정이 등급과 무관하게 못박은 단일 수치 ②사용자가 개발 단계에서 확정한 값 ③도메인 수치가 아닌 표시용 문자열, 이 셋뿐이다. 재료·형식 같은 설계자 판단 선택지와 미확정 제원은 default 없이 required로 두어 사용자가 직접 고르게 한다 (pipe_diameter_mm 1000 = 별표2 원칙값+사용자 확정 — 화이트리스트 등재). BOX암거 본체 2.0×2.0·날개벽 유입/유출 있음·짧은쪽 높이 1m·길이 2m·각도 45°는 2026-08-17 사용자 확정값이다 — 본체 규격은 실무 관측 규격(2.0×2.0·3.0×3.0)을 폼에서 프리셋 select로 받고 필요 시 사용자 지정으로 자유 입력하되, 저장 키는 body_width_m·body_height_m 숫자 그대로다(프리셋 전용 키를 만들지 않는다). 이 값들은 B05 서브폼이 실제로 받으므로 phase를 detail로 두지 않는다. ★보호공 개편(2026-08-17 사용자 지시): 구 `*_pitching`(있음/없음) + `*_pitching_finish`(찰/메) 두 축을 `*_protection` 한 축(돌붙임(찰)·돌붙임(메)·도수로)으로 합쳤다 — 도수로·산비탈수로(B4)는 유출부에서 돌붙임 대신 쓰는 공종이라 별도 구조물이 아니라 보호공 선택지로 받는다. \"없음\"은 삭제(물이 흐르는 자리라 보호공 필수). 치수는 배타 — 돌붙임이면 `*_protection_area_m2`(10㎡), 도수로면 `*_protection_width_m`(1m, 지식DB 수치 근거 없음·사용자 확정, 실무 확인 후 개선). 구 저장분은 `common_util_drainage_pipes.parse_pipe_points`가 새 키로 옮긴다.",
"구조물군": {
@@ -3196,7 +3196,7 @@
"options": [
{
"key": "name",
"label": "이름",
"label": "상세 종류 이름",
"input": "text",
"default": "기타 구조물"
}
File diff suppressed because it is too large Load Diff
+37 -1
View File
@@ -17,7 +17,43 @@ const load = (file, deps = {}) => {
return box.exports;
};
const s = load("design_structure_spec.ts");
const { PIPE_SPEC } = load("design_structure_pipe.ts");
const road = load("design_structure_road.ts");
const { PIPE_SPEC, STRUCTURE_SPECS } = load("design_structure_pipe.ts", {
"./design_structure_road": road,
});
// 노면공 › 콘크리트 포장(PLAN 52-10) — 옛 상세 칸은 남고 명세 키만 오감
if (process.argv[2] === "road") {
const spec = STRUCTURE_SPECS.pavement_concrete;
const old = {
length_m: 12,
before_m: 4,
after_m: 8,
thickness_cm: 20,
joint_spacing_m: 6,
pave_spec: "콘크리트",
height_m: 0.2,
};
const state = s.readState(spec, old);
const edited = JSON.parse(JSON.stringify(state));
edited.detail[0].height = "0.35";
const cleared = JSON.parse(JSON.stringify(state));
cleared.detail[0].height = "";
process.stdout.write(
JSON.stringify({
registered: Object.keys(STRUCTURE_SPECS),
same: spec === road.PAVEMENT_SPEC,
containers: spec.containers.map((c) => [c.id, c.title, c.required, c.link]),
choices: road.PAVE_SPEC_CHOICES.map((c) => c.value),
state,
edited: s.writeOptions(spec, edited),
cleared: s.writeOptions(spec, cleared),
keys: s.specKeys(spec),
retired: spec.retired,
}),
);
process.exit(0);
}
if (process.argv[2] === "names") {
process.stdout.write(JSON.stringify(s.nameTable(PIPE_SPEC)));
@@ -0,0 +1,65 @@
# -*- coding: utf-8 -*-
"""노면공 › 콘크리트 포장 명세 · 기타 이름(사용자 구조물 표 08) — PLAN 52-10.
순수 규칙은 Node 헬퍼(`helper_52_structure_spec.cjs road`)가 돌림 ·
화면은 ORCA `ui_checks/52-10_노면공_기타.js`.
"""
import json
import os
import subprocess
import pytest
HERE = os.path.dirname(os.path.abspath(__file__))
ROOT = os.path.dirname(os.path.dirname(HERE))
DEFINITION = os.path.join(ROOT, "resources", "master_template", "구조물정의.json")
@pytest.fixture(scope="module")
def out():
proc = subprocess.run(
["node", os.path.join(HERE, "helper_52_structure_spec.cjs"), "road"],
capture_output=True,
text=True,
encoding="utf-8",
timeout=60,
)
assert proc.returncode == 0, proc.stderr
return json.loads(proc.stdout)
def test_명세_등록_필수_컨테이너_하나(out):
assert out["registered"] == ["pipe", "pavement_concrete"]
assert out["same"] is True
assert out["containers"] == [["detail", "상세 내용", True, "gpavedetail"]]
def test_포장사양_선택지는_명세_한_곳(out):
assert out["choices"] == ["콘크리트"]
def test_저장_키_왕복_옛_칸은_명세_밖(out):
assert out["state"] == {"detail": [{"spec": "콘크리트", "height": "0.2"}]}
assert out["edited"] == {"pave_spec": "콘크리트", "height_m": 0.35}
assert out["cleared"] == {"pave_spec": "콘크리트"}
assert out["keys"] == {"keys": ["pave_spec", "height_m"], "prefixes": []}
assert "length_m" not in out["retired"] # 구간 길이 · 전 · 후는 정의 칸 그대로
assert set(out["retired"]) == {
"thickness_cm",
"width_m",
"widening_area_m2",
"joint_spacing_m",
"separation_sheet",
"wire_mesh",
}
def test_기타_상세_종류_이름_글_칸():
with open(DEFINITION, encoding="utf-8") as f:
doc = json.load(f)
etc = next(t for t in doc["types"] if t["type_id"] == "etc")
name = next(o for o in etc["options"] if o["key"] == "name")
assert name["label"] == "상세 종류 이름" and name["input"] == "text"
pave = next(t for t in doc["types"] if t["type_id"] == "pavement_concrete")
assert [o["key"] for o in pave["options"]][:3] == ["length_m", "before_m", "after_m"]
@@ -0,0 +1,215 @@
/* 52-10 — B05 · B06 좌측 「구조물 배치」 노면공 › 콘크리트 포장 · 기타 = 사용자 구조물 표 08
* 시작 화면: B05 종단설계(#/b05-profile) · 검증 프로젝트(데스크탑_보조) · 폼 비어 있음 · 로그인 상태
* 부르는 법: 단계마다 한 번씩 — 앞에 `window.__m5210 = "단계";` 를 붙여
* orca eval --expression "window.__m5210='edit'; $(cat 이 파일)" → 두 종류 모양 · 값 · 잇기 · [추가] · [저장]
* (orca reload 로 다시 열기)
* orca eval --expression "window.__m5210='verify'; $(cat 이 파일)" → 저장 값 그대로 · 같은 모양
* (B06 으로 옮겨 같은 단계 — 같은 값 · 같은 모양)
* orca eval --expression "window.__m5210='restore'; $(cat 이 파일)" → 추가한 둘 삭제 · [저장]
* 쓰는 것: 검증 프로젝트 structures.json(되돌림 단계가 지움)
* 기대 수치:
* 포장 — containers ["detail"] · 상세 내용 · 포장사양 선택지 ["콘크리트"] · 높이 0.35 · 잇기 지정 ·
* 종류 단위 잇기 줄 가림 · 옛 상세 칸(두께 · 줄눈 …) 안 보임 · 길이 · 전 · 후 칸 보임
* 기타 — 「상세 종류 이름」 글 칸 = 「52-10 시험 기타」 · 목록 이름도 그 글 · 종류 단위 잇기 줄 보임 · 지정
* verify — 같은 값 · 같은 모양(B05 = B06)
*/
(async () => {
const MODE = window.__m5210 || "edit";
const NAME = "52-10 시험 기타";
const w = (ms) => new Promise((r) => setTimeout(r, ms));
const until = async (fn, ms = 15000) => {
for (let t = 0; t < ms; t += 200) {
if (fn()) return true;
await w(200);
}
return false;
};
const vis = (n) => !!n && n.offsetParent !== null;
const sec = () => document.querySelector(".b05-structure-section");
const body = () => sec().querySelector(".b05-route__panel-body");
const spec = () => sec().querySelector(".b05-structure__spec");
const selects = () => sec().querySelectorAll(".b05-structure__grid select");
const fire = (el, value) => {
el.value = value;
el.dispatchEvent(new Event("change", { bubbles: true }));
};
const listItems = () => [...document.querySelectorAll(".b05-route__irregular-list li")];
const ITEMS = [
{ typeId: "pavement_concrete", group: "G", at: [4, 6], list: /콘크리트 포장/ },
{ typeId: "etc", group: "호환", at: [5, 2], list: new RegExp(NAME) },
];
const typeSummary = () =>
[...body().children].find((c) => c.classList.contains("b05-structure__summary"));
const optionRow = () =>
[...body().children].filter((c) => c.classList.contains("b05-structure__grid"))[1];
const optionLabels = () =>
vis(optionRow())
? [...optionRow().querySelectorAll(":scope > label > span:first-child")].map((s) =>
s.textContent.trim(),
)
: [];
const specCtl = (item) =>
spec()?.querySelector(`[data-spec-item="detail.${item}"]`)?.querySelector("select, input");
const shape = (typeId) => {
const position = [...body().children].find((c) =>
c.classList.contains("b05-structure__position-row"),
);
const after = [...body().children]
.slice([...body().children].indexOf(position) + 1)
.find((c) => vis(c));
const nameInput = [...optionRow().querySelectorAll("label")]
.find((l) => l.textContent.includes("상세 종류 이름"))
?.querySelector("input");
const boxes = vis(spec())
? [...spec().querySelectorAll("[data-spec-container]")].filter(vis)
: [];
return {
typeId,
options: optionLabels(),
containers: boxes.map((b) => b.dataset.specContainer),
legend: boxes.map((b) => b.querySelector("legend").firstChild.textContent),
paveChoices: specCtl("spec")
? [...specCtl("spec").options].filter((o) => o.value).map((o) => o.value)
: null,
paveSpec: specCtl("spec")?.value ?? null,
height: specCtl("height")?.value ?? null,
containerLink: !!boxes[0]?.querySelector(".b05-structure__summary-name.is-assigned"),
typeSummaryVisible: vis(typeSummary()),
typeSummaryAfterPosition: after === typeSummary(),
typeLink: !!typeSummary().querySelector(".b05-structure__summary-name.is-assigned"),
name: nameInput?.value ?? null,
stale: vis(sec().querySelector(".b05-structure__stale")),
locked: !!spec()?.inert,
};
};
const pickType = async (group, typeId) => {
const [g, t] = selects();
fire(g, group);
await w(300);
fire(t, typeId);
await w(500);
};
const linkFirstLeaf = async (button) => {
button.click();
await until(() => document.querySelector(".ui-item-picker"));
await w(600);
const modal = document.querySelector(".ui-item-picker");
const ctl = ["닫기", "개인용으로 복사", "관리 화면에서 고치기", "해제", "적용"];
const leaf = [...modal.querySelectorAll("button")].find((b) => {
const t = b.textContent.trim();
return t && !/^[▸▾]/.test(t) && !ctl.includes(t);
});
leaf?.click();
await w(300);
[...modal.querySelectorAll("button")].find((b) => b.textContent.trim() === "적용")?.click();
await w(500);
return !!leaf;
};
const clickBtn = async (text) => {
[...document.querySelectorAll("button")]
.find((b) => b.textContent.trim() === text && vis(b))
?.click();
await w(1500);
};
// B06 은 첫 눌림이 그 측점의 다른 항목(관 등)을 고르기도 함 — 목록이 다시 그려지므로 새로 찾아 한 번 더
const open = async (item) => {
for (let k = 0; k < 3 && selects()[1].value !== item.typeId; k++) {
const li = listItems().find((l) => item.list.test(l.textContent));
if (!li) return false;
(li.querySelector("button") ?? li).click();
await w(800);
}
return selects()[1].value === item.typeId;
};
const out = { mode: MODE, items: [] };
if (MODE === "edit") {
await until(() => listItems().length > 0);
out.before = listItems().length;
for (const item of ITEMS) {
await pickType(item.group, item.typeId);
const row = { lockedBeforePosition: shape(item.typeId).locked };
const [no, dist] = sec()
.querySelectorAll(".b05-structure__position-row > label")[2]
.querySelectorAll("input");
fire(no, String(item.at[0]));
fire(dist, String(item.at[1]));
await w(300);
if (item.typeId === "pavement_concrete") {
fire(specCtl("spec"), "콘크리트");
await w(200);
fire(specCtl("height"), "0.35");
await w(200);
row.picked = await linkFirstLeaf(
spec().querySelector('[data-spec-link] [data-b05-summary="pick"]'),
);
} else {
const input = [...optionRow().querySelectorAll("label")]
.find((l) => l.textContent.includes("상세 종류 이름"))
.querySelector("input");
input.value = NAME;
input.dispatchEvent(new Event("input", { bubbles: true }));
input.dispatchEvent(new Event("change", { bubbles: true }));
await w(200);
row.picked = await linkFirstLeaf(typeSummary().querySelector('[data-b05-summary="pick"]'));
}
Object.assign(row, shape(item.typeId), { phase: "edit" });
sec().querySelector(".is-primary").click(); // 추가
await w(800);
out.items.push(row);
}
out.after = listItems().length;
await clickBtn("저장");
out.listed = listItems()
.map((l) => l.textContent.trim())
.filter((t) => /콘크리트 포장|52-10/.test(t));
} else if (MODE === "verify") {
await until(() => listItems().length > 0);
for (const item of ITEMS) {
if (!(await open(item))) {
out.items.push({ typeId: item.typeId, missing: true });
continue;
}
await w(300);
out.items.push({ ...shape(item.typeId), phase: "verify" });
const li = listItems().find((l) => item.list.test(l.textContent));
(li.querySelector("button") ?? li).click(); // 재선택 = 해제
await w(300);
}
out.listed = listItems()
.map((l) => l.textContent.trim())
.filter((t) => /콘크리트 포장|52-10/.test(t));
} else if (MODE === "restore") {
await until(() => listItems().length > 0);
for (const item of ITEMS) {
if (!(await open(item))) continue;
await clickBtn("삭제");
}
await clickBtn("저장");
out.left = listItems().length;
out.leftover = listItems().filter((l) => /52-10/.test(l.textContent)).length;
}
const [pave, etc] = out.items;
out.paveOk =
!!pave &&
!pave.missing &&
JSON.stringify(pave.containers) === '["detail"]' &&
pave.legend[0] === "상세 내용" &&
JSON.stringify(pave.paveChoices) === '["콘크리트"]' &&
pave.paveSpec === "콘크리트" &&
Number(pave.height) === 0.35 &&
pave.containerLink &&
!pave.typeSummaryVisible &&
!pave.options.some((l) => /두께|줄눈|철망|비닐|포장 폭|확폭/.test(l)) &&
["길이", "기준측점 전", "기준측점 후"].every((l) => pave.options.some((o) => o.startsWith(l)));
out.etcOk =
!!etc &&
!etc.missing &&
etc.name === NAME &&
etc.containers.length === 0 &&
etc.typeSummaryVisible &&
etc.typeSummaryAfterPosition &&
etc.typeLink;
return JSON.stringify(out);
})();