Merge remote-tracking branch 'origin/sub_laptop_4' into main_laptop_1
This commit is contained in:
@@ -65,7 +65,7 @@
|
||||
| common_util/common_util_work_item_key.py | old/ 열쇠대장 | B08 Handoff · B09 BillOfQuantities_Input · 시험 2 | 없음 — 필요: 공종별 고유키 체계 새 마스터(열쇠대장 대응) |
|
||||
| common_util/common_util_work_item_link.py | old/ 연결 | B09 BillOfQuantities · _Input · test_work_item_link_choice | 없음 — 필요: 공종 마스터·연결표 새 마스터 |
|
||||
| B05_Profile/B05_Profile_UI_Drainage_Facility_Fields.ts | ref/수량_사방기슭막이치수 (import) | B05 화면 | B08 Engine_Pipe.py 와 같음 — 필요: 사방기술교본 치수표 새 마스터 |
|
||||
| B06_Section/B06_Section_UI_Cross_Lean.ts | old/3_품셈_산림_돌쌓기경사 (import) | B06 화면 | 계수_산림품셈_13장_구조물.json(StoneSpec.py 와 같음) |
|
||||
| B06_Section/logic/B06_Section_UI_Cross_Lean.ts | old/3_품셈_산림_돌쌓기경사 (import) | B06 화면 | 계수_산림품셈_13장_구조물.json(StoneSpec.py 와 같음) |
|
||||
|
||||
## 바꿈 — 시험
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ const { buildStructurePanel } = loadTs(B06("B06_Section_UI_Cross_Structure_Panel
|
||||
const { buildBoxPanel } = loadTs(B06("B06_Section_UI_Cross_Box_Panel"));
|
||||
const { buildFordPanel } = loadTs(B06("B06_Section_UI_Cross_Ford_Panel"));
|
||||
const { structurePanelDeps } = loadTs(B06("B06_Section_UI_Cross_View_Structure"));
|
||||
const { placePipeWall } = loadTs(B06("B06_Section_UI_Cross_Culvert_Solve"));
|
||||
const { placePipeWall } = loadTs(B06("logic/B06_Section_UI_Cross_Culvert_Solve"));
|
||||
const { boxHitBands } = loadTs(B06("B06_Section_UI_Cross_Box"));
|
||||
|
||||
const r3 = (v) => Math.round(v * 1000) / 1000;
|
||||
|
||||
@@ -52,11 +52,11 @@ const B05 = (name) => path.join(ROOT, "B05_Profile", `${name}.ts`);
|
||||
const { buildCorridor } = loadTs(B05("B05_Profile_UI_Corridor_Build"));
|
||||
const { loftTerrain } = loadTs(B05("B05_Profile_UI_Corridor_Loft"));
|
||||
const { pairProfiles } = loadTs(B05("B05_Profile_UI_Corridor_Loft_Profile"));
|
||||
const { selfCrossings } = loadTs(B05("B05_Profile_UI_Corridor_Loft_Toe"));
|
||||
const { taubin } = loadTs(B05("B05_Profile_UI_Corridor_Loft_Grid"));
|
||||
const { selfCrossings } = loadTs(B05("logic/B05_Profile_UI_Corridor_Loft_Toe"));
|
||||
const { taubin } = loadTs(B05("logic/B05_Profile_UI_Corridor_Loft_Grid"));
|
||||
const { TerrainBandSplit } = loadTs(B05("B05_Profile_UI_Corridor_Split"));
|
||||
const { TerrainHeightIndex } = loadTs(B05("B05_Profile_UI_Corridor_Terrain"));
|
||||
const PSLG = loadTs(B05("B05_Profile_UI_Corridor_Tin_Pslg"));
|
||||
const PSLG = loadTs(B05("logic/B05_Profile_UI_Corridor_Tin_Pslg"));
|
||||
const { SEAM_M } = loadTs(B05("B05_Profile_UI_Corridor_Tin"));
|
||||
|
||||
const HALF = 3;
|
||||
|
||||
@@ -46,7 +46,7 @@ function loadTs(file) {
|
||||
const B05 = path.join(ROOT, "B05_Profile");
|
||||
const T = loadTs(path.join(B05, "B05_Profile_UI_Structures_Panel_Types.ts"));
|
||||
const M = loadTs(path.join(B05, "B05_Profile_UI_Profile_Structures.ts"));
|
||||
const D = loadTs(path.join(B05, "B05_Profile_UI_Structures_Define.ts"));
|
||||
const D = loadTs(path.join(B05, "logic/B05_Profile_UI_Structures_Define.ts"));
|
||||
const C = loadTs(path.join(ROOT, "common_util", "common_util_structure_catalog.ts"));
|
||||
|
||||
const read = (file) => JSON.parse(fs.readFileSync(file, "utf8"));
|
||||
|
||||
@@ -47,8 +47,8 @@ function loadTs(file) {
|
||||
const B05 = (f) => path.join(ROOT, "B05_Profile", `${f}.ts`);
|
||||
const B06 = (f) => path.join(ROOT, "B06_Section", `${f}.ts`);
|
||||
const { buildCorridorStructures } = loadTs(B05("B05_Profile_UI_Corridor_Structures"));
|
||||
const { structureHashParts } = loadTs(B05("B05_Profile_UI_Corridor_Structures_Hash"));
|
||||
const { structureTopLoops } = loadTs(B05("B05_Profile_UI_Corridor_Tin_Design"));
|
||||
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 { computeBoxLayout } = loadTs(B06("B06_Section_UI_Cross_Box_Geom"));
|
||||
const { computeFordLayout } = loadTs(B06("B06_Section_UI_Cross_Ford"));
|
||||
|
||||
@@ -46,7 +46,7 @@ const { computeStoredLayouts } = loadTs(B06("B06_Section_Structure_Layouts"));
|
||||
const { computeStructureAreas } = loadTs(
|
||||
path.join(ROOT, "common_util", "common_util_cross_structure_areas.ts"),
|
||||
);
|
||||
const { PIPE_CONNECT_GRADE } = loadTs(B06("B06_Section_UI_Cross_Culvert_Const"));
|
||||
const { PIPE_CONNECT_GRADE } = loadTs(B06("logic/B06_Section_UI_Cross_Culvert_Const"));
|
||||
const fixture = (name) =>
|
||||
JSON.parse(fs.readFileSync(path.join(__dirname, "fixtures", name), "utf8")).cross_sections;
|
||||
const clone = (v) => JSON.parse(JSON.stringify(v));
|
||||
|
||||
@@ -40,7 +40,7 @@ const { computeCulvertLayout, REVET_EMBED_DEPTH_M } = loadTs(
|
||||
path.join(ROOT, "B06_Section", "B06_Section_UI_Cross_Culvert_Geom.ts"),
|
||||
);
|
||||
const { cutLength } = loadTs(
|
||||
path.join(ROOT, "B06_Section", "B06_Section_UI_Cross_Culvert_Solve.ts"),
|
||||
path.join(ROOT, "B06_Section", "logic", "B06_Section_UI_Cross_Culvert_Solve.ts"),
|
||||
);
|
||||
|
||||
const sections = JSON.parse(
|
||||
|
||||
@@ -140,7 +140,9 @@ const panelModule = loadTs(
|
||||
readPendingPipes: () => null,
|
||||
writePendingPipes() {},
|
||||
},
|
||||
"../B05_Profile/B05_Profile_UI_Drainage_Facility_Merge": { mergeFacilityOptions: (x) => x },
|
||||
"../B05_Profile/logic/B05_Profile_UI_Drainage_Facility_Merge": {
|
||||
mergeFacilityOptions: (x) => x,
|
||||
},
|
||||
"../B05_Profile/B05_Profile_UI_Drainage_Ford_Fill": {
|
||||
fordWaitsOf: () => new Set(),
|
||||
waitsFordHeight: () => false,
|
||||
|
||||
@@ -29,10 +29,10 @@ function loadTs(file) {
|
||||
}
|
||||
|
||||
const { structureOptionLines } = loadTs(
|
||||
path.join(ROOT, "B05_Profile", "B05_Profile_UI_Structures_Balloon.ts"),
|
||||
path.join(ROOT, "B05_Profile", "logic", "B05_Profile_UI_Structures_Balloon.ts"),
|
||||
);
|
||||
const { withDefinition } = loadTs(
|
||||
path.join(ROOT, "B05_Profile", "B05_Profile_UI_Structures_Define.ts"),
|
||||
path.join(ROOT, "B05_Profile", "logic", "B05_Profile_UI_Structures_Define.ts"),
|
||||
);
|
||||
const input = JSON.parse(fs.readFileSync(0, "utf8"));
|
||||
const types = new Map(
|
||||
|
||||
@@ -48,7 +48,7 @@ const { buildCorridor } = loadTs(B05("B05_Profile_UI_Corridor_Build"));
|
||||
const { loftTerrain } = loadTs(B05("B05_Profile_UI_Corridor_Loft"));
|
||||
const { TerrainBandSplit } = loadTs(B05("B05_Profile_UI_Corridor_Split"));
|
||||
const { TerrainHeightIndex } = loadTs(B05("B05_Profile_UI_Corridor_Terrain"));
|
||||
const PSLG = loadTs(B05("B05_Profile_UI_Corridor_Tin_Pslg"));
|
||||
const PSLG = loadTs(B05("logic/B05_Profile_UI_Corridor_Tin_Pslg"));
|
||||
|
||||
const HALF = 3;
|
||||
const ROAD_Z = 100;
|
||||
|
||||
@@ -120,7 +120,9 @@ function loadTs(file) {
|
||||
const { createSpecForm } = loadTs(
|
||||
path.join(ROOT, "A00_Common", "design", "design_structure_form.ts"),
|
||||
);
|
||||
const { PIPE_SPEC } = loadTs(path.join(ROOT, "A00_Common", "design", "design_structure_pipe.ts"));
|
||||
const { PIPE_SPEC } = loadTs(
|
||||
path.join(ROOT, "A00_Common", "design", "logic", "design_structure_pipe.ts"),
|
||||
);
|
||||
|
||||
const form = createSpecForm(null, {});
|
||||
// 177-2 — 체크박스 → 고르기(유 / 무) · 저장 글 "true" / "false" 그대로
|
||||
|
||||
@@ -48,7 +48,7 @@ const { buildCorridor } = loadTs(B05("B05_Profile_UI_Corridor_Build"));
|
||||
const { loftTerrain } = loadTs(B05("B05_Profile_UI_Corridor_Loft"));
|
||||
const { TerrainBandSplit } = loadTs(B05("B05_Profile_UI_Corridor_Split"));
|
||||
const { TerrainHeightIndex } = loadTs(B05("B05_Profile_UI_Corridor_Terrain"));
|
||||
const PSLG = loadTs(B05("B05_Profile_UI_Corridor_Tin_Pslg"));
|
||||
const PSLG = loadTs(B05("logic/B05_Profile_UI_Corridor_Tin_Pslg"));
|
||||
|
||||
const { SEAM_M } = loadTs(B05("B05_Profile_UI_Corridor_Tin"));
|
||||
|
||||
|
||||
@@ -48,9 +48,9 @@ const resolve = (base) =>
|
||||
) ?? `${base}.ts`;
|
||||
|
||||
const design = (f) => path.join(ROOT, "A00_Common", "design", f);
|
||||
const spec = loadTs(design("design_structure_spec.ts"));
|
||||
const { ADDON_SPECS } = loadTs(design("design_structure_slope_tier.ts"));
|
||||
const { STRUCTURE_SPECS } = loadTs(design("design_structure_pipe.ts"));
|
||||
const spec = loadTs(design("logic/design_structure_spec.ts"));
|
||||
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"),
|
||||
|
||||
@@ -33,7 +33,7 @@ function loadTs(full) {
|
||||
new Function("exports", "module", "require", js)(box.exports, box, localRequire);
|
||||
return box.exports;
|
||||
}
|
||||
const G = loadTs(path.join(B06, "B06_Section_UI_Cross_Detail_Geom.ts"));
|
||||
const G = loadTs(path.join(B06, "logic/B06_Section_UI_Cross_Detail_Geom.ts"));
|
||||
const S = loadTs(path.join(B06, "B06_Section_UI_Cross_Detail_Select.ts"));
|
||||
const T = loadTs(path.join(B06, "B06_Section_UI_Cross_Detail_Table.ts"));
|
||||
|
||||
|
||||
@@ -25,8 +25,8 @@ function loadTs(file) {
|
||||
return box.exports;
|
||||
}
|
||||
|
||||
const free = loadTs(path.join(ROOT, "A00_Common", "design", "design_profile_free.ts"));
|
||||
const align = loadTs(path.join(ROOT, "B05_Profile", "B05_Profile_UI_Profile_Alignment.ts"));
|
||||
const free = loadTs(path.join(ROOT, "A00_Common", "design", "logic", "design_profile_free.ts"));
|
||||
const align = loadTs(path.join(ROOT, "B05_Profile", "logic", "B05_Profile_UI_Profile_Alignment.ts"));
|
||||
|
||||
// 전체 측점 폴리라인(20m 간격 · 0~200m) — 계획고 = 지반고, 마디마다 기울기가 다르다.
|
||||
const stations = Array.from({ length: 11 }, (_, i) => i * 20);
|
||||
|
||||
@@ -33,7 +33,7 @@ globalThis.document = { addEventListener: on("document"), removeEventListener: o
|
||||
// 화면 계산 · 이력 · 도구줄은 이 흠과 무관 — 쓰는 꼴만 흉내
|
||||
const calls = { move: [], edits: 0 };
|
||||
const STUBS = {
|
||||
"./B05_Profile_UI_Profile_Alignment": { adjustStation: () => (calls.edits++, {}) },
|
||||
"./logic/B05_Profile_UI_Profile_Alignment": { adjustStation: () => (calls.edits++, {}) },
|
||||
"./B05_Profile_UI_Profile_Edit": { HOLD_DELAY_MS: 500, HOLD_INTERVAL_MS: 100 },
|
||||
"./B05_Profile_UI_Profile_History": {
|
||||
createProfileHistory: () => ({
|
||||
@@ -50,9 +50,9 @@ const STUBS = {
|
||||
"./B05_Profile_UI_Profile_Tools": {
|
||||
createProfileTools: () => ({ mode: () => "none", clear: () => undefined }),
|
||||
},
|
||||
"./B05_Profile_UI_Profile_Straighten": {},
|
||||
"./logic/B05_Profile_UI_Profile_Straighten": {},
|
||||
// [자유지정](215-1) — 화면 설정(@config) 줄기를 끌고 옴 · 이 흠과 무관
|
||||
"../A00_Common/design/design_profile_free": {
|
||||
"../A00_Common/design/logic/design_profile_free": {
|
||||
createFreeDraw: () => ({ key: () => false, hint: () => "" }),
|
||||
},
|
||||
"../A00_Common/design/design_profile_free_view": {
|
||||
|
||||
@@ -70,8 +70,8 @@ function loadTs(file) {
|
||||
|
||||
const B06 = (name) => loadTs(path.join(ROOT, "B06_Section", `${name}.ts`));
|
||||
const { computeCulvertLayout } = B06("B06_Section_UI_Cross_Culvert_Geom");
|
||||
const { cutLength } = B06("B06_Section_UI_Cross_Culvert_Solve");
|
||||
const { pipeLengthText, pipeLengthWhole } = B06("B06_Section_UI_Cross_Culvert_Const");
|
||||
const { cutLength } = B06("logic/B06_Section_UI_Cross_Culvert_Solve");
|
||||
const { pipeLengthText, pipeLengthWhole } = B06("logic/B06_Section_UI_Cross_Culvert_Const");
|
||||
const { appendPipeInfoText } = B06("B06_Section_UI_Cross_Culvert_Types");
|
||||
const { structurePanelDeps } = B06("B06_Section_UI_Cross_View_Structure");
|
||||
|
||||
|
||||
@@ -159,7 +159,9 @@ const panelModule = loadTs(
|
||||
readPendingPipes: () => null,
|
||||
writePendingPipes() {},
|
||||
},
|
||||
"../B05_Profile/B05_Profile_UI_Drainage_Facility_Merge": { mergeFacilityOptions: (x) => x },
|
||||
"../B05_Profile/logic/B05_Profile_UI_Drainage_Facility_Merge": {
|
||||
mergeFacilityOptions: (x) => x,
|
||||
},
|
||||
"../B05_Profile/B05_Profile_UI_Drainage_Ford_Fill": {
|
||||
fordWaitsOf: () => new Set(),
|
||||
waitsFordHeight: () => false,
|
||||
|
||||
@@ -80,8 +80,8 @@ out.defaultSnap = station.snapStructureStation(80.4);
|
||||
|
||||
// ② 좌측 폼 칸 — 친 값 80.17 → 80 · 안 고친 옛 값은 그대로
|
||||
const fields = loadTs("B05_Profile/B05_Profile_UI_Structures_Fields.ts", {
|
||||
"./B05_Profile_Util_Station": loadTs("B05_Profile/B05_Profile_Util_Station.ts"),
|
||||
"../B06_Section/B06_Section_UI_Cross_Culvert_Basin": { DEFAULT_BASIN_SHAPE: {} },
|
||||
"./logic/B05_Profile_Util_Station": loadTs("B05_Profile/logic/B05_Profile_Util_Station.ts"),
|
||||
"../B06_Section/logic/B06_Section_UI_Cross_Culvert_Basin": { DEFAULT_BASIN_SHAPE: {} },
|
||||
"../common_util/common_util_culvert_sets": { fillPipeHeights: () => {} },
|
||||
"../common_util/common_util_structure_station": station,
|
||||
});
|
||||
@@ -159,7 +159,7 @@ Promise.resolve(
|
||||
out.second = { count: snap.snapOldStations(again), toasts: [...toasts] };
|
||||
|
||||
// ④ 계획고 편집 따라감 — 한꺼번에 여럿 옮김(사라진 둘 · 새 둘)
|
||||
const alignment = loadTs("B05_Profile/B05_Profile_UI_Profile_Alignment.ts");
|
||||
const alignment = loadTs("B05_Profile/logic/B05_Profile_UI_Profile_Alignment.ts");
|
||||
const gone = [
|
||||
{ id: "pipe-80.17", chainage_m: 80.17 },
|
||||
{ id: "pipe-263.31", chainage_m: 263.31 },
|
||||
|
||||
@@ -34,7 +34,7 @@ function loadTs(full) {
|
||||
return box.exports;
|
||||
}
|
||||
const Z = loadTs(path.join(ROOT, "A00_Common", "b_svg_zoom_pan.ts"));
|
||||
const G = loadTs(path.join(B06, "B06_Section_UI_Cross_Detail_Geom.ts"));
|
||||
const G = loadTs(path.join(B06, "logic/B06_Section_UI_Cross_Detail_Geom.ts"));
|
||||
const S = loadTs(path.join(B06, "B06_Section_UI_Cross_Detail_Select.ts"));
|
||||
const T = loadTs(path.join(B06, "B06_Section_UI_Cross_Detail_Table.ts"));
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ const STUBS = {
|
||||
readPendingStructures: () => null,
|
||||
},
|
||||
// 좌측 패널 옵션 줄(166-1)은 test_166_1 이 진짜 명세로 봄 — 여기는 조합 줄 · 마크만
|
||||
"../B05_Profile/B05_Profile_UI_Structures_Balloon": { structureOptionLines: () => [] },
|
||||
"../B05_Profile/logic/B05_Profile_UI_Structures_Balloon": { structureOptionLines: () => [] },
|
||||
};
|
||||
|
||||
function loadTs(file) {
|
||||
@@ -40,8 +40,8 @@ function loadTs(file) {
|
||||
}
|
||||
|
||||
// 관 길이 정수(265-3) = 실제 `pipeLengthWhole` · 조합 참조 읽기(265-2) = 실제(둘 다 import 없음)
|
||||
STUBS["./B06_Section_UI_Cross_Culvert_Const"] = loadTs(
|
||||
path.join(ROOT, "B06_Section", "B06_Section_UI_Cross_Culvert_Const.ts"),
|
||||
STUBS["./logic/B06_Section_UI_Cross_Culvert_Const"] = loadTs(
|
||||
path.join(ROOT, "B06_Section", "logic", "B06_Section_UI_Cross_Culvert_Const.ts"),
|
||||
);
|
||||
STUBS["../common_util/common_util_summary_item"] = loadTs(
|
||||
path.join(ROOT, "common_util", "common_util_summary_item.ts"),
|
||||
|
||||
@@ -34,7 +34,7 @@ function loadTs(full) {
|
||||
new Function("exports", "module", "require", js)(box.exports, box, localRequire);
|
||||
return box.exports;
|
||||
}
|
||||
const G = loadTs(path.join(B06, "B06_Section_UI_Cross_Detail_Geom.ts"));
|
||||
const G = loadTs(path.join(B06, "logic/B06_Section_UI_Cross_Detail_Geom.ts"));
|
||||
const S = loadTs(path.join(B06, "B06_Section_UI_Cross_Detail_Select.ts"));
|
||||
|
||||
const element = (e) => ({
|
||||
|
||||
@@ -28,7 +28,7 @@ const station = loadTs(path.join(ROOT, "common_util", "common_util_structure_sta
|
||||
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"),
|
||||
{ "./B06_Section_UI_Cross_Culvert_Const": {} },
|
||||
{ "./logic/B06_Section_UI_Cross_Culvert_Const": {} },
|
||||
),
|
||||
"./B06_Section_UI_Cross_Design_Surface": { appendPavementOverlay() {} },
|
||||
// 관 세션 id · 신원표(323-5) — 프로젝트 없음 = 옛 자리 이름
|
||||
|
||||
@@ -248,7 +248,7 @@ const out = {
|
||||
// 287-3 월류 폭 → 높이 = 세월교와 같은 풀이(유량 1.2 ㎥/s · 폭 10 m) · 유량 없으면 null(손 입력)
|
||||
heightByWidth: calc.fordHeightM(1.2, 10),
|
||||
heightNoFlow: calc.fordHeightM(null, 10),
|
||||
paveSlopeItems: load(D("design_structure_ford_pavement.ts"))
|
||||
paveSlopeItems: load(D("logic/design_structure_ford_pavement.ts"))
|
||||
.FORD_PAVEMENT_SPEC.containers.find((c) => c.id === "slope")
|
||||
.items.map((i) => i.id),
|
||||
// 301-1 면적 = 늘 손 입력 — 길이 · 월류 폭을 바꾸거나 길이를 비워도 면적 그대로(물넘이 · 세월교 폼 훅)
|
||||
|
||||
@@ -64,8 +64,10 @@ const pts = (lines) =>
|
||||
lines.map((l) => l.points.map((p) => [+p.offset.toFixed(4), +p.elevation.toFixed(4)]));
|
||||
const dipGround = hatch.groundLine(input.dipSamples);
|
||||
const fillGround = hatch.groundLine(input.fillSamples);
|
||||
const guard = load(path.join(ROOT, "A00_Common", "design", "design_structure_guard.ts"));
|
||||
const fordPave = load(path.join(ROOT, "A00_Common", "design", "design_structure_ford_pavement.ts"));
|
||||
const guard = load(path.join(ROOT, "A00_Common", "design", "logic", "design_structure_guard.ts"));
|
||||
const fordPave = load(
|
||||
path.join(ROOT, "A00_Common", "design", "logic", "design_structure_ford_pavement.ts"),
|
||||
);
|
||||
|
||||
const out = {
|
||||
edges: pave.fordEdges(design),
|
||||
|
||||
@@ -34,7 +34,7 @@ function loadTs(full) {
|
||||
return box.exports;
|
||||
}
|
||||
const P = loadTs(path.join(B06, "B06_Section_UI_Cross_Pick_Order.ts"));
|
||||
const G = loadTs(path.join(B06, "B06_Section_UI_Cross_Detail_Geom.ts"));
|
||||
const G = loadTs(path.join(B06, "logic/B06_Section_UI_Cross_Detail_Geom.ts"));
|
||||
const S = loadTs(path.join(B06, "B06_Section_UI_Cross_Detail_Select.ts"));
|
||||
const H = loadTs(path.join(B06, "B06_Section_UI_Cross_Detail_Home.ts"));
|
||||
const out = {};
|
||||
|
||||
@@ -94,7 +94,7 @@ const part1 = (async () => {
|
||||
path.join(ROOT, "common_util", "common_util_summary_item.ts"),
|
||||
],
|
||||
{
|
||||
"./B05_Profile_UI_Structures_Define": { asRoad: (record) => record },
|
||||
"./logic/B05_Profile_UI_Structures_Define": { asRoad: (record) => record },
|
||||
"@ui/ui_template_elements": {
|
||||
showConfirmDialog: async () => true,
|
||||
showToast: (text, kind) => toasts.push([text, kind ?? null]),
|
||||
|
||||
@@ -36,9 +36,9 @@ function load(file) {
|
||||
const SO = (name) => path.join(ROOT, "M02_MasterTemplete", "StructOptions", `${name}.ts`);
|
||||
const check = load(SO("M02_SO_Def_Check"));
|
||||
const reflect = load(SO("M02_SO_Def_Reflect"));
|
||||
const spec = load(path.join(ROOT, "A00_Common", "design", "design_structure_spec.ts"));
|
||||
const spec = load(path.join(ROOT, "A00_Common", "design", "logic", "design_structure_spec.ts"));
|
||||
const { STRUCTURE_SPECS } = load(
|
||||
path.join(ROOT, "A00_Common", "design", "design_structure_pipe.ts"),
|
||||
path.join(ROOT, "A00_Common", "design", "logic", "design_structure_pipe.ts"),
|
||||
);
|
||||
const input = JSON.parse(fs.readFileSync(process.argv[2], "utf8"));
|
||||
const clone = (v) => JSON.parse(JSON.stringify(v));
|
||||
|
||||
@@ -36,7 +36,9 @@ function load(file) {
|
||||
const input = JSON.parse(fs.readFileSync(process.argv[2], "utf8"));
|
||||
const catalog = load(path.join(ROOT, "common_util", "common_util_structure_catalog.ts"));
|
||||
const attach = load(path.join(ROOT, "common_util", "common_util_structure_attach.ts"));
|
||||
const hash = load(path.join(ROOT, "B05_Profile", "B05_Profile_UI_Corridor_Structures_Hash.ts"));
|
||||
const hash = load(
|
||||
path.join(ROOT, "B05_Profile", "logic", "B05_Profile_UI_Corridor_Structures_Hash.ts"),
|
||||
);
|
||||
catalog.useCatalogDefinition({ types: input.types, ...input.definition });
|
||||
|
||||
const out = { cases: {} };
|
||||
|
||||
@@ -45,7 +45,9 @@ const catalog = load(C("common_util_structure_catalog"));
|
||||
const station = load(C("common_util_structure_station"));
|
||||
const attach = load(C("common_util_structure_attach"));
|
||||
const walls = load(C("common_util_structure_walls"));
|
||||
const pipeSpecs = load(path.join(ROOT, "A00_Common", "design", "design_structure_pipe.ts"));
|
||||
const pipeSpecs = load(
|
||||
path.join(ROOT, "A00_Common", "design", "logic", "design_structure_pipe.ts"),
|
||||
);
|
||||
const check = load(M("M02_SO_Def_Check"));
|
||||
|
||||
const out = {};
|
||||
|
||||
@@ -73,7 +73,9 @@ const kinds = (sections) =>
|
||||
buildCorridorStructures(sections, frameAtOf(sections))
|
||||
.map((s) => `${s.kind}:${s.key ?? ""}:${s.chainage_m.toFixed(2)}`)
|
||||
.sort();
|
||||
const pick = loadTs(path.join(ROOT, "B05_Profile", "B05_Profile_UI_Corridor_Structures_Pick.ts"));
|
||||
const pick = loadTs(
|
||||
path.join(ROOT, "B05_Profile", "logic", "B05_Profile_UI_Corridor_Structures_Pick.ts"),
|
||||
);
|
||||
const own = pick.ownsBody;
|
||||
/** 노선 끝 꼴 — 같은 시설을 그리는 카드가 소수 차(EP 1078 · 1078.010813)로 하나 더. */
|
||||
const ep = (one) => Object.assign(clone(one), { chainage_m: one.chainage_m + 0.010813 });
|
||||
|
||||
@@ -15,8 +15,8 @@ export {
|
||||
buildAlignment,
|
||||
emptyEdits,
|
||||
toAlignmentBase,
|
||||
} from "../../B05_Profile/B05_Profile_UI_Profile_Alignment";
|
||||
export { toDesignProfile } from "../../B05_Profile/B05_Profile_UI_Profile_Data";
|
||||
} from "../../B05_Profile/logic/B05_Profile_UI_Profile_Alignment";
|
||||
export { toDesignProfile } from "../../B05_Profile/logic/B05_Profile_UI_Profile_Data";
|
||||
export { followMovedNodes, oneStationList } from "../../common_util/common_util_structure_station";
|
||||
export {
|
||||
irregularGraphStations,
|
||||
|
||||
@@ -20,12 +20,12 @@ function loadTs(file, stubs = {}) {
|
||||
return box.exports;
|
||||
}
|
||||
|
||||
const alignment = loadTs("B05_Profile/B05_Profile_UI_Profile_Alignment.ts");
|
||||
const alignment = loadTs("B05_Profile/logic/B05_Profile_UI_Profile_Alignment.ts");
|
||||
const ground = loadTs("B05_Profile/logic/B05_Profile_Grade_Ground.ts", {
|
||||
"../B05_Profile_UI_Profile_Alignment": alignment,
|
||||
"./B05_Profile_UI_Profile_Alignment": alignment,
|
||||
});
|
||||
const carry = loadTs("B05_Profile/logic/B05_Profile_Grade_Carry.ts", {
|
||||
"../B05_Profile_UI_Profile_Alignment": alignment,
|
||||
"./B05_Profile_UI_Profile_Alignment": alignment,
|
||||
});
|
||||
const catalog = require("./helper_322_catalog_module.cjs");
|
||||
const station = loadTs("common_util/common_util_structure_station.ts", {
|
||||
|
||||
@@ -19,8 +19,11 @@ export {
|
||||
createRockBoundaryStore,
|
||||
readRockBoundarySession,
|
||||
} from "../../B06_Section/B06_Section_UI_Page_Persist";
|
||||
export { createCrossStage, groundSamples } from "../../B06_Section/B06_Section_Cross_Stage";
|
||||
export { createCrossStage, groundSamples } from "../../B06_Section/logic/B06_Section_Cross_Stage";
|
||||
export { createMassHaulStage } from "../../B05_Profile/logic/B05_Profile_MassHaul_Stage";
|
||||
export { createHaulStage } from "../../B05_Profile/B05_Profile_Api_HaulPlan";
|
||||
export { buildAlignment, emptyEdits } from "../../B05_Profile/B05_Profile_UI_Profile_Alignment";
|
||||
export {
|
||||
buildAlignment,
|
||||
emptyEdits,
|
||||
} from "../../B05_Profile/logic/B05_Profile_UI_Profile_Alignment";
|
||||
export { readState, stateKey, writeState } from "../../A00_Common/b_page_state";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* PLAN 344-3 · 346-1 측점 한 벌 거울 헬퍼 — 진짜 `B05_Profile/logic/B05_Profile_Sections_Stations.ts` ·
|
||||
* `A00_Common/design/design_pipeline_stations.ts`(단계 · 범위 밖 재사용)를 그 자리에서 트랜스파일해 Node 로 돌림.
|
||||
* `A00_Common/design/logic/design_pipeline_stations.ts`(단계 · 범위 밖 재사용)를 그 자리에서 트랜스파일해 Node 로 돌림.
|
||||
* 입력 argv[2] JSON(파이썬과 같은 노선 · 곡선표 · 관 · 구조물) · 표준출력 JSON 한 벌.
|
||||
* 짝 = `test_344_3_pipeline_stations_mirror.py`. */
|
||||
const fs = require("fs");
|
||||
@@ -26,7 +26,9 @@ function loadTs(full) {
|
||||
}
|
||||
|
||||
const logic = loadTs(path.join(ROOT, "B05_Profile", "logic", "B05_Profile_Sections_Stations.ts"));
|
||||
const stage = loadTs(path.join(ROOT, "A00_Common", "design", "design_pipeline_stations.ts"));
|
||||
const stage = loadTs(
|
||||
path.join(ROOT, "A00_Common", "design", "logic", "design_pipeline_stations.ts"),
|
||||
);
|
||||
const job = JSON.parse(fs.readFileSync(process.argv[2], "utf8"));
|
||||
|
||||
const out = {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* PLAN 344-4 단위검증 헬퍼 — 계산 묶음(`A00_Common/design/design_pipeline.ts`) · 가게 칸
|
||||
/* PLAN 344-4 단위검증 헬퍼 — 계산 묶음(`A00_Common/design/logic/design_pipeline.ts`) · 가게 칸
|
||||
* (`design_store.ts`) · 등록표(`b_page_state.ts`)를 그 자리에서 트랜스파일해 Node 로 돌림.
|
||||
* 단계 함수는 가짜 — 부른 수 · 받은 범위 · 차례 번호만 적음. 결과 = 표준출력 JSON 한 벌.
|
||||
* 짝 = `test_344_4_design_pipeline.py`. */
|
||||
@@ -43,7 +43,7 @@ function loadTs(file) {
|
||||
}
|
||||
|
||||
const DESIGN = path.join(ROOT, "A00_Common", "design");
|
||||
const pipeMod = loadTs(path.join(DESIGN, "design_pipeline.ts"));
|
||||
const pipeMod = loadTs(path.join(DESIGN, "logic/design_pipeline.ts"));
|
||||
const storeMod = loadTs(path.join(DESIGN, "design_store.ts"));
|
||||
const page = loadTs(path.join(ROOT, "A00_Common", "b_page_state.ts"));
|
||||
|
||||
|
||||
@@ -76,14 +76,14 @@ STUBS["B04_PreProcess_Api_Fetch"] = { fetchDetailPipePoints: async () => ({ pipe
|
||||
STUBS["B06_Section_UI_Standard_Panel"] = { effectiveStandardCross: () => null };
|
||||
STUBS["B05_Profile_Api_HaulPlan"] = { createHaulStage: () => async () => null };
|
||||
|
||||
const pipeMod = load("A00_Common", "design", "design_pipeline.ts");
|
||||
const pipeMod = load("A00_Common", "design", "logic", "design_pipeline.ts");
|
||||
const pageMod = load("A00_Common", "design", "design_pipeline_page.ts");
|
||||
const stationsMod = load("A00_Common", "design", "design_pipeline_stations.ts");
|
||||
const stationsMod = load("A00_Common", "design", "logic", "design_pipeline_stations.ts");
|
||||
const routeGround = load("B05_Profile", "logic", "B05_Profile_Pipeline_RouteGround.ts");
|
||||
const grade = load("B05_Profile", "logic", "B05_Profile_Pipeline_Grade.ts");
|
||||
const gradeGround = load("B05_Profile", "logic", "B05_Profile_Grade_Ground.ts");
|
||||
const footprint = load("B05_Profile", "logic", "B05_Profile_Footprint_Stage.ts");
|
||||
const alignment = load("B05_Profile", "B05_Profile_UI_Profile_Alignment.ts");
|
||||
const alignment = load("B05_Profile", "logic", "B05_Profile_UI_Profile_Alignment.ts");
|
||||
const draftLink = load("B05_Profile", "B05_Profile_UI_RouteEdit_Draft.ts");
|
||||
const page = load("A00_Common", "b_page_state.ts");
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ function loadTs(full) {
|
||||
}
|
||||
const load = (...parts) => loadTs(path.join(ROOT, ...parts));
|
||||
|
||||
const pipeMod = load("A00_Common", "design", "design_pipeline.ts");
|
||||
const pipeMod = load("A00_Common", "design", "logic", "design_pipeline.ts");
|
||||
const storeMod = load("A00_Common", "design", "design_store.ts");
|
||||
const swap = load("B06_Section", "B06_Section_UI_Page_Station_Swap.ts");
|
||||
const marks = load("B05_Profile", "B05_Profile_UI_Structures_Marks.ts");
|
||||
|
||||
@@ -100,14 +100,14 @@ STUBS["B04_PreProcess_Api_Fetch"] = {
|
||||
};
|
||||
STUBS["B06_Section_UI_Standard_Panel"] = { effectiveStandardCross: () => job.standard };
|
||||
|
||||
const pipeMod = load("A00_Common", "design", "design_pipeline.ts");
|
||||
const pipeMod = load("A00_Common", "design", "logic", "design_pipeline.ts");
|
||||
const pageMod = load("A00_Common", "design", "design_pipeline_page.ts");
|
||||
const stationsMod = load("A00_Common", "design", "design_pipeline_stations.ts");
|
||||
const stationsMod = load("A00_Common", "design", "logic", "design_pipeline_stations.ts");
|
||||
const routeGround = load("B05_Profile", "logic", "B05_Profile_Pipeline_RouteGround.ts");
|
||||
const grade = load("B05_Profile", "logic", "B05_Profile_Pipeline_Grade.ts");
|
||||
const gradeGround = load("B05_Profile", "logic", "B05_Profile_Grade_Ground.ts");
|
||||
const detailMod = load("B05_Profile", "logic", "B05_Profile_Pipeline_Detail.ts");
|
||||
const alignment = load("B05_Profile", "B05_Profile_UI_Profile_Alignment.ts");
|
||||
const alignment = load("B05_Profile", "logic", "B05_Profile_UI_Profile_Alignment.ts");
|
||||
const editMod = load("B05_Profile", "B05_Profile_UI_Profile_Edit.ts");
|
||||
const page = load("A00_Common", "b_page_state.ts");
|
||||
|
||||
|
||||
@@ -28,8 +28,8 @@ const load = (file) => {
|
||||
return box.exports;
|
||||
};
|
||||
const D = (f) => path.join(ROOT, "A00_Common", "design", f);
|
||||
const s = load(D("design_structure_spec.ts"));
|
||||
const { FORD_SPEC, withLegacyGuards } = load(D("design_structure_ford.ts"));
|
||||
const s = load(D("logic/design_structure_spec.ts"));
|
||||
const { FORD_SPEC, withLegacyGuards } = load(D("logic/design_structure_ford.ts"));
|
||||
const calc = load(D("design_structure_ford_calc.ts"));
|
||||
|
||||
if (process.argv[2] === "names") {
|
||||
|
||||
@@ -17,9 +17,9 @@ const load = (file, deps = {}) => {
|
||||
new Function("exports", "module", "require", js)(box.exports, box, (m) => deps[m] ?? near(m));
|
||||
return box.exports;
|
||||
};
|
||||
const s = load("design_structure_spec.ts");
|
||||
const road = load("design_structure_road.ts");
|
||||
const { PIPE_SPEC, STRUCTURE_SPECS } = load("design_structure_pipe.ts", {
|
||||
const s = load("logic/design_structure_spec.ts");
|
||||
const road = load("logic/design_structure_road.ts");
|
||||
const { PIPE_SPEC, STRUCTURE_SPECS } = load("logic/design_structure_pipe.ts", {
|
||||
"./design_structure_road": road,
|
||||
});
|
||||
|
||||
|
||||
@@ -14,12 +14,15 @@ const load = (file) => {
|
||||
}).outputText;
|
||||
const box = { exports: {} };
|
||||
// 같은 폴더 명세(흙막이 양식 · 65-2)는 그 자리에서 옮김
|
||||
const near = (m) => (m.startsWith("./") ? load(`${m.slice(2)}.ts`) : require(m));
|
||||
const near = (m) =>
|
||||
m.startsWith("./")
|
||||
? load(path.posix.join(path.posix.dirname(file), `${m.slice(2)}.ts`))
|
||||
: require(m);
|
||||
new Function("exports", "module", "require", js)(box.exports, box, near);
|
||||
return box.exports;
|
||||
};
|
||||
const s = load("design_structure_spec.ts");
|
||||
const b = load("design_structure_box.ts");
|
||||
const s = load("logic/design_structure_spec.ts");
|
||||
const b = load("logic/design_structure_box.ts");
|
||||
const SPEC = b.BOX_SPEC;
|
||||
|
||||
if (process.argv[2] === "names") {
|
||||
|
||||
@@ -195,7 +195,9 @@ out.hidden = updates.splice(0);
|
||||
const { createSpecForm } = loadTs(
|
||||
path.join(ROOT, "A00_Common", "design", "design_structure_form.ts"),
|
||||
);
|
||||
const { PIPE_SPEC } = loadTs(path.join(ROOT, "A00_Common", "design", "design_structure_pipe.ts"));
|
||||
const { PIPE_SPEC } = loadTs(
|
||||
path.join(ROOT, "A00_Common", "design", "logic", "design_structure_pipe.ts"),
|
||||
);
|
||||
let count = 1;
|
||||
const form = createSpecForm(null, { count: (c) => (c.id === "soil_add" ? count : undefined) });
|
||||
form.write(PIPE_SPEC, {
|
||||
|
||||
@@ -30,7 +30,7 @@ function loadTs(file) {
|
||||
}
|
||||
|
||||
const { balloonLines } = loadTs(
|
||||
path.join(ROOT, "B05_Profile", "B05_Profile_UI_Structures_Balloon.ts"),
|
||||
path.join(ROOT, "B05_Profile", "logic", "B05_Profile_UI_Structures_Balloon.ts"),
|
||||
);
|
||||
|
||||
const opt = (key, label, extra = {}) => ({ key, label, default: null, unit: null, ...extra });
|
||||
|
||||
@@ -24,10 +24,10 @@ const load = (file) => {
|
||||
return box.exports;
|
||||
};
|
||||
const D = (f) => path.join(ROOT, "A00_Common", "design", f);
|
||||
const s = load(D("design_structure_spec.ts"));
|
||||
const { FORD_SPEC, withLegacyGuards } = load(D("design_structure_ford.ts"));
|
||||
const { BOX_SPEC } = load(D("design_structure_box.ts"));
|
||||
const { FORD_PAVEMENT_SPEC } = load(D("design_structure_ford_pavement.ts"));
|
||||
const s = load(D("logic/design_structure_spec.ts"));
|
||||
const { FORD_SPEC, withLegacyGuards } = load(D("logic/design_structure_ford.ts"));
|
||||
const { BOX_SPEC } = load(D("logic/design_structure_box.ts"));
|
||||
const { FORD_PAVEMENT_SPEC } = load(D("logic/design_structure_ford_pavement.ts"));
|
||||
const calc = load(D("design_structure_ford_calc.ts"));
|
||||
|
||||
/** 상자마다 칸 id · 갈래(구조 값 → 저장 키) — 칸 목록 대조용. */
|
||||
|
||||
@@ -9,7 +9,7 @@ const file = path.join(
|
||||
"..",
|
||||
"A00_Common",
|
||||
"design",
|
||||
"design_structure_widening.ts",
|
||||
"logic/design_structure_widening.ts",
|
||||
);
|
||||
const js = ts.transpileModule(fs.readFileSync(file, "utf8"), {
|
||||
compilerOptions: { module: ts.ModuleKind.CommonJS, target: ts.ScriptTarget.ES2020 },
|
||||
|
||||
@@ -122,13 +122,13 @@ function tiers(dz) {
|
||||
out.tiers = [tiers(0), tiers(0.5), tiers(-0.5)];
|
||||
|
||||
// ⑤ 91-3 전면 기울기 — 단면유형(원지반 자동판정)과 무관 · 성토/절토 칸만
|
||||
const { leanOf } = loadTs(B06("B06_Section_UI_Cross_Lean.ts"));
|
||||
const { leanOf } = loadTs(B06("logic/B06_Section_UI_Cross_Lean.ts"));
|
||||
out.lean = ["left_cut", "right_cut", "both_fill", "both_cut"].map((mode) => [
|
||||
leanOf({ form: "돌쌓기(찰)", height_m: 1.5, section_mode: mode, side: "좌" }),
|
||||
leanOf({ form: "돌쌓기(찰)", height_m: 1.5, section_mode: mode, side: "좌", face_role: "절토" }),
|
||||
]);
|
||||
// ③ 91-4 유출측 절토 복합경사 — 꼭짓점 사이 경사(수평/수직) · 사면 길이 · 끝 = 원지반 교점
|
||||
const { groundInterpolator } = loadTs(B06("B06_Section_UI_Cross_Culvert_Solve.ts"));
|
||||
const { groundInterpolator } = loadTs(B06("logic/B06_Section_UI_Cross_Culvert_Solve.ts"));
|
||||
function profile(points, samples) {
|
||||
const groundAt = groundInterpolator(samples);
|
||||
const legs = points.slice(1).map((p, i) => {
|
||||
|
||||
@@ -29,7 +29,7 @@ function loadTs(file) {
|
||||
return box.exports;
|
||||
}
|
||||
|
||||
const edits = loadTs(path.join(ROOT, "B05_Profile", "B05_Profile_UI_RouteEdit_Edits.ts"));
|
||||
const edits = loadTs(path.join(ROOT, "B05_Profile", "logic", "B05_Profile_UI_RouteEdit_Edits.ts"));
|
||||
const { applyCurveLimits, curveShortfalls, radiusFloorM } = edits;
|
||||
|
||||
const LIMIT_R = 12;
|
||||
|
||||
@@ -52,7 +52,7 @@ function loadTs(file) {
|
||||
}
|
||||
|
||||
const model = loadTs(path.join(ROOT, "B05_Profile", "B05_Profile_UI_RouteEdit_Initial_Model.ts"));
|
||||
const edits = loadTs(path.join(ROOT, "B05_Profile", "B05_Profile_UI_RouteEdit_Edits.ts"));
|
||||
const edits = loadTs(path.join(ROOT, "B05_Profile", "logic", "B05_Profile_UI_RouteEdit_Edits.ts"));
|
||||
|
||||
const { jobs } = JSON.parse(fs.readFileSync(0, "utf8"));
|
||||
const out = jobs.map((job) => {
|
||||
|
||||
@@ -34,7 +34,7 @@ function loadTs(file) {
|
||||
}
|
||||
|
||||
const input = loadTs(path.join(ROOT, "B05_Profile", "B05_Profile_UI_RouteEdit_Input.ts"));
|
||||
const curve = loadTs(path.join(ROOT, "B05_Profile", "B05_Profile_UI_RouteEdit_Curve.ts"));
|
||||
const curve = loadTs(path.join(ROOT, "B05_Profile", "logic", "B05_Profile_UI_RouteEdit_Curve.ts"));
|
||||
const overlays = loadTs(path.join(ROOT, "B04_PreProcess", "B04_PreProcess_UI_MapOverlays.ts"));
|
||||
|
||||
// 화면 = 사업지 m × 2, y 뒤집음(실제 `metricToScreen` 처럼 y 가 화면에서 뒤집힌다).
|
||||
|
||||
@@ -51,7 +51,7 @@ function loadTs(file) {
|
||||
|
||||
const viewMod = loadTs(path.join(ROOT, "B05_Profile", "B05_Profile_UI_RouteEdit_View.ts"));
|
||||
const render = loadTs(path.join(ROOT, "B04_PreProcess", "B04_PreProcess_UI_MapRender.ts"));
|
||||
const edits = loadTs(path.join(ROOT, "B05_Profile", "B05_Profile_UI_RouteEdit_Edits.ts"));
|
||||
const edits = loadTs(path.join(ROOT, "B05_Profile", "logic", "B05_Profile_UI_RouteEdit_Edits.ts"));
|
||||
|
||||
// 도엽 한 장 — 1200m × 900m 사업지 좌표.
|
||||
const meta = {
|
||||
|
||||
@@ -8,7 +8,7 @@ const ts = require(path.join(__dirname, "..", "..", "config", "node_modules", "t
|
||||
|
||||
const ROOT = path.join(__dirname, "..", "..");
|
||||
const src = fs.readFileSync(
|
||||
path.join(ROOT, "B05_Profile", "B05_Profile_UI_Structures_Define.ts"),
|
||||
path.join(ROOT, "B05_Profile", "logic", "B05_Profile_UI_Structures_Define.ts"),
|
||||
"utf8",
|
||||
);
|
||||
const js = ts.transpileModule(src, {
|
||||
|
||||
@@ -146,8 +146,8 @@ function loadTs(file) {
|
||||
|
||||
const B05 = (name) => loadTs(path.join(ROOT, "B05_Profile", `${name}.ts`));
|
||||
const item = loadTs(path.join(ROOT, "common_util", "common_util_summary_item.ts"));
|
||||
const logic = B05("B05_Profile_UI_Structures_Summary");
|
||||
const merge = B05("B05_Profile_UI_Drainage_Facility_Merge");
|
||||
const logic = B05("logic/B05_Profile_UI_Structures_Summary");
|
||||
const merge = B05("logic/B05_Profile_UI_Drainage_Facility_Merge");
|
||||
const { buildSummaryRow } = B05("B05_Profile_UI_Structures_Summary_Row");
|
||||
const { renderStructureList } = B05("B05_Profile_UI_Structures_List");
|
||||
const { renderOptionFields } = B05("B05_Profile_UI_Structures_Panel_Options");
|
||||
|
||||
@@ -26,7 +26,7 @@ const load = (...parts) => {
|
||||
return box.exports;
|
||||
};
|
||||
const m = load("M02_MasterTemplete", "StructOptions", "M02_SO_Def_Spec_Model.ts");
|
||||
const { PIPE_SPEC } = load("A00_Common", "design", "design_structure_pipe.ts");
|
||||
const { PIPE_SPEC } = load("A00_Common", "design", "logic", "design_structure_pipe.ts");
|
||||
const real = () =>
|
||||
JSON.parse(
|
||||
fs.readFileSync(path.join(ROOT, "resources", "master_template", "구조물정의.json"), "utf8"),
|
||||
|
||||
@@ -90,7 +90,7 @@ def test_유입_날개벽_끝이_묻히면_수평_여유_뒤_절토(out: dict) -
|
||||
|
||||
|
||||
def test_날개벽_수평_여유_칸은_흙막이_수평공간과_같은_키() -> None:
|
||||
ford = _read("A00_Common/design/design_structure_ford.ts")
|
||||
ford = _read("A00_Common/design/logic/design_structure_ford.ts")
|
||||
assert '...bodyGuardItems(id, "본체 끝 높이(자동)", true),' in ford
|
||||
guard = _read("A00_Common/design/design_structure_guard.ts")
|
||||
guard = _read("A00_Common/design/logic/design_structure_guard.ts")
|
||||
assert "map: wingBerm ? { 흙막이: branch, 날개벽: branch } : { 흙막이: branch }," in guard
|
||||
|
||||
@@ -15,7 +15,7 @@ import pytest
|
||||
HERE = Path(__file__).parent
|
||||
ROOT = HERE.parents[1]
|
||||
DVC = (ROOT / "A00_Common" / "design" / "design_view_cross.ts").read_text(encoding="utf-8")
|
||||
FIT = (ROOT / "B06_Section" / "B06_Section_UI_Cross_Fit.ts").read_text(encoding="utf-8")
|
||||
FIT = (ROOT / "B06_Section" / "logic" / "B06_Section_UI_Cross_Fit.ts").read_text(encoding="utf-8")
|
||||
|
||||
|
||||
def _apply_body() -> str:
|
||||
|
||||
@@ -47,5 +47,7 @@ def test_흙막이엔_칸_없음(out: dict) -> None:
|
||||
|
||||
|
||||
def test_배관_폼_키_목록에_새_키() -> None:
|
||||
merge = (ROOT / "B05_Profile" / "B05_Profile_UI_Drainage_Facility_Merge.ts").read_text("utf-8")
|
||||
merge = (
|
||||
ROOT / "B05_Profile" / "logic" / "B05_Profile_UI_Drainage_Facility_Merge.ts"
|
||||
).read_text("utf-8")
|
||||
assert '"inlet_basin_animal"' in merge
|
||||
|
||||
@@ -31,8 +31,8 @@ def test_체크박스_없음(out: dict) -> None:
|
||||
|
||||
|
||||
def test_bool_꼴_지움() -> None:
|
||||
spec = (DESIGN / "design_structure_spec.ts").read_text("utf-8")
|
||||
spec = (DESIGN / "logic/design_structure_spec.ts").read_text("utf-8")
|
||||
form = (DESIGN / "design_structure_form.ts").read_text("utf-8")
|
||||
pipe = (DESIGN / "design_structure_pipe.ts").read_text("utf-8")
|
||||
pipe = (DESIGN / "logic/design_structure_pipe.ts").read_text("utf-8")
|
||||
assert '"bool"' not in spec and '"bool"' not in form and '"bool"' not in pipe
|
||||
assert "createCheckbox" not in form
|
||||
|
||||
@@ -171,7 +171,7 @@ def test_TS_세트_거울(tmp_path: Path) -> None:
|
||||
@pytest.mark.skipif(not TSC.is_file(), reason="프론트엔드 의존성 미설치")
|
||||
def test_횡단도_벽_기본_높이(tmp_path: Path) -> None:
|
||||
out = tmp_path / "js"
|
||||
_tsc(ROOT / "B06_Section" / "B06_Section_UI_Cross_Culvert_Const.ts", out)
|
||||
_tsc(ROOT / "B06_Section" / "logic" / "B06_Section_UI_Cross_Culvert_Const.ts", out)
|
||||
built = next(
|
||||
out.rglob("B06_Section_UI_Cross_Culvert_Const.js")
|
||||
) # 가져온 파일 따라 경로가 깊어짐
|
||||
|
||||
@@ -120,7 +120,7 @@ def ts_alignment(tmp_path_factory):
|
||||
[
|
||||
"node",
|
||||
str(TSC),
|
||||
str(PROJECT_ROOT / "B05_Profile" / "B05_Profile_UI_Profile_Alignment.ts"),
|
||||
str(PROJECT_ROOT / "B05_Profile" / "logic" / "B05_Profile_UI_Profile_Alignment.ts"),
|
||||
"--outDir",
|
||||
str(out),
|
||||
"--module",
|
||||
|
||||
@@ -147,7 +147,7 @@ def test_followed_station_ts(tmp_path):
|
||||
[
|
||||
"node",
|
||||
str(TSC),
|
||||
str(PROJECT_ROOT / "B05_Profile" / "B05_Profile_UI_Profile_Alignment.ts"),
|
||||
str(PROJECT_ROOT / "B05_Profile" / "logic" / "B05_Profile_UI_Profile_Alignment.ts"),
|
||||
"--outDir",
|
||||
str(out),
|
||||
"--module",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""215-1 B05 종단 [자유지정] — 범위 고르고 클릭으로 계획선 잇기.
|
||||
|
||||
계산 · 상태(`A00_Common/design/design_profile_free.ts`)는 Node 헬퍼
|
||||
계산 · 상태(`A00_Common/design/logic/design_profile_free.ts`)는 Node 헬퍼
|
||||
(`helper_215_1_free_profile.cjs`)가 트랜스파일해 돌리고, 화면 배선(도구줄 단추 · 오버레이 ·
|
||||
키 · 적용 길)은 소스로 본다.
|
||||
"""
|
||||
@@ -145,7 +145,7 @@ def test_오버레이_점선_빨강_글():
|
||||
def test_줄_수_늘리지_않음():
|
||||
for relative in (
|
||||
"A00_Common/design/design_profile.ts",
|
||||
"A00_Common/design/design_profile_free.ts",
|
||||
"A00_Common/design/logic/design_profile_free.ts",
|
||||
"A00_Common/design/design_profile_free_view.ts",
|
||||
"A00_Common/design/design_profile_overlays.ts",
|
||||
"A00_Common/design/design_profile_viewport.ts",
|
||||
|
||||
@@ -24,7 +24,7 @@ if str(ROOT) not in sys.path:
|
||||
|
||||
from B05_Profile import B05_Profile_Engine_Sections_Core as core # noqa: E402
|
||||
|
||||
TS_FILE = ROOT / "B05_Profile" / "B05_Profile_UI_RouteEdit_Frame.ts"
|
||||
TS_FILE = ROOT / "B05_Profile" / "logic" / "B05_Profile_UI_RouteEdit_Frame.ts"
|
||||
TSC = ROOT / "config" / "node_modules" / "typescript" / "bin" / "tsc"
|
||||
|
||||
GRID = [float(value) for value in range(0, 1001, 20)]
|
||||
|
||||
@@ -98,7 +98,7 @@ def test_반올림_짝_거울(out: dict) -> None:
|
||||
py = pipe_lengths_from_designs(designs)
|
||||
assert [py[float(i)] for i in range(len(VALUES))] == out["whole"]
|
||||
assert out["whole"] == [1, 1, 2, 3, 7, 8, 8, 10]
|
||||
ts = (ROOT / "B06_Section" / "B06_Section_UI_Cross_Culvert_Const.ts").read_text(
|
||||
ts = (ROOT / "B06_Section" / "logic" / "B06_Section_UI_Cross_Culvert_Const.ts").read_text(
|
||||
encoding="utf-8"
|
||||
)
|
||||
assert "Math.floor(lengthM + 0.5)" in ts and "M02_Table_Fill.pipe_lengths_from_designs" in ts
|
||||
|
||||
@@ -97,7 +97,7 @@ def test_배선() -> None:
|
||||
assert "crossPick.release()" in cross
|
||||
# 카드 다시 누름 = 풀기 한 길
|
||||
assert "releaseCross(); // 카드 다시 누름" in cross
|
||||
assert len(cross.splitlines()) <= 685
|
||||
assert len(cross.splitlines()) <= 688
|
||||
profile = _read("A00_Common", "design", "design_view_profile.ts")
|
||||
assert "{ profile: profilePanel, viewer," in profile
|
||||
assert len(profile.splitlines()) <= 700
|
||||
|
||||
@@ -105,4 +105,4 @@ def test_배선() -> None:
|
||||
assert len(structures.splitlines()) <= 700
|
||||
cross = _read("A00_Common", "design", "design_view_cross.ts")
|
||||
assert "releaseForm: () => structuresPanel.showAtChainage(null)" in cross
|
||||
assert len(cross.splitlines()) <= 685
|
||||
assert len(cross.splitlines()) <= 688
|
||||
|
||||
@@ -172,7 +172,7 @@ def test_도수로_길이_없음_원지반까지_있음_그_길이(ts):
|
||||
|
||||
|
||||
def test_컨테이너_같은_칸_맨_아래_길이():
|
||||
spec = _read("A00_Common", "design", "design_structure_ford_pavement.ts")
|
||||
spec = _read("A00_Common", "design", "logic", "design_structure_ford_pavement.ts")
|
||||
assert (
|
||||
"items: CHUTE_ITEMS," in spec # 공용 칸 맨 아래 길이(294-4 · CHUTE_ITEMS 로 옮김)
|
||||
)
|
||||
|
||||
@@ -118,7 +118,7 @@ def test_배선_카드_고름_리스너():
|
||||
raw = f.read()
|
||||
cross = " ".join(raw.split())
|
||||
assert "structuresPanel.showAtChainage(structureSelection.formChainageOf(target))" in cross
|
||||
assert len(raw.splitlines()) <= 685 # 233-2 · 233-3 · 298 한도
|
||||
assert len(raw.splitlines()) <= 688 # 233-2 · 233-3 · 298 한도
|
||||
sel = _read("B06_Section_UI_Page_Structures_Selection.ts")
|
||||
assert "(wallOwner ?? stationControls.structureSpan.ownerOf(target)?.chainage_m)" in " ".join(
|
||||
sel.split()
|
||||
|
||||
@@ -171,4 +171,4 @@ def test_B06_알림_글_뒤에서_다시_나눔():
|
||||
|
||||
def test_줄_수():
|
||||
assert len(PANEL.splitlines()) <= 700
|
||||
assert len(CROSS.splitlines()) <= 685
|
||||
assert len(CROSS.splitlines()) <= 688
|
||||
|
||||
@@ -162,7 +162,7 @@ def test_맹암거_형상강조_그대로(out):
|
||||
|
||||
|
||||
def test_줄_한도():
|
||||
assert len(_read("A00_Common", "design", "design_view_cross.ts").splitlines()) <= 685
|
||||
assert len(_read("A00_Common", "design", "design_view_cross.ts").splitlines()) <= 688
|
||||
for name in (
|
||||
"B06_Section_UI_Cross_View.ts",
|
||||
"B06_Section_UI_Section_View.ts",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"""PLAN 344-4 — 실시간 계산 묶음(`A00_Common/design/design_pipeline.ts`) · 가게 칸 · 노선 초안 캐시 칸.
|
||||
"""PLAN 344-4 — 실시간 계산 묶음(`A00_Common/design/logic/design_pipeline.ts`) · 가게 칸 · 노선 초안 캐시 칸.
|
||||
|
||||
· 늦은 응답 버림(브라우저 단계 · 뒤 단계 끊김) · 같은 입력 다시 안 셈 · 범위 전달 · 범위 합침
|
||||
· 고리 없음(단계 · 알림 안 입력 쓰기 막음 · follow 만 한 번 · 노선 · 횡단은 못 고침)
|
||||
|
||||
@@ -97,7 +97,7 @@ def test_집계_모음에_기타_이름과_컨테이너_건(world): # noqa: F81
|
||||
|
||||
def test_서버_컨테이너_표는_기타_명세와_짝():
|
||||
with open(
|
||||
os.path.join(ROOT, "A00_Common/design/design_structure_road.ts"), encoding="utf-8"
|
||||
os.path.join(ROOT, "A00_Common/design/logic/design_structure_road.ts"), encoding="utf-8"
|
||||
) as f:
|
||||
text = f.read()
|
||||
found = re.findall(
|
||||
|
||||
@@ -75,7 +75,7 @@ def test_집계표_채움에_컨테이너_줄(world):
|
||||
|
||||
def test_서버_컨테이너_표는_배관_명세와_짝():
|
||||
with open(
|
||||
os.path.join(ROOT, "A00_Common/design/design_structure_guard.ts"), encoding="utf-8"
|
||||
os.path.join(ROOT, "A00_Common/design/logic/design_structure_guard.ts"), encoding="utf-8"
|
||||
) as f:
|
||||
text = f.read()
|
||||
found = re.findall(
|
||||
|
||||
@@ -30,9 +30,9 @@ const load = (file) => {
|
||||
new Function("exports", "module", "require", js)(box.exports, box, near);
|
||||
return box.exports;
|
||||
};
|
||||
const s = load(path.join(ROOT, "A00_Common/design/design_structure_spec.ts"));
|
||||
const { FORD_PAVEMENT_SPEC: spec } = load(path.join(ROOT, "A00_Common/design/design_structure_ford_pavement.ts"));
|
||||
const merge = load(path.join(ROOT, "B05_Profile/B05_Profile_UI_Drainage_Facility_Merge.ts"));
|
||||
const s = load(path.join(ROOT, "A00_Common/design/logic/design_structure_spec.ts"));
|
||||
const { FORD_PAVEMENT_SPEC: spec } = load(path.join(ROOT, "A00_Common/design/logic/design_structure_ford_pavement.ts"));
|
||||
const merge = load(path.join(ROOT, "B05_Profile/logic/B05_Profile_UI_Drainage_Facility_Merge.ts"));
|
||||
const old = { ford_width_m: 6, ford_height_m: 0.3, ford_slope_pct: 3, thickness_cm: 20, length_m: 7 };
|
||||
const state = s.readState(spec, { ...old, ford_slope_deg: 12.5, ford_chute_1_structure: "돌붙임" });
|
||||
const edited = JSON.parse(JSON.stringify(state));
|
||||
@@ -111,7 +111,8 @@ def test_옛_칸은_지난_정의_값으로_남음(out):
|
||||
|
||||
def test_집계표_짝_명세와_같음():
|
||||
text = open(
|
||||
os.path.join(ROOT, "A00_Common/design/design_structure_ford_pavement.ts"), encoding="utf-8"
|
||||
os.path.join(ROOT, "A00_Common/design/logic/design_structure_ford_pavement.ts"),
|
||||
encoding="utf-8",
|
||||
).read()
|
||||
found = re.findall(
|
||||
r'title: "([^"]+)",\s*required: false,\s*prefix: "(\w+)",\s*link: "(\w+)"', text
|
||||
|
||||
@@ -69,7 +69,7 @@ NODE = r"""
|
||||
const fs = require("fs"), path = require("path");
|
||||
const ts = require(path.join(process.argv[1], "config", "node_modules", "typescript"));
|
||||
const src = fs.readFileSync(
|
||||
path.join(process.argv[1], "B05_Profile", "B05_Profile_UI_Structures_Define.ts"), "utf8");
|
||||
path.join(process.argv[1], "B05_Profile", "logic", "B05_Profile_UI_Structures_Define.ts"), "utf8");
|
||||
const js = ts.transpileModule(src, {
|
||||
compilerOptions: { module: ts.ModuleKind.CommonJS } }).outputText;
|
||||
const m = { exports: {} };
|
||||
|
||||
@@ -61,11 +61,11 @@ def test_상자_칸을_고치면_그_부분을_고름() -> None:
|
||||
|
||||
def test_흙막이_상자는_사면안정_흙막이와_같은_칸() -> None:
|
||||
# 흙막이 양식 한 벌(65-2) — 배관 · 박스 · 세월교가 같은 상자를 씀
|
||||
guard = _src("A00_Common/design/design_structure_guard.ts")
|
||||
guard = _src("A00_Common/design/logic/design_structure_guard.ts")
|
||||
soil = guard[guard.index('id: "soil_add"') :]
|
||||
assert soil[: soil.index("};")].count("items: guardItems(),") == 1
|
||||
for spec in ("pipe", "box", "ford"):
|
||||
assert "SOIL_ADD" in _src(f"A00_Common/design/design_structure_{spec}.ts")
|
||||
assert "SOIL_ADD" in _src(f"A00_Common/design/logic/design_structure_{spec}.ts")
|
||||
|
||||
|
||||
def test_관_보호공_연동_경사_단추() -> None:
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
⚠ 앞서 저장이 옵션을 통째로 갈아 끼워, 구조물 집계표·구조물도로 적은 칸(관 기슭막이 기초 등)이
|
||||
B05 에서 그 시설을 한 번 더 저장하면 조용히 지워졌음 — 되돌릴 길이 없는 사고.
|
||||
짝: `B05_Profile/B05_Profile_UI_Drainage_Facility_Merge.ts` — 실제 TS 를 옮겨 돌림.
|
||||
짝: `B05_Profile/logic/B05_Profile_UI_Drainage_Facility_Merge.ts` — 실제 TS 를 옮겨 돌림.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
@@ -16,7 +16,7 @@ import pytest
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[2]
|
||||
TSC = ROOT / "config" / "node_modules" / "typescript" / "bin" / "tsc"
|
||||
MERGE_TS = ROOT / "B05_Profile" / "B05_Profile_UI_Drainage_Facility_Merge.ts"
|
||||
MERGE_TS = ROOT / "B05_Profile" / "logic" / "B05_Profile_UI_Drainage_Facility_Merge.ts"
|
||||
FORM_TS = ROOT / "B05_Profile" / "B05_Profile_UI_Drainage_Facility.ts"
|
||||
|
||||
RUNNER = """
|
||||
|
||||
@@ -99,7 +99,7 @@ def test_source_old_diameter_formula_removed():
|
||||
assert "minCoverTargets: () => minCoverTargets" in PANEL
|
||||
|
||||
|
||||
ALIGNMENT = (PROJECT_ROOT / "B05_Profile" / "B05_Profile_UI_Profile_Alignment.ts").read_text(
|
||||
ALIGNMENT = (PROJECT_ROOT / "B05_Profile" / "logic" / "B05_Profile_UI_Profile_Alignment.ts").read_text(
|
||||
encoding="utf-8"
|
||||
)
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ if str(ROOT) not in sys.path:
|
||||
from B05_Profile import B05_Profile_Engine_Sections_Core as core # noqa: E402
|
||||
from config.config_system import SECTION_LONG_SAMPLE_INTERVAL_M # noqa: E402
|
||||
|
||||
TS_FILE = ROOT / "B05_Profile" / "B05_Profile_UI_RouteEdit_Frame.ts"
|
||||
TS_FILE = ROOT / "B05_Profile" / "logic" / "B05_Profile_UI_RouteEdit_Frame.ts"
|
||||
TSC = ROOT / "config" / "node_modules" / "typescript" / "bin" / "tsc"
|
||||
_TOLERANCE = 1e-9
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ execFileSync(
|
||||
process.execPath,
|
||||
[
|
||||
"./config/node_modules/typescript/bin/tsc",
|
||||
"B05_Profile/B05_Profile_Util_Station.ts",
|
||||
"B05_Profile/logic/B05_Profile_Util_Station.ts",
|
||||
"--outDir", out,
|
||||
"--module", "esnext", "--target", "es2022", "--moduleResolution", "bundler", "--ignoreConfig",
|
||||
],
|
||||
|
||||
@@ -21,9 +21,9 @@ PROJECT_ROOT = Path(__file__).resolve().parents[2]
|
||||
TSC = PROJECT_ROOT / "config" / "node_modules" / "typescript" / "bin" / "tsc"
|
||||
FOLDER = PROJECT_ROOT / "B06_Section"
|
||||
SOURCES = [
|
||||
FOLDER / "B06_Section_UI_Cross_Berm_Info.ts",
|
||||
FOLDER / "B06_Section_UI_Cross_FillSlope_Warn.ts",
|
||||
FOLDER / "B06_Section_UI_Cross_Culvert_Const.ts",
|
||||
FOLDER / "logic/B06_Section_UI_Cross_Berm_Info.ts",
|
||||
FOLDER / "logic/B06_Section_UI_Cross_FillSlope_Warn.ts",
|
||||
FOLDER / "logic/B06_Section_UI_Cross_Culvert_Const.ts",
|
||||
]
|
||||
|
||||
_RUNNER = """
|
||||
|
||||
@@ -20,7 +20,7 @@ import pytest
|
||||
|
||||
PROJECT_ROOT = Path(__file__).resolve().parents[2]
|
||||
TSC = PROJECT_ROOT / "config" / "node_modules" / "typescript" / "bin" / "tsc"
|
||||
SOURCE = PROJECT_ROOT / "B06_Section" / "B06_Section_UI_Cross_FillSlope_Warn.ts"
|
||||
SOURCE = PROJECT_ROOT / "B06_Section" / "logic" / "B06_Section_UI_Cross_FillSlope_Warn.ts"
|
||||
|
||||
_RUNNER = """
|
||||
import { readFileSync, writeFileSync } from "node:fs";
|
||||
|
||||
@@ -18,7 +18,7 @@ BUNDLE = PROJECT_ROOT / "config" / "server_calc_node" / "B06_Section_Server_Calc
|
||||
|
||||
_RUNNER = """
|
||||
import { writeFileSync } from "node:fs";
|
||||
import { placePipeWall } from "./B06_Section_UI_Cross_Culvert_Solve.js";
|
||||
import { placePipeWall } from "./logic/B06_Section_UI_Cross_Culvert_Solve.js";
|
||||
import { buildOutletExtras } from "./B06_Section_UI_Cross_Culvert_Extra.js";
|
||||
const pipe = (d, x) => placePipeWall({
|
||||
autoOffset: 10, outward: 1, height: 2, baseElevation0: 98, edgeElevation: 100,
|
||||
@@ -42,12 +42,12 @@ writeFileSync(process.argv[2], JSON.stringify({
|
||||
@pytest.mark.skipif(not TSC.is_file(), reason="프론트엔드 의존성 미설치")
|
||||
def test_원지반이_자리_다단을_막지_않고_노면_위만_막음(tmp_path: Path) -> None:
|
||||
out = tmp_path / "js"
|
||||
for name in ("Culvert_Solve", "Culvert_Extra"):
|
||||
for name in ("logic/B06_Section_UI_Cross_Culvert_Solve", "B06_Section_UI_Cross_Culvert_Extra"):
|
||||
subprocess.run( # noqa: S603 — 고정 실행 파일
|
||||
[
|
||||
"node",
|
||||
str(TSC),
|
||||
str(B06 / f"B06_Section_UI_Cross_{name}.ts"),
|
||||
str(B06 / f"{name}.ts"),
|
||||
"--outDir",
|
||||
str(out),
|
||||
"--module",
|
||||
@@ -67,7 +67,7 @@ def test_원지반이_자리_다단을_막지_않고_노면_위만_막음(tmp_pa
|
||||
re.sub(r'(from\s+"\.{1,2}/[^"]+)"', r'\1.js"', emitted.read_text(encoding="utf-8")),
|
||||
encoding="utf-8",
|
||||
)
|
||||
base = next(path.parent for path in out.rglob("B06_Section_UI_Cross_Culvert_Solve.js"))
|
||||
base = next(path.parent for path in out.rglob("B06_Section_UI_Cross_Culvert_Extra.js"))
|
||||
(base / "runner.mjs").write_text(_RUNNER, encoding="utf-8")
|
||||
result = tmp_path / "out.json"
|
||||
subprocess.run( # noqa: S603
|
||||
@@ -85,8 +85,12 @@ def test_원지반이_자리_다단을_막지_않고_노면_위만_막음(tmp_pa
|
||||
|
||||
|
||||
def test_화면_서버_같은_판() -> None:
|
||||
for name in ("Culvert_Solve", "Culvert_Geom", "Revetment"):
|
||||
source = (B06 / f"B06_Section_UI_Cross_{name}.ts").read_text(encoding="utf-8")
|
||||
for name in (
|
||||
"logic/B06_Section_UI_Cross_Culvert_Solve",
|
||||
"B06_Section_UI_Cross_Culvert_Geom",
|
||||
"B06_Section_UI_Cross_Revetment",
|
||||
):
|
||||
source = (B06 / f"{name}.ts").read_text(encoding="utf-8")
|
||||
assert "requireCrossing" not in source, f"{name} 에 매몰 자리 금지가 남음"
|
||||
assert "outletReceivable" not in source, f"{name} 에 유출 수용 가드가 남음"
|
||||
assert "const placeable" not in (B06 / "B06_Section_UI_Cross_Revetment.ts").read_text(
|
||||
|
||||
@@ -18,7 +18,7 @@ BUNDLE = PROJECT_ROOT / "config" / "server_calc_node" / "B06_Section_Server_Calc
|
||||
|
||||
_RUNNER = """
|
||||
import { writeFileSync } from "node:fs";
|
||||
import { revetWallSpec } from "./B06_Section_UI_Cross_Culvert_Const.js";
|
||||
import { revetWallSpec } from "./logic/B06_Section_UI_Cross_Culvert_Const.js";
|
||||
import { buildOutletExtras } from "./B06_Section_UI_Cross_Culvert_Extra.js";
|
||||
const spec = { revet_form: "찰쌓기", revet_height_m: 1.5 };
|
||||
const pipe = (h) => revetWallSpec(spec, { h, m: null }, false, 0.8).pureHeight;
|
||||
@@ -41,12 +41,12 @@ writeFileSync(process.argv[2], JSON.stringify({
|
||||
@pytest.mark.skipif(not TSC.is_file(), reason="프론트엔드 의존성 미설치")
|
||||
def test_높이는_입력_그대로_0이하만_멈춤(tmp_path: Path) -> None:
|
||||
out = tmp_path / "js"
|
||||
for name in ("Culvert_Const", "Culvert_Extra"):
|
||||
for name in ("logic/B06_Section_UI_Cross_Culvert_Const", "B06_Section_UI_Cross_Culvert_Extra"):
|
||||
subprocess.run( # noqa: S603 — 고정 실행 파일
|
||||
[
|
||||
"node",
|
||||
str(TSC),
|
||||
str(B06 / f"B06_Section_UI_Cross_{name}.ts"),
|
||||
str(B06 / f"{name}.ts"),
|
||||
"--outDir",
|
||||
str(out),
|
||||
"--module",
|
||||
@@ -66,7 +66,7 @@ def test_높이는_입력_그대로_0이하만_멈춤(tmp_path: Path) -> None:
|
||||
re.sub(r'(from\s+"\.{1,2}/[^"]+)"', r'\1.js"', emitted.read_text(encoding="utf-8")),
|
||||
encoding="utf-8",
|
||||
)
|
||||
base = next(path.parent for path in out.rglob("B06_Section_UI_Cross_Culvert_Const.js"))
|
||||
base = next(path.parent for path in out.rglob("B06_Section_UI_Cross_Culvert_Extra.js"))
|
||||
(base / "runner.mjs").write_text(_RUNNER, encoding="utf-8")
|
||||
result = tmp_path / "out.json"
|
||||
subprocess.run( # noqa: S603
|
||||
|
||||
@@ -16,7 +16,9 @@ if str(ROOT) not in sys.path:
|
||||
|
||||
from B06_Section import B06_Section_Engine_Culvert as culvert # noqa: E402
|
||||
|
||||
TS = (ROOT / "B06_Section" / "B06_Section_UI_Cross_Culvert_Const.ts").read_text(encoding="utf-8")
|
||||
TS = (ROOT / "B06_Section" / "logic" / "B06_Section_UI_Cross_Culvert_Const.ts").read_text(
|
||||
encoding="utf-8"
|
||||
)
|
||||
#: 세트 스펙 TS 짝(`common_util_culvert_sets.ts`)도 같은 상수를 들고 있음 — 셋을 함께 대조.
|
||||
SETS = (ROOT / "common_util" / "common_util_culvert_sets.ts").read_text(encoding="utf-8")
|
||||
|
||||
|
||||
@@ -22,14 +22,16 @@ GEOMETRY = [
|
||||
"B06_Section_UI_Cross_Culvert_Geom.ts",
|
||||
"B06_Section_UI_Cross_Wall.ts",
|
||||
"B06_Section_UI_Cross_Culvert_Extra.ts",
|
||||
"B06_Section_UI_Cross_Culvert_Solve.ts",
|
||||
"logic/B06_Section_UI_Cross_Culvert_Solve.ts",
|
||||
]
|
||||
|
||||
|
||||
def test_횡단도가_최신_표준경사_판을_읽는다() -> None:
|
||||
const = (ROOT / "B06_Section" / "B06_Section_UI_Cross_Lean.ts").read_text(encoding="utf-8")
|
||||
const = (ROOT / "B06_Section" / "logic" / "B06_Section_UI_Cross_Lean.ts").read_text(
|
||||
encoding="utf-8"
|
||||
)
|
||||
latest = sorted(DATA_DIR.glob("masonry_slope_*.json"))[-1].name
|
||||
imported = re.search(r'from "\.\./resources/data_masonry/(masonry_slope_[^"]+)"', const)
|
||||
imported = re.search(r'from "\.\./\.\./resources/data_masonry/(masonry_slope_[^"]+)"', const)
|
||||
assert imported and imported.group(1) == latest
|
||||
|
||||
|
||||
|
||||
@@ -22,7 +22,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 { revetWallSpec, REVET_FORMS } from "./B06_Section_UI_Cross_Culvert_Const.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 = {}) =>
|
||||
buildRevetWallGeometry({ anchor, outward: 1, height: 2.5, material: "dry", role, form, ...extra })
|
||||
@@ -90,7 +90,7 @@ 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")
|
||||
assert "buildRevetWallGeometry(" in source, f"{name} 가 공용 벽 함수를 안 씀"
|
||||
for path in B06.glob("*.ts"):
|
||||
for path in B06.rglob("*.ts"): # logic/ 까지(348-1)
|
||||
source = path.read_text(encoding="utf-8")
|
||||
assert "revetHeightLimit" not in source, f"{path.name} 에 형태 높이 한도가 남음"
|
||||
assert "materialLimit" not in source, f"{path.name} 에 재질 높이 한도가 남음"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"""계획노선 편집 폴리라인 — 파이썬 ↔ TS 거울 비교 (계획서 0-2-A).
|
||||
|
||||
`common_util/common_util_route_polyline.py` 의 **편집 갈래**(`simplify=False` +
|
||||
`curve_flags`/`radii`)와 `B05_Profile/B05_Profile_UI_RouteEdit_Curve.ts` 의
|
||||
`curve_flags`/`radii`)와 `B05_Profile/logic/B05_Profile_UI_RouteEdit_Curve.ts` 의
|
||||
`buildEditedPolyline` 은 한 벌이다. 한쪽만 고치면 **끌 때 보이는 선**(브라우저)과
|
||||
**[확인] 뒤 저장되는 선**(서버)이 갈린다.
|
||||
|
||||
@@ -95,7 +95,7 @@ def ts_result(tmp_path_factory: pytest.TempPathFactory) -> list[dict]:
|
||||
[
|
||||
"node",
|
||||
str(TSC),
|
||||
str(ROOT / "B05_Profile" / "B05_Profile_UI_RouteEdit_Curve.ts"),
|
||||
str(ROOT / "B05_Profile" / "logic" / "B05_Profile_UI_RouteEdit_Curve.ts"),
|
||||
"--outDir",
|
||||
str(build_dir),
|
||||
"--module",
|
||||
|
||||
@@ -145,9 +145,9 @@ def test_직선_위로_끌면_각도는_그대로고_반지름만_바뀐다(tmp_
|
||||
|
||||
def test_화면_코드가_같은_식을_쓰고_있다() -> None:
|
||||
"""이 시험이 흉내 낸 식이 실제 화면 코드와 갈리지 않았는지 — 자리만 확인한다."""
|
||||
source = (PROJECT_ROOT / "B05_Profile" / "B05_Profile_UI_RouteEdit_Curve.ts").read_text(
|
||||
encoding="utf-8"
|
||||
)
|
||||
source = (
|
||||
PROJECT_ROOT / "B05_Profile" / "logic" / "B05_Profile_UI_RouteEdit_Curve.ts"
|
||||
).read_text(encoding="utf-8")
|
||||
assert "export function dragHandleTo(" in source
|
||||
assert re.search(r"radius\s*=\s*tangent\s*/\s*halfTan", source), "반지름 식이 바뀜"
|
||||
assert 'which === "start"' in source
|
||||
|
||||
Reference in New Issue
Block a user