refactor(472-3 B06 벽 · 기슭막이 · 배치): 구조물 기하 logic 분리 · 그림 파일은 그리기만

- logic 새 파일 다섯 — Cross_Wall_Geom(벽 1매) · Cross_Wall_Hatch_Geom(무늬 띠 · 물빼기 · 도수로 띠 · 원지반선) · Cross_Excavation_Geom(벽 터파기) · Cross_Design_Surface_Geom(암선 · 포장층) · Cross_Revetment_Geom(독립 기슭막이 배치)
- logic 으로 옮김 — Body_Guard → Cross_Body_Guard · Structure_Layouts · Route_Carry_Patch(내용 그대로 · import 경로만)
- inferStationInterval → common_util_station(글자표 없는 자리 · common_util_svg 는 다시 내보냄) — Node 묶음 ui_template_locale 끌림 끊음
- 부르는 쪽 import 줄 · 등록부 ts 경로 · 시험 · 도우미 경로
- test_472_3 GEOMETRY_PULLS 다섯 줄 걷음 · Wall_Hatch · Excavation · Design_Surface 세 줄은 Culvert · Box · Ford 그림 파일(518-2)이 그리기 함수로 부르는 동안 남김

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-23 19:22:27 +09:00
co-authored by Claude Opus 5.5
parent 1d5d63875b
commit d3315da993
82 changed files with 1000 additions and 840 deletions
+1 -1
View File
@@ -54,7 +54,7 @@ bodies.box.control.select(352.14, "left");
out.released = released;
// 107-2 — 원지반을 바꾼 사본: 세월교 바닥 = 노면 − (관경 + 토피) · 박스 본체 · 끝 · 날개 · 흙막이 자리 그대로
const { computeStoredLayouts } = loadTs(B06("B06_Section_Structure_Layouts.ts"));
const { computeStoredLayouts } = loadTs(B06("logic/B06_Section_Structure_Layouts.ts"));
const fixture = JSON.parse(
fs.readFileSync(path.join(__dirname, "fixtures", "b06_73_4_body_guard_sections.json"), "utf8"),
);
+1 -1
View File
@@ -120,7 +120,7 @@ const resolve = (base) =>
) ?? `${base}.ts`;
const B06 = (f) => path.join(ROOT, "B06_Section", `${f}.ts`);
const { computeStoredLayouts } = loadTs(B06("B06_Section_Structure_Layouts"));
const { computeStoredLayouts } = loadTs(B06("logic/B06_Section_Structure_Layouts"));
const { appendCulvertOverlay } = loadTs(B06("B06_Section_UI_Cross_Culvert"));
const { wallStandsAt } = loadTs(B06("B06_Section_UI_Cross_Culvert_Wire"));
const { applyStructurePick } = loadTs(B06("B06_Section_UI_Page_Structure_Pick"));
@@ -32,7 +32,7 @@ const B06 = (f) => path.join(ROOT, "B06_Section", `${f}.ts`);
const { buildCorridorStructures } = loadTs(B05("B05_Profile_UI_Corridor_Structures"));
const { structureHashParts } = loadTs(B05("logic/B05_Profile_UI_Corridor_Structures_Hash"));
const { structureTopLoops } = loadTs(B05("logic/B05_Profile_UI_Corridor_Tin_Design"));
const { chuteBandOutline, isChuteSegment } = loadTs(B06("B06_Section_UI_Cross_Wall_Hatch"));
const { chuteBandOutline, isChuteSegment } = loadTs(B06("logic/B06_Section_Cross_Wall_Hatch_Geom"));
const { computeBoxLayout } = loadTs(B06("B06_Section_UI_Cross_Box_Geom"));
const { computeFordLayout } = loadTs(B06("B06_Section_UI_Cross_Ford"));
const { outletFillLine } = loadTs(B06("B06_Section_UI_Cross_Ford_Pavement"));
+1 -1
View File
@@ -219,7 +219,7 @@ out.zone = {
};
// ⑤ 실제 측점 — 설계선 + 배관 오버레이를 그린 뒤 고름을 붙임(카드와 같은 차례)
const { computeStoredLayouts } = loadTs(B06("B06_Section_Structure_Layouts"));
const { computeStoredLayouts } = loadTs(B06("logic/B06_Section_Structure_Layouts"));
const { appendCulvertOverlay } = loadTs(B06("B06_Section_UI_Cross_Culvert"));
const { appendCrossDesignOverlay } = loadTs(B06("B06_Section_UI_Cross_Design"));
const { raiseWalls } = loadTs(B06("B06_Section_UI_Cross_Wall"));
@@ -29,7 +29,7 @@ const resolve = (base) =>
) ?? `${base}.ts`;
const B06 = (f) => path.join(ROOT, "B06_Section", `${f}.ts`);
const { computeStoredLayouts } = loadTs(B06("B06_Section_Structure_Layouts"));
const { computeStoredLayouts } = loadTs(B06("logic/B06_Section_Structure_Layouts"));
const { computeStructureAreas } = loadTs(
path.join(ROOT, "common_util", "common_util_cross_structure_areas.ts"),
);
@@ -30,7 +30,7 @@ const resolve = (base) =>
) ?? `${base}.ts`;
const B06 = (f) => path.join(ROOT, "B06_Section", f);
const { computeStoredLayouts } = loadTs(B06("B06_Section_Structure_Layouts.ts"));
const { computeStoredLayouts } = loadTs(B06("logic/B06_Section_Structure_Layouts.ts"));
const fixture = JSON.parse(
fs.readFileSync(path.join(__dirname, "fixtures", "b06_73_4_body_guard_sections.json"), "utf8"),
+2 -2
View File
@@ -29,8 +29,8 @@ const resolve = (base) =>
) ?? `${base}.ts`;
const B06 = (f) => path.join(ROOT, "B06_Section", `${f}.ts`);
const { computeStoredLayouts } = loadTs(B06("B06_Section_Structure_Layouts"));
const { isChuteSegment, chuteBandOutline } = loadTs(B06("B06_Section_UI_Cross_Wall_Hatch"));
const { computeStoredLayouts } = loadTs(B06("logic/B06_Section_Structure_Layouts"));
const { isChuteSegment, chuteBandOutline } = loadTs(B06("logic/B06_Section_Cross_Wall_Hatch_Geom"));
const { chuteBands } = loadTs(
path.join(ROOT, "B05_Profile", "B05_Profile_UI_Corridor_Structures_Chute.ts"),
);
+1 -1
View File
@@ -125,7 +125,7 @@ const resolve = (base) =>
) ?? `${base}.ts`;
const B06 = (f) => path.join(ROOT, "B06_Section", `${f}.ts`);
const { computeStoredLayouts } = loadTs(B06("B06_Section_Structure_Layouts"));
const { computeStoredLayouts } = loadTs(B06("logic/B06_Section_Structure_Layouts"));
const { appendCulvertOverlay } = loadTs(B06("B06_Section_UI_Cross_Culvert"));
const { attachChuteBandPick } = loadTs(B06("B06_Section_UI_Cross_Wall_Hatch"));
const { applyStructurePick } = loadTs(B06("B06_Section_UI_Page_Structure_Pick"));
@@ -47,7 +47,11 @@ function loadTs(file, stubs = {}) {
}).loadTs(file);
}
const surface = loadTs(path.join(ROOT, "B06_Section", "B06_Section_UI_Cross_Design_Surface.ts"));
const surface = loadTs(path.join(ROOT, "B06_Section", "B06_Section_UI_Cross_Design_Surface.ts"), {
"./logic/B06_Section_Cross_Design_Surface_Geom": loadTs(
path.join(ROOT, "B06_Section", "logic", "B06_Section_Cross_Design_Surface_Geom.ts"),
),
});
const selection = loadTs(path.join(ROOT, "A00_Common", "design", "design_selection.ts"), {
"../../common_util/common_util_pipe_match": { PIPE_MATCH_M: 0.51 }, // 찾는 거리 정의 자리(472-6)
"../b_page_state": { readState: () => null, writeState: () => {} },
@@ -35,7 +35,7 @@ const { ADDON_SPECS } = loadTs(design("logic/design_structure_slope_tier.ts"));
const { STRUCTURE_SPECS } = loadTs(design("logic/design_structure_pipe.ts"));
const { wallSpecsFrom } = loadTs(path.join(ROOT, "common_util", "common_util_structure_walls.ts"));
const { computeRevetmentLayout } = loadTs(
path.join(ROOT, "B06_Section", "B06_Section_UI_Cross_Revetment.ts"),
path.join(ROOT, "B06_Section", "logic", "B06_Section_Cross_Revetment_Geom.ts"),
);
const r3 = (v) => Math.round(v * 1000) / 1000;
@@ -30,7 +30,7 @@ const resolve = (base) =>
) ?? `${base}.ts`;
const B06 = (f) => path.join(ROOT, "B06_Section", f);
const { computeStoredLayouts, structureAreaRows } = loadTs(B06("B06_Section_Structure_Layouts.ts"));
const { computeStoredLayouts, structureAreaRows } = loadTs(B06("logic/B06_Section_Structure_Layouts.ts"));
const { computeCulvertLayout } = loadTs(B06("B06_Section_UI_Cross_Culvert_Geom.ts"));
const read = (name) =>
JSON.parse(fs.readFileSync(path.join(__dirname, "fixtures", name), "utf8")).cross_sections;
+1 -1
View File
@@ -80,7 +80,7 @@ const resolve = (base) =>
) ?? `${base}.ts`;
const B06 = (f) => path.join(ROOT, "B06_Section", `${f}.ts`);
const { computeStoredLayouts } = loadTs(B06("B06_Section_Structure_Layouts"));
const { computeStoredLayouts } = loadTs(B06("logic/B06_Section_Structure_Layouts"));
const { appendCulvertOverlay } = loadTs(B06("B06_Section_UI_Cross_Culvert"));
const { outlineBox } = loadTs(B06("B06_Section_UI_Cross_Culvert_Types"));
@@ -223,7 +223,7 @@ const pageMod = load("A00_Common", "design", "design_pipeline_page.ts");
const storeMod = load("A00_Common", "design", "design_store.ts");
const sectionStore = load("B06_Section", "B06_Section_Section_Store.ts");
const common = load("B06_Section", "B06_Section_UI_Section_Common.ts");
const layouts = load("B06_Section", "B06_Section_Structure_Layouts.ts");
const layouts = load("B06_Section", "logic", "B06_Section_Structure_Layouts.ts");
const profileData = load("B05_Profile", "logic", "B05_Profile_UI_Profile_Data.ts");
const alignmentMod = load("B05_Profile", "logic", "B05_Profile_UI_Profile_Alignment.ts");
const baseMod = load("A00_Common", "design", "design_profile_base.ts");
@@ -23,11 +23,20 @@ function loadTs(file, stubs = {}) {
const input = JSON.parse(fs.readFileSync(process.argv[2], "utf8"));
const station = loadTs(path.join(ROOT, "common_util", "common_util_structure_station.ts"));
// 띠 기하(472-3 logic) — 그림 파일 · 물넘이포장이 같은 모듈
const hatchGeom = loadTs(
path.join(ROOT, "B06_Section", "logic", "B06_Section_Cross_Wall_Hatch_Geom.ts"),
{ "./B06_Section_UI_Cross_Culvert_Const": {} },
);
const ford = loadTs(path.join(ROOT, "B06_Section", "B06_Section_UI_Cross_Ford_Pavement.ts"), {
"./B06_Section_UI_Cross_Wall_Hatch": loadTs(
path.join(ROOT, "B06_Section", "B06_Section_UI_Cross_Wall_Hatch.ts"),
{ "./logic/B06_Section_UI_Cross_Culvert_Const": {} },
{
"./logic/B06_Section_UI_Cross_Culvert_Const": {},
"./logic/B06_Section_Cross_Wall_Hatch_Geom": hatchGeom,
},
),
"./logic/B06_Section_Cross_Wall_Hatch_Geom": hatchGeom,
"./B06_Section_UI_Cross_Design_Surface": { appendPavementOverlay() {} },
// 관 신원표(323-5 · 472-2 에서 common_util 로) — 진짜 · 장부 안 꽂음 = 옛 자리 이름
"../common_util/common_util_pick_tag": loadTs(
@@ -56,7 +56,7 @@ pave.appendFordPavementOverlay(
const paveLayer = svg.children.find((k) => (k.attrs.class ?? "").includes("ford-pavement"));
// 294-4 도수로 · 돌붙임 끝단 · 길이
const hatch = load(path.join(ROOT, "B06_Section", "B06_Section_UI_Cross_Wall_Hatch.ts"));
const hatch = load(path.join(ROOT, "B06_Section", "logic", "B06_Section_Cross_Wall_Hatch_Geom.ts"));
const P = (offset, elevation) => ({ offset, elevation });
const slope = [{ points: [P(0, 0), P(3, -4)], kind: "fill" }]; // 사면 5 m
const flat = [P(3, -4), P(5, -4), P(8, -4)]; // 사면 끝 바깥 원지반
@@ -44,7 +44,7 @@ globalThis.document = { createElementNS: (_ns, tag) => new Node(tag) };
const input = JSON.parse(fs.readFileSync(process.argv[2], "utf8"));
const pave = load(path.join(ROOT, "B06_Section", "B06_Section_UI_Cross_Ford_Pavement.ts"));
const hatch = load(path.join(ROOT, "B06_Section", "B06_Section_UI_Cross_Wall_Hatch.ts"));
const hatch = load(path.join(ROOT, "B06_Section", "logic", "B06_Section_Cross_Wall_Hatch_Geom.ts"));
const fillGround = hatch.groundLine(input.fillSamples);
const dipGround = hatch.groundLine(input.dipSamples);
const chute = (design, ground, length) =>
+10 -7
View File
@@ -592,10 +592,16 @@ const loadDrafts = makeLoader(
);
// ── 6. B05 [저장](캐시 patch) — 종류 바꾼 측점 = structure_reset · 옛 조정값 안 실음 ─────
const DESIGN_KEYS = {
USER_TOUCHED_KEYS: ["display_half_width_m", "ford_adjust", "revet_adjust", "berm"],
STRUCTURE_ADJUST_KEYS: makeLoader([B06("logic/B06_Section_Design_Keys")])(
B06("logic/B06_Section_Design_Keys"),
).STRUCTURE_ADJUST_KEYS,
};
const loadStore = makeLoader(
[
B06("B06_Section_Section_Store"),
B06("B06_Section_Route_Carry_Patch"), // patch 바탕 한 벌(472-6)
B06("logic/B06_Section_Route_Carry_Patch"), // patch 바탕 한 벌(472-6)
B06("B06_Section_Api_Culvert_Options"),
path.join(ROOT, "A00_Common", "b_page_state.ts"),
path.join(ROOT, "A00_Common", "design", "design_selection.ts"),
@@ -605,12 +611,9 @@ const loadStore = makeLoader(
"./B06_Section_Cross_Refresh": {
USER_TOUCHED_KEYS: ["display_half_width_m", "ford_adjust", "revet_adjust", "berm"],
},
"./logic/B06_Section_Design_Keys": {
USER_TOUCHED_KEYS: ["display_half_width_m", "ford_adjust", "revet_adjust", "berm"],
STRUCTURE_ADJUST_KEYS: makeLoader([B06("logic/B06_Section_Design_Keys")])(
B06("logic/B06_Section_Design_Keys"),
).STRUCTURE_ADJUST_KEYS,
},
"./logic/B06_Section_Design_Keys": DESIGN_KEYS,
// patch 바탕(logic/Route_Carry_Patch · 472-3)이 부르는 이름
"./B06_Section_Design_Keys": DESIGN_KEYS,
},
);
+2 -2
View File
@@ -118,7 +118,7 @@ const STUBS = new Map([
{ kindChangedChainages: () => [], STRUCTURE_ADJUST_KEYS: [] },
],
[
B06("B06_Section_Structure_Layouts"),
B06("logic/B06_Section_Structure_Layouts"),
{ applyStructureAreaRows: () => {}, structureAreaRows: () => [] },
],
[
@@ -212,7 +212,7 @@ const {
const { loadSectionDetail } = loadTs(B06("B06_Section_Section_Store"));
const { forgetDraftStations } = loadTs(B06("B06_Section_Section_Drafts"));
const { buildCorridorStructures } = loadTs(B05("B05_Profile_UI_Corridor_Structures"));
const { computeRevetmentLayout } = loadTs(B06("B06_Section_UI_Cross_Revetment"));
const { computeRevetmentLayout } = loadTs(B06("logic/B06_Section_Cross_Revetment_Geom"));
const { buildStructureLane } = loadTs(B05("B05_Profile_UI_Structures_Marks"));
const { pickGroups } = loadTs(B05("B05_Profile_UI_Structures_Panel_Types"));
const { structureDisplayName } = loadTs(B06("B06_Section_UI_Section_Common"));
+1 -1
View File
@@ -193,7 +193,7 @@ const pageMod = load("A00_Common", "design", "design_pipeline_page.ts");
const storeMod = load("A00_Common", "design", "design_store.ts");
const sectionStore = load("B06_Section", "B06_Section_Section_Store.ts");
const common = load("B06_Section", "B06_Section_UI_Section_Common.ts");
const layouts = load("B06_Section", "B06_Section_Structure_Layouts.ts");
const layouts = load("B06_Section", "logic", "B06_Section_Structure_Layouts.ts");
const profileData = load("B05_Profile", "logic", "B05_Profile_UI_Profile_Data.ts");
const alignmentMod = load("B05_Profile", "logic", "B05_Profile_UI_Profile_Alignment.ts");
const baseMod = load("A00_Common", "design", "design_profile_base.ts");
+1 -1
View File
@@ -231,7 +231,7 @@ const pageMod = load("A00_Common", "design", "design_pipeline_page.ts");
const storeMod = load("A00_Common", "design", "design_store.ts");
const sectionStore = load("B06_Section", "B06_Section_Section_Store.ts");
const common = load("B06_Section", "B06_Section_UI_Section_Common.ts");
const layouts = load("B06_Section", "B06_Section_Structure_Layouts.ts");
const layouts = load("B06_Section", "logic", "B06_Section_Structure_Layouts.ts");
const profileData = load("B05_Profile", "logic", "B05_Profile_UI_Profile_Data.ts");
const alignmentMod = load("B05_Profile", "logic", "B05_Profile_UI_Profile_Alignment.ts");
const baseMod = load("A00_Common", "design", "design_profile_base.ts");
+1 -1
View File
@@ -224,7 +224,7 @@ const pageMod = load("A00_Common", "design", "design_pipeline_page.ts");
const storeMod = load("A00_Common", "design", "design_store.ts");
const sectionStore = load("B06_Section", "B06_Section_Section_Store.ts");
const common = load("B06_Section", "B06_Section_UI_Section_Common.ts");
const layouts = load("B06_Section", "B06_Section_Structure_Layouts.ts");
const layouts = load("B06_Section", "logic", "B06_Section_Structure_Layouts.ts");
const profileData = load("B05_Profile", "logic", "B05_Profile_UI_Profile_Data.ts");
const alignmentMod = load("B05_Profile", "logic", "B05_Profile_UI_Profile_Alignment.ts");
const baseMod = load("A00_Common", "design", "design_profile_base.ts");
+1 -1
View File
@@ -42,7 +42,7 @@ function memoryStorage() {
globalThis.window = { sessionStorage: memoryStorage(), localStorage: memoryStorage() };
const B06 = (f) => path.join(ROOT, "B06_Section", `${f}.ts`);
const { structureAreaRows } = loadTs(B06("B06_Section_Structure_Layouts"));
const { structureAreaRows } = loadTs(B06("logic/B06_Section_Structure_Layouts"));
const { withDraftAdjusts } = loadTs(B06("B06_Section_Section_Adjusts"));
const { writeState } = loadTs(path.join(ROOT, "A00_Common", "b_page_state.ts"));
@@ -43,7 +43,7 @@ function memoryStorage() {
globalThis.window = { sessionStorage: memoryStorage(), localStorage: memoryStorage() };
const B06 = (f) => path.join(ROOT, "B06_Section", `${f}.ts`);
const { structureAreaRows, computeStoredLayouts } = loadTs(B06("B06_Section_Structure_Layouts"));
const { structureAreaRows, computeStoredLayouts } = loadTs(B06("logic/B06_Section_Structure_Layouts"));
const { layPipeOptions } = loadTs(B06("B06_Section_Section_Adjusts"));
const { applyPipeOptionsToCache } = loadTs(B06("B06_Section_UI_Page_Pipe_Options"));
const { ZERO_ADJUST } = loadTs(B06("B06_Section_UI_Cross_Culvert_Types"));
@@ -5,7 +5,7 @@ export {
applyStructureAreaRows,
computeStoredLayouts,
structureAreaRows,
} from "../../B06_Section/B06_Section_Structure_Layouts";
} from "../../B06_Section/logic/B06_Section_Structure_Layouts";
export { rememberRockBoundaryDefault } from "../../B06_Section/B06_Section_UI_Standard_Panel";
export { writeState } from "../../A00_Common/b_page_state";
export { rebasePipeDraft } from "../../common_util/common_util_route_follow";
+1 -1
View File
@@ -76,7 +76,7 @@ const load = makeLoader(
B06("logic/B06_Section_UI_Page_Patches"),
B06("logic/B06_Section_Design_Keys"), // 칸 목록 · 얹기 · patch 꼴 한 벌(472-6)
B06("logic/B06_Section_Route_Carry"),
B06("B06_Section_Route_Carry_Patch"),
B06("logic/B06_Section_Route_Carry_Patch"),
path.join(ROOT, "common_util", "common_util_pipe_match.ts"),
path.join(ROOT, "A00_Common", "b_page_state.ts"),
path.join(ROOT, "A00_Common", "design", "design_selection.ts"),
@@ -29,7 +29,7 @@ export { createCrossStage } from "../../B06_Section/logic/B06_Section_Cross_Stag
export {
applyStructureAreaRows,
structureAreaRows,
} from "../../B06_Section/B06_Section_Structure_Layouts";
} from "../../B06_Section/logic/B06_Section_Structure_Layouts";
export { bermSpansFromStructures, bermSpecAt } from "../../B06_Section/B06_Section_UI_Page_Persist";
export { parseDtmGrid } from "../../common_util/common_util_surface_sampler";
export { computeMassHaul } from "../../common_util/common_util_mass_haul";
+1 -1
View File
@@ -20,7 +20,7 @@ export {
withCarriedEdits,
withDraftAdjusts,
} from "../../B06_Section/B06_Section_Section_Adjusts";
export { crossPatchesFromCache } from "../../B06_Section/B06_Section_Route_Carry_Patch";
export { crossPatchesFromCache } from "../../B06_Section/logic/B06_Section_Route_Carry_Patch";
export { mergeCrossPatches } from "../../B06_Section/logic/B06_Section_UI_Page_Patches";
export { kindChangedChainages } from "../../B06_Section/B06_Section_Api_Culvert_Options";
export { pipeChainageOf } from "../../A00_Common/design/design_pipe_ids";
+2 -2
View File
@@ -31,9 +31,9 @@ const resolve = (base) =>
const B06 = (f) => path.join(ROOT, "B06_Section", f);
const { computeStoredLayouts, structureAreaRows, trimOfLayouts } = loadTs(
B06("B06_Section_Structure_Layouts.ts"),
B06("logic/B06_Section_Structure_Layouts.ts"),
);
const { bodyGuardBase } = loadTs(B06("B06_Section_UI_Cross_Body_Guard.ts"));
const { bodyGuardBase } = loadTs(B06("logic/B06_Section_Cross_Body_Guard.ts"));
const fixture = JSON.parse(
fs.readFileSync(path.join(__dirname, "fixtures", "b06_73_4_body_guard_sections.json"), "utf8"),
+3 -3
View File
@@ -29,11 +29,11 @@ const resolve = (base) =>
) ?? `${base}.ts`;
const B06 = (f) => path.join(ROOT, "B06_Section", f);
const { computeStoredLayouts, structureAreaRows } = loadTs(B06("B06_Section_Structure_Layouts.ts"));
const { bodyGuardBase } = loadTs(B06("B06_Section_UI_Cross_Body_Guard.ts"));
const { computeStoredLayouts, structureAreaRows } = loadTs(B06("logic/B06_Section_Structure_Layouts.ts"));
const { bodyGuardBase } = loadTs(B06("logic/B06_Section_Cross_Body_Guard.ts"));
const { computeBoxLayout } = loadTs(B06("B06_Section_UI_Cross_Box_Geom.ts"));
const { computeCulvertLayout } = loadTs(B06("B06_Section_UI_Cross_Culvert_Geom.ts"));
const { computeRevetmentLayout } = loadTs(B06("B06_Section_UI_Cross_Revetment.ts"));
const { computeRevetmentLayout } = loadTs(B06("logic/B06_Section_Cross_Revetment_Geom.ts"));
const fixture = JSON.parse(
fs.readFileSync(path.join(__dirname, "fixtures", "b06_73_4_body_guard_sections.json"), "utf8"),
+1 -1
View File
@@ -29,7 +29,7 @@ const resolve = (base) =>
) ?? `${base}.ts`;
const B06 = (f) => path.join(ROOT, "B06_Section", f);
const { computeStoredLayouts } = loadTs(B06("B06_Section_Structure_Layouts.ts"));
const { computeStoredLayouts } = loadTs(B06("logic/B06_Section_Structure_Layouts.ts"));
const fixture = JSON.parse(
fs.readFileSync(path.join(__dirname, "fixtures", "b06_73_4_body_guard_sections.json"), "utf8"),
+1 -1
View File
@@ -29,7 +29,7 @@ const resolve = (base) =>
) ?? `${base}.ts`;
const B06 = (f) => path.join(ROOT, "B06_Section", f);
const { computeStoredLayouts } = loadTs(B06("B06_Section_Structure_Layouts.ts"));
const { computeStoredLayouts } = loadTs(B06("logic/B06_Section_Structure_Layouts.ts"));
const fixture = JSON.parse(
fs.readFileSync(path.join(__dirname, "fixtures", "b06_73_4_body_guard_sections.json"), "utf8"),
@@ -167,7 +167,9 @@ def test_B06_새_키_한_벌():
assert CrossSectionPatch(chainage_m=1, ford_pipe_length_m=9).ford_pipe_length_m == 9
with pytest.raises(ValueError):
CrossSectionPatch(chainage_m=1, ford_pipe_length_m=-1)
layouts = (ROOT / "B06_Section" / "B06_Section_Structure_Layouts.ts").read_text("utf-8")
layouts = (ROOT / "B06_Section" / "logic" / "B06_Section_Structure_Layouts.ts").read_text(
"utf-8"
)
block = layouts[layouts.index("STRUCTURE_ROW_KEYS = [") :][:900]
assert '"ford_pipe_length_m"' in block
@@ -76,7 +76,7 @@ def test_관_벽이_서는_측점은_독립_벽을_안_그린다(bundle, tmp_pat
def test_카드_서버_3D_가_가드_한_벌을_쓴다():
files = {
"카드": ROOT / "B06_Section" / "B06_Section_UI_Cross_View.ts",
"서버 면적 · B07": ROOT / "B06_Section" / "B06_Section_Structure_Layouts.ts",
"서버 면적 · B07": ROOT / "B06_Section" / "logic" / "B06_Section_Structure_Layouts.ts",
"3D": ROOT / "B05_Profile" / "B05_Profile_UI_Corridor_Structures.ts",
}
for where, path in files.items():
@@ -134,7 +134,7 @@ def test_넘김_알림은_결과_한_줄에_합침():
keys = _read("B06_Section/B06_Section_Station_Keys.ts")
assert "{ quiet = false, applyTo = toRouteId }: { quiet?: boolean; applyTo?: number }" in keys
assert "if (outside.size && !quiet)" in keys
patch = _read("B06_Section/B06_Section_Route_Carry_Patch.ts")
patch = _read("B06_Section/logic/B06_Section_Route_Carry_Patch.ts")
assert "outside: keyed.outside.size + chain.outside.size" in patch
# 498-3 — 결과 한 줄 걷음 · 남김 = 따라감 실패 · 새 교차 관
save = _read("A00_Common/design/design_save.ts")
+7 -2
View File
@@ -233,7 +233,9 @@ def test_M5_새_행은_버린_수에_안_셈():
def test_H5_노선_저장_뒤_본문_M7_kindreset_옮김():
# 472-6 6-B — 노선 저장 뒤 본문 = 서버 Node 넘김(`routeCarryPatches` · 옛 `saveCachedCrossPatches` ·
# `sessionOverlay` 몸통 그대로) · 표준 횡단면 · 풍선 = 브라우저 횡단 조각(`routeCarryPart`)
patch = (ROOT / "B06_Section" / "B06_Section_Route_Carry_Patch.ts").read_text(encoding="utf-8")
patch = (ROOT / "B06_Section" / "logic" / "B06_Section_Route_Carry_Patch.ts").read_text(
encoding="utf-8"
)
body = patch[patch.index("export function routeCarryPatches") :]
for needle in (
"crossPatchesFromCache(detail, kindChanged, savedAt)",
@@ -245,7 +247,10 @@ def test_H5_노선_저장_뒤_본문_M7_kindreset_옮김():
assert needle in body, needle
apply = (ROOT / "B05_Profile" / "B05_Profile_UI_RouteEdit_Apply.ts").read_text(encoding="utf-8")
part = apply[apply.index("export function routeCarryPart") :]
for needle in ("readStandardCrossSession(projectId)", "balloon_offsets: balloonOffsetsPayload()"):
for needle in (
"readStandardCrossSession(projectId)",
"balloon_offsets: balloonOffsetsPayload()",
):
assert needle in part, needle
persist = (ROOT / "B06_Section" / "B06_Section_UI_Page_Persist.ts").read_text(encoding="utf-8")
assert (
+3 -8
View File
@@ -95,8 +95,6 @@ GEOMETRY_PULLS = (
"B05_Profile/B05_Profile_UI_Corridor_Structures_Box.ts",
"B05_Profile/B05_Profile_UI_Corridor_Structures_Chute.ts",
"B05_Profile/B05_Profile_UI_Corridor_Structures_Path.ts",
"B06_Section/B06_Section_Structure_Layouts.ts",
"B06_Section/B06_Section_UI_Cross_Body_Guard.ts",
"B06_Section/B06_Section_UI_Cross_Box.ts",
"B06_Section/B06_Section_UI_Cross_Box_Geom.ts",
"B06_Section/B06_Section_UI_Cross_Culvert.ts",
@@ -105,16 +103,13 @@ GEOMETRY_PULLS = (
"B06_Section/B06_Section_UI_Cross_Culvert_Tiers.ts",
"B06_Section/B06_Section_UI_Cross_Culvert_Types.ts",
"B06_Section/B06_Section_UI_Cross_Culvert_Wire.ts",
"B06_Section/B06_Section_UI_Cross_Design_Surface.ts",
"B06_Section/B06_Section_UI_Cross_Excavation.ts",
"B06_Section/B06_Section_UI_Cross_Ford.ts",
"B06_Section/B06_Section_UI_Cross_Ford_Geom.ts",
"B06_Section/B06_Section_UI_Cross_Ford_Pavement.ts",
"B06_Section/B06_Section_UI_Cross_Revetment.ts",
"B06_Section/B06_Section_UI_Cross_Wall.ts",
# 518-3 기하는 logic 으로 · 그리기 함수(띠 · 터파기 · 포장층)를 위 Culvert · Box · Ford 그림 파일이 부름 — 518-2 뒤 걷음
"B06_Section/B06_Section_UI_Cross_Design_Surface.ts",
"B06_Section/B06_Section_UI_Cross_Excavation.ts",
"B06_Section/B06_Section_UI_Cross_Wall_Hatch.ts",
# 노선 바뀐 [저장] 넘김 patch(472-6 6-B) — 세션 칸 → 설계 칸 얹기가 관 벽 · 단 · 세월 · BOX 기본값(위 그림 파일)을 씀
"B06_Section/B06_Section_Route_Carry_Patch.ts",
)
# 묶음 단계 입구(511-B B-1) planline 저장 기준(`plantedBase`) 끌림 11 = B-3 이 logic 으로 옮겨 걷음
KNOWN_PULLS = set(SESSION_PULLS) | set(GEOMETRY_PULLS)
+1 -1
View File
@@ -75,7 +75,7 @@ def test_quantity_F7_C4_E1_서버_브라우저_같음(tmp_path):
conv = _fixture("context.json")["earthwork_conversion"]
long_ = detail["longitudinal"]
calls = [
{"mod": "B06_Section/B06_Section_Structure_Layouts.ts", "fn": "structureAreaRows",
{"mod": "B06_Section/logic/B06_Section_Structure_Layouts.ts", "fn": "structureAreaRows",
"args": [sections]},
{"mod": "common_util/common_util_mass_haul.ts", "fn": "computeMassHaulSeries",
"args": [long_, sections, conv, None, ["cross"]]},
+1 -1
View File
@@ -185,7 +185,7 @@ def test_저장_정본_새_길_브라우저_같음(name, monkeypatch, tmp_path):
detail = json.loads((GOLDEN / "detail.json").read_text(encoding="utf-8"))
node_input = {"detail": detail, "context": _contexts()[name]}
new = prebuild._node_output(copy.deepcopy(node_input))
layouts = "B06_Section/B06_Section_Structure_Layouts.ts"
layouts = "B06_Section/logic/B06_Section_Structure_Layouts.ts"
sections = detail["cross_sections"]
areas, walls = _browser(
tmp_path,
+1 -1
View File
@@ -20,7 +20,7 @@ if str(PROJECT_ROOT) not in sys.path:
from B06_Section.B06_Section_Schema import CrossSectionPatch # noqa: E402
_LAYOUTS = PROJECT_ROOT / "B06_Section" / "B06_Section_Structure_Layouts.ts"
_LAYOUTS = PROJECT_ROOT / "B06_Section" / "logic" / "B06_Section_Structure_Layouts.ts"
_PERSIST = PROJECT_ROOT / "B06_Section" / "B06_Section_UI_Page_Persist.ts"
_TYPES = PROJECT_ROOT / "B06_Section" / "B06_Section_Api_Types.ts"
+3 -2
View File
@@ -29,7 +29,7 @@ const make = (tag) => ({
set textContent(v) { this.text = v; },
});
globalThis.document = { createElementNS: (_ns, tag) => make(tag) };
const { buildRevetWallGeometry } = await import("./B06_Section_UI_Cross_Wall.js");
const { buildRevetWallGeometry } = await import("./logic/B06_Section_Cross_Wall_Geom.js");
const { appendWallHatch } = await import("./B06_Section_UI_Cross_Wall_Hatch.js");
const walk = (node, out = []) => {
if (node.tag === "g" && node.attrs.class === "b06-chart__wall-drain") out.push(node);
@@ -80,6 +80,7 @@ def test_옹벽만_높이_15m_띠마다_파이프_하나(tmp_path: Path) -> None
"node",
str(TSC),
str(B06 / "B06_Section_UI_Cross_Wall.ts"),
str(B06 / "logic" / "B06_Section_Cross_Wall_Geom.ts"),
"--outDir",
str(out),
"--module",
@@ -121,7 +122,7 @@ def test_옹벽만_높이_15m_띠마다_파이프_하나(tmp_path: Path) -> None
def test_옹벽_표식은_구조물_종류로() -> None:
source = (B06 / "B06_Section_UI_Cross_Revetment.ts").read_text(encoding="utf-8")
source = (B06 / "logic" / "B06_Section_Cross_Revetment_Geom.ts").read_text(encoding="utf-8")
# 물빼기 표식 = 구조물 표 형상칸.weep(322-1) — 처음값은 옹벽만
assert "catalogRow(spec.type_id)?.shapeOpts.weep" in source
start = json.loads(
+1 -1
View File
@@ -20,7 +20,7 @@ DATA_DIR = ROOT / "resources" / "data_masonry"
GEOMETRY = [
"B06_Section_UI_Cross_Culvert_Geom.ts",
"B06_Section_UI_Cross_Wall.ts",
"logic/B06_Section_Cross_Wall_Geom.ts",
"B06_Section_UI_Cross_Culvert_Extra.ts",
"logic/B06_Section_UI_Cross_Culvert_Solve.ts",
]
@@ -21,7 +21,7 @@ TSC = PROJECT_ROOT / "config" / "node_modules" / "typescript" / "bin" / "tsc"
_RUNNER = """
import { writeFileSync } from "node:fs";
import { buildRevetWallGeometry } from "./B06_Section_UI_Cross_Wall.js";
import { buildRevetWallGeometry } from "./logic/B06_Section_Cross_Wall_Geom.js";
import { revetWallSpec, REVET_FORMS } from "./logic/B06_Section_UI_Cross_Culvert_Const.js";
const anchor = { offset: 5, elevation: 100 };
const outline = (form, role, extra = {}) =>
@@ -54,6 +54,7 @@ def test_벽_외곽_한_벌_높이_입력_그대로_노면_멈춤(tmp_path: Path
"node",
str(TSC),
str(B06 / "B06_Section_UI_Cross_Wall.ts"),
str(B06 / "logic" / "B06_Section_Cross_Wall_Geom.ts"),
"--outDir",
str(out),
"--module",
@@ -95,8 +96,12 @@ def test_벽_외곽_한_벌_높이_입력_그대로_노면_멈춤(tmp_path: Path
def test_네_벽이_공용_함수로_서고_형태_한도가_없다() -> None:
for name in ("Culvert_Geom", "Culvert_Extra", "Revetment"):
source = (B06 / f"B06_Section_UI_Cross_{name}.ts").read_text(encoding="utf-8")
for name in (
"B06_Section_UI_Cross_Culvert_Geom",
"B06_Section_UI_Cross_Culvert_Extra",
"logic/B06_Section_Cross_Revetment_Geom",
):
source = (B06 / f"{name}.ts").read_text(encoding="utf-8")
assert "buildRevetWallGeometry(" in source, f"{name} 가 공용 벽 함수를 안 씀"
for path in B06.rglob("*.ts"): # logic/ 까지(348-1)
source = path.read_text(encoding="utf-8")