From dd7300aa0234762e39d8df09026bda3ba57524cc Mon Sep 17 00:00:00 2001 From: umsangdon Date: Sun, 27 Sep 2026 20:16:46 +0900 Subject: [PATCH] =?UTF-8?q?fix(M02):=20=EA=B5=AC=EC=A1=B0=EB=AC=BC=C2=B7?= =?UTF-8?q?=EB=8F=84=EB=A9=B4=20=EB=B9=88=20=EB=AC=B8=EC=84=9C=EC=97=90=20?= =?UTF-8?q?=EA=B8=B0=EB=B3=B8=20=EB=8F=84=EB=A9=B4=EC=B8=B5=20=EC=B1=84?= =?UTF-8?q?=EC=9B=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Store.py create_structure · UI_Side.ts stubDoc(도면 양식 「새로」) 둘 다 빈 CAD 문서에 기본 도면층 하나(id·name "기본") 넣음 — 없으면 sub1 이 고친 CAD import 가드가 대신 채우지만 뿌리도 처음부터 채움 - 이미 만들어진 구조물 도면 49개(resources/master_template/structure/*.json) 도면.layers 채움(한 번 도는 정리) — 다른 칸·도번은 그대로 · 줄바꿈도 그대로 - 시험(test_m02_structure.py) — 새 문서 layers 1개 확인으로 바꿈 검증: M02 시험 28개 · 루트 npm run typecheck 통과. ORCA 로 확인 — 빈 구조물 도면(rv) 오류 없이 열림 · 도면 양식 「새로」 빈 도면 오류 없이 열림 · 실제 선 하나 넣어 저장 → 다시 열기 → 화면에 그대로 · [저장] 단추로도 저장됨 (검증 뒤 rv 는 원래 빈 문서로 되돌림 · 검증용 임시 양식은 지움). Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01EUypcnp5d1gU2aeKh9F2H7 --- M02_MasterTemplete/M02_MasterTemplete_Store.py | 6 +++++- M02_MasterTemplete/M02_MasterTemplete_UI_Side.ts | 8 +++++++- resources/master_template/structure/be.json | 10 +++++++++- resources/master_template/structure/bg.json | 10 +++++++++- resources/master_template/structure/bm_area.json | 10 +++++++++- resources/master_template/structure/bm_len.json | 10 +++++++++- resources/master_template/structure/bx_len.json | 10 +++++++++- resources/master_template/structure/bx_wing.json | 10 +++++++++- resources/master_template/structure/cs.json | 10 +++++++++- resources/master_template/structure/ec.json | 10 +++++++++- resources/master_template/structure/etc.json | 10 +++++++++- resources/master_template/structure/fb.json | 10 +++++++++- resources/master_template/structure/fp_l.json | 10 +++++++++- resources/master_template/structure/fp_w.json | 10 +++++++++- resources/master_template/structure/gr_curb.json | 10 +++++++++- resources/master_template/structure/gr_rail.json | 10 +++++++++- resources/master_template/structure/gr_sign.json | 10 +++++++++- resources/master_template/structure/h_break.json | 10 +++++++++- resources/master_template/structure/h_ford_basin.json | 10 +++++++++- resources/master_template/structure/h_intake.json | 10 +++++++++- resources/master_template/structure/h_pg_rail.json | 10 +++++++++- resources/master_template/structure/h_pv_rail.json | 10 +++++++++- resources/master_template/structure/h_rip_c.json | 10 +++++++++- resources/master_template/structure/h_rip_m.json | 10 +++++++++- resources/master_template/structure/h_rockfall.json | 10 +++++++++- resources/master_template/structure/h_soil_ditch.json | 10 +++++++++- resources/master_template/structure/h_stone_bed.json | 10 +++++++++- resources/master_template/structure/h_stone_ch.json | 10 +++++++++- resources/master_template/structure/h_waste.json | 10 +++++++++- resources/master_template/structure/memo.json | 10 +++++++++- resources/master_template/structure/mr.json | 10 +++++++++- resources/master_template/structure/ms.json | 10 +++++++++- resources/master_template/structure/no.json | 10 +++++++++- resources/master_template/structure/od_cnt.json | 10 +++++++++- resources/master_template/structure/od_len.json | 10 +++++++++- resources/master_template/structure/pg_in.json | 10 +++++++++- resources/master_template/structure/pp_cp.json | 10 +++++++++- resources/master_template/structure/pp_len.json | 10 +++++++++- resources/master_template/structure/ps.json | 10 +++++++++- resources/master_template/structure/pv_a.json | 10 +++++++++- resources/master_template/structure/pv_b.json | 10 +++++++++- resources/master_template/structure/pv_jt.json | 10 +++++++++- resources/master_template/structure/pv_l.json | 10 +++++++++- resources/master_template/structure/pv_w.json | 10 +++++++++- resources/master_template/structure/rf.json | 10 +++++++++- resources/master_template/structure/rv.json | 10 +++++++++- resources/master_template/structure/rw.json | 10 +++++++++- resources/master_template/structure/sg.json | 10 +++++++++- resources/master_template/structure/sta.json | 10 +++++++++- resources/master_template/structure/ta.json | 10 +++++++++- resources/master_template/structure/wy.json | 10 +++++++++- resources/tester/test_m02_structure.py | 6 ++++-- 52 files changed, 457 insertions(+), 53 deletions(-) diff --git a/M02_MasterTemplete/M02_MasterTemplete_Store.py b/M02_MasterTemplete/M02_MasterTemplete_Store.py index 4522430b..2d0e0a11 100644 --- a/M02_MasterTemplete/M02_MasterTemplete_Store.py +++ b/M02_MasterTemplete/M02_MasterTemplete_Store.py @@ -24,6 +24,10 @@ STRUCTURE_TABLE = "구조물집계표" _BASIS_HEAD = (("work", "공종"), ("spec", "규격"), ("detail", "산출 내역"), ("unit", "단위")) _NUMBER = re.compile(r"^구-(\d+)$") _BAD_NAME = re.compile(r'[\\/:*?"<>|\x00-\x1f]|\.\.') +# 도각 없는 빈 CAD 문서의 기본 도면층 — 없으면 B07 CAD 가 못 엶("Cannot read properties +# of undefined (reading 'length')") · CAD 쪽도 없으면 새로 채우지만(2026-09-27 sub1 고침) +# 뿌리도 처음부터 채움 +_BLANK_LAYER = {"id": "기본", "name": "기본", "isVisible": True, "isLocked": False} # ponytail: 저장은 한 번에 하나(프로세스 안 잠금) · 서버를 여럿 띄우면 파일 잠금으로 _LOCK = threading.Lock() @@ -145,7 +149,7 @@ def create_structure(column: str) -> dict[str, Any]: "판": 1, "열": column, "도번": f"구-{number:02d}", - "도면": {"format": 6, "entities": []}, + "도면": {"format": 6, "entities": [], "layers": [dict(_BLANK_LAYER)]}, "산출근거": {"양식": "산출근거", "종류": "표", "판": 1, "열": basis, "줄": basis_rows}, } atomic_write_json(path, doc) diff --git a/M02_MasterTemplete/M02_MasterTemplete_UI_Side.ts b/M02_MasterTemplete/M02_MasterTemplete_UI_Side.ts index 86334a25..97e462cc 100644 --- a/M02_MasterTemplete/M02_MasterTemplete_UI_Side.ts +++ b/M02_MasterTemplete/M02_MasterTemplete_UI_Side.ts @@ -45,7 +45,13 @@ function stubDoc(kind: Kind, name: string): unknown { 합계줄: [], 보기: {}, } - : { format: 6, entities: [] }; + : { + format: 6, + entities: [], + // 기본 도면층 하나 — 없으면 B07 CAD 가 못 엶("Cannot read properties of + // undefined (reading 'length')", 2026-09-27 실측) + layers: [{ id: "기본", name: "기본", isVisible: true, isLocked: false }], + }; } export interface SideOptions { diff --git a/resources/master_template/structure/be.json b/resources/master_template/structure/be.json index 66d85d4c..44363508 100644 --- a/resources/master_template/structure/be.json +++ b/resources/master_template/structure/be.json @@ -6,7 +6,15 @@ "도번": "구-25", "도면": { "format": 6, - "entities": [] + "entities": [], + "layers": [ + { + "id": "기본", + "name": "기본", + "isVisible": true, + "isLocked": false + } + ] }, "산출근거": { "양식": "산출근거", diff --git a/resources/master_template/structure/bg.json b/resources/master_template/structure/bg.json index 80bb0b4b..02de2357 100644 --- a/resources/master_template/structure/bg.json +++ b/resources/master_template/structure/bg.json @@ -6,7 +6,15 @@ "도번": "구-33", "도면": { "format": 6, - "entities": [] + "entities": [], + "layers": [ + { + "id": "기본", + "name": "기본", + "isVisible": true, + "isLocked": false + } + ] }, "산출근거": { "양식": "산출근거", diff --git a/resources/master_template/structure/bm_area.json b/resources/master_template/structure/bm_area.json index 46cdf626..49a16c8d 100644 --- a/resources/master_template/structure/bm_area.json +++ b/resources/master_template/structure/bm_area.json @@ -6,7 +6,15 @@ "도번": "구-23", "도면": { "format": 6, - "entities": [] + "entities": [], + "layers": [ + { + "id": "기본", + "name": "기본", + "isVisible": true, + "isLocked": false + } + ] }, "산출근거": { "양식": "산출근거", diff --git a/resources/master_template/structure/bm_len.json b/resources/master_template/structure/bm_len.json index a1cf80d4..984072e0 100644 --- a/resources/master_template/structure/bm_len.json +++ b/resources/master_template/structure/bm_len.json @@ -6,7 +6,15 @@ "도번": "구-22", "도면": { "format": 6, - "entities": [] + "entities": [], + "layers": [ + { + "id": "기본", + "name": "기본", + "isVisible": true, + "isLocked": false + } + ] }, "산출근거": { "양식": "산출근거", diff --git a/resources/master_template/structure/bx_len.json b/resources/master_template/structure/bx_len.json index f900a3e7..2bf67cdc 100644 --- a/resources/master_template/structure/bx_len.json +++ b/resources/master_template/structure/bx_len.json @@ -6,7 +6,15 @@ "도번": "구-12", "도면": { "format": 6, - "entities": [] + "entities": [], + "layers": [ + { + "id": "기본", + "name": "기본", + "isVisible": true, + "isLocked": false + } + ] }, "산출근거": { "양식": "산출근거", diff --git a/resources/master_template/structure/bx_wing.json b/resources/master_template/structure/bx_wing.json index 67f21977..4778ca23 100644 --- a/resources/master_template/structure/bx_wing.json +++ b/resources/master_template/structure/bx_wing.json @@ -6,7 +6,15 @@ "도번": "구-13", "도면": { "format": 6, - "entities": [] + "entities": [], + "layers": [ + { + "id": "기본", + "name": "기본", + "isVisible": true, + "isLocked": false + } + ] }, "산출근거": { "양식": "산출근거", diff --git a/resources/master_template/structure/cs.json b/resources/master_template/structure/cs.json index 30d6273d..db1f0bdc 100644 --- a/resources/master_template/structure/cs.json +++ b/resources/master_template/structure/cs.json @@ -6,7 +6,15 @@ "도번": "구-35", "도면": { "format": 6, - "entities": [] + "entities": [], + "layers": [ + { + "id": "기본", + "name": "기본", + "isVisible": true, + "isLocked": false + } + ] }, "산출근거": { "양식": "산출근거", diff --git a/resources/master_template/structure/ec.json b/resources/master_template/structure/ec.json index affd8114..6e82c59e 100644 --- a/resources/master_template/structure/ec.json +++ b/resources/master_template/structure/ec.json @@ -6,7 +6,15 @@ "도번": "구-24", "도면": { "format": 6, - "entities": [] + "entities": [], + "layers": [ + { + "id": "기본", + "name": "기본", + "isVisible": true, + "isLocked": false + } + ] }, "산출근거": { "양식": "산출근거", diff --git a/resources/master_template/structure/etc.json b/resources/master_template/structure/etc.json index fed2e8fa..494b744a 100644 --- a/resources/master_template/structure/etc.json +++ b/resources/master_template/structure/etc.json @@ -6,7 +6,15 @@ "도번": "구-36", "도면": { "format": 6, - "entities": [] + "entities": [], + "layers": [ + { + "id": "기본", + "name": "기본", + "isVisible": true, + "isLocked": false + } + ] }, "산출근거": { "양식": "산출근거", diff --git a/resources/master_template/structure/fb.json b/resources/master_template/structure/fb.json index 080bd463..5a451088 100644 --- a/resources/master_template/structure/fb.json +++ b/resources/master_template/structure/fb.json @@ -6,7 +6,15 @@ "도번": "구-14", "도면": { "format": 6, - "entities": [] + "entities": [], + "layers": [ + { + "id": "기본", + "name": "기본", + "isVisible": true, + "isLocked": false + } + ] }, "산출근거": { "양식": "산출근거", diff --git a/resources/master_template/structure/fp_l.json b/resources/master_template/structure/fp_l.json index 764a2ae2..4f63b5f3 100644 --- a/resources/master_template/structure/fp_l.json +++ b/resources/master_template/structure/fp_l.json @@ -6,7 +6,15 @@ "도번": "구-16", "도면": { "format": 6, - "entities": [] + "entities": [], + "layers": [ + { + "id": "기본", + "name": "기본", + "isVisible": true, + "isLocked": false + } + ] }, "산출근거": { "양식": "산출근거", diff --git a/resources/master_template/structure/fp_w.json b/resources/master_template/structure/fp_w.json index f8ff8360..273a0c0d 100644 --- a/resources/master_template/structure/fp_w.json +++ b/resources/master_template/structure/fp_w.json @@ -6,7 +6,15 @@ "도번": "구-15", "도면": { "format": 6, - "entities": [] + "entities": [], + "layers": [ + { + "id": "기본", + "name": "기본", + "isVisible": true, + "isLocked": false + } + ] }, "산출근거": { "양식": "산출근거", diff --git a/resources/master_template/structure/gr_curb.json b/resources/master_template/structure/gr_curb.json index 360487e7..37644022 100644 --- a/resources/master_template/structure/gr_curb.json +++ b/resources/master_template/structure/gr_curb.json @@ -6,7 +6,15 @@ "도번": "구-30", "도면": { "format": 6, - "entities": [] + "entities": [], + "layers": [ + { + "id": "기본", + "name": "기본", + "isVisible": true, + "isLocked": false + } + ] }, "산출근거": { "양식": "산출근거", diff --git a/resources/master_template/structure/gr_rail.json b/resources/master_template/structure/gr_rail.json index 066402f1..294467dc 100644 --- a/resources/master_template/structure/gr_rail.json +++ b/resources/master_template/structure/gr_rail.json @@ -6,7 +6,15 @@ "도번": "구-29", "도면": { "format": 6, - "entities": [] + "entities": [], + "layers": [ + { + "id": "기본", + "name": "기본", + "isVisible": true, + "isLocked": false + } + ] }, "산출근거": { "양식": "산출근거", diff --git a/resources/master_template/structure/gr_sign.json b/resources/master_template/structure/gr_sign.json index b47412c5..12293769 100644 --- a/resources/master_template/structure/gr_sign.json +++ b/resources/master_template/structure/gr_sign.json @@ -6,7 +6,15 @@ "도번": "구-31", "도면": { "format": 6, - "entities": [] + "entities": [], + "layers": [ + { + "id": "기본", + "name": "기본", + "isVisible": true, + "isLocked": false + } + ] }, "산출근거": { "양식": "산출근거", diff --git a/resources/master_template/structure/h_break.json b/resources/master_template/structure/h_break.json index 981857b3..ad2c7de4 100644 --- a/resources/master_template/structure/h_break.json +++ b/resources/master_template/structure/h_break.json @@ -6,7 +6,15 @@ "도번": "구-47", "도면": { "format": 6, - "entities": [] + "entities": [], + "layers": [ + { + "id": "기본", + "name": "기본", + "isVisible": true, + "isLocked": false + } + ] }, "산출근거": { "양식": "산출근거", diff --git a/resources/master_template/structure/h_ford_basin.json b/resources/master_template/structure/h_ford_basin.json index 4be43476..716555bb 100644 --- a/resources/master_template/structure/h_ford_basin.json +++ b/resources/master_template/structure/h_ford_basin.json @@ -6,7 +6,15 @@ "도번": "구-45", "도면": { "format": 6, - "entities": [] + "entities": [], + "layers": [ + { + "id": "기본", + "name": "기본", + "isVisible": true, + "isLocked": false + } + ] }, "산출근거": { "양식": "산출근거", diff --git a/resources/master_template/structure/h_intake.json b/resources/master_template/structure/h_intake.json index 13c5fb13..7f4611fe 100644 --- a/resources/master_template/structure/h_intake.json +++ b/resources/master_template/structure/h_intake.json @@ -6,7 +6,15 @@ "도번": "구-37", "도면": { "format": 6, - "entities": [] + "entities": [], + "layers": [ + { + "id": "기본", + "name": "기본", + "isVisible": true, + "isLocked": false + } + ] }, "산출근거": { "양식": "산출근거", diff --git a/resources/master_template/structure/h_pg_rail.json b/resources/master_template/structure/h_pg_rail.json index 93a629e0..0cef504a 100644 --- a/resources/master_template/structure/h_pg_rail.json +++ b/resources/master_template/structure/h_pg_rail.json @@ -6,7 +6,15 @@ "도번": "구-43", "도면": { "format": 6, - "entities": [] + "entities": [], + "layers": [ + { + "id": "기본", + "name": "기본", + "isVisible": true, + "isLocked": false + } + ] }, "산출근거": { "양식": "산출근거", diff --git a/resources/master_template/structure/h_pv_rail.json b/resources/master_template/structure/h_pv_rail.json index 44f3fac4..d482add1 100644 --- a/resources/master_template/structure/h_pv_rail.json +++ b/resources/master_template/structure/h_pv_rail.json @@ -6,7 +6,15 @@ "도번": "구-42", "도면": { "format": 6, - "entities": [] + "entities": [], + "layers": [ + { + "id": "기본", + "name": "기본", + "isVisible": true, + "isLocked": false + } + ] }, "산출근거": { "양식": "산출근거", diff --git a/resources/master_template/structure/h_rip_c.json b/resources/master_template/structure/h_rip_c.json index 2b3268d3..358e9d6b 100644 --- a/resources/master_template/structure/h_rip_c.json +++ b/resources/master_template/structure/h_rip_c.json @@ -6,7 +6,15 @@ "도번": "구-38", "도면": { "format": 6, - "entities": [] + "entities": [], + "layers": [ + { + "id": "기본", + "name": "기본", + "isVisible": true, + "isLocked": false + } + ] }, "산출근거": { "양식": "산출근거", diff --git a/resources/master_template/structure/h_rip_m.json b/resources/master_template/structure/h_rip_m.json index 12564857..12a8d42d 100644 --- a/resources/master_template/structure/h_rip_m.json +++ b/resources/master_template/structure/h_rip_m.json @@ -6,7 +6,15 @@ "도번": "구-39", "도면": { "format": 6, - "entities": [] + "entities": [], + "layers": [ + { + "id": "기본", + "name": "기본", + "isVisible": true, + "isLocked": false + } + ] }, "산출근거": { "양식": "산출근거", diff --git a/resources/master_template/structure/h_rockfall.json b/resources/master_template/structure/h_rockfall.json index 25195f35..4f9ab417 100644 --- a/resources/master_template/structure/h_rockfall.json +++ b/resources/master_template/structure/h_rockfall.json @@ -6,7 +6,15 @@ "도번": "구-46", "도면": { "format": 6, - "entities": [] + "entities": [], + "layers": [ + { + "id": "기본", + "name": "기본", + "isVisible": true, + "isLocked": false + } + ] }, "산출근거": { "양식": "산출근거", diff --git a/resources/master_template/structure/h_soil_ditch.json b/resources/master_template/structure/h_soil_ditch.json index d05202cc..3736eff0 100644 --- a/resources/master_template/structure/h_soil_ditch.json +++ b/resources/master_template/structure/h_soil_ditch.json @@ -6,7 +6,15 @@ "도번": "구-44", "도면": { "format": 6, - "entities": [] + "entities": [], + "layers": [ + { + "id": "기본", + "name": "기본", + "isVisible": true, + "isLocked": false + } + ] }, "산출근거": { "양식": "산출근거", diff --git a/resources/master_template/structure/h_stone_bed.json b/resources/master_template/structure/h_stone_bed.json index f90baf98..552ad655 100644 --- a/resources/master_template/structure/h_stone_bed.json +++ b/resources/master_template/structure/h_stone_bed.json @@ -6,7 +6,15 @@ "도번": "구-41", "도면": { "format": 6, - "entities": [] + "entities": [], + "layers": [ + { + "id": "기본", + "name": "기본", + "isVisible": true, + "isLocked": false + } + ] }, "산출근거": { "양식": "산출근거", diff --git a/resources/master_template/structure/h_stone_ch.json b/resources/master_template/structure/h_stone_ch.json index 3c6e4922..3c8681a0 100644 --- a/resources/master_template/structure/h_stone_ch.json +++ b/resources/master_template/structure/h_stone_ch.json @@ -6,7 +6,15 @@ "도번": "구-40", "도면": { "format": 6, - "entities": [] + "entities": [], + "layers": [ + { + "id": "기본", + "name": "기본", + "isVisible": true, + "isLocked": false + } + ] }, "산출근거": { "양식": "산출근거", diff --git a/resources/master_template/structure/h_waste.json b/resources/master_template/structure/h_waste.json index 82add70b..232ad307 100644 --- a/resources/master_template/structure/h_waste.json +++ b/resources/master_template/structure/h_waste.json @@ -6,7 +6,15 @@ "도번": "구-48", "도면": { "format": 6, - "entities": [] + "entities": [], + "layers": [ + { + "id": "기본", + "name": "기본", + "isVisible": true, + "isLocked": false + } + ] }, "산출근거": { "양식": "산출근거", diff --git a/resources/master_template/structure/memo.json b/resources/master_template/structure/memo.json index 489e5ef8..294196d7 100644 --- a/resources/master_template/structure/memo.json +++ b/resources/master_template/structure/memo.json @@ -6,7 +6,15 @@ "도번": "구-49", "도면": { "format": 6, - "entities": [] + "entities": [], + "layers": [ + { + "id": "기본", + "name": "기본", + "isVisible": true, + "isLocked": false + } + ] }, "산출근거": { "양식": "산출근거", diff --git a/resources/master_template/structure/mr.json b/resources/master_template/structure/mr.json index 53369635..50c5616b 100644 --- a/resources/master_template/structure/mr.json +++ b/resources/master_template/structure/mr.json @@ -6,7 +6,15 @@ "도번": "구-32", "도면": { "format": 6, - "entities": [] + "entities": [], + "layers": [ + { + "id": "기본", + "name": "기본", + "isVisible": true, + "isLocked": false + } + ] }, "산출근거": { "양식": "산출근거", diff --git a/resources/master_template/structure/ms.json b/resources/master_template/structure/ms.json index f0272a10..daf621cc 100644 --- a/resources/master_template/structure/ms.json +++ b/resources/master_template/structure/ms.json @@ -6,7 +6,15 @@ "도번": "구-20", "도면": { "format": 6, - "entities": [] + "entities": [], + "layers": [ + { + "id": "기본", + "name": "기본", + "isVisible": true, + "isLocked": false + } + ] }, "산출근거": { "양식": "산출근거", diff --git a/resources/master_template/structure/no.json b/resources/master_template/structure/no.json index aa348227..b8f5736e 100644 --- a/resources/master_template/structure/no.json +++ b/resources/master_template/structure/no.json @@ -6,7 +6,15 @@ "도번": "구-01", "도면": { "format": 6, - "entities": [] + "entities": [], + "layers": [ + { + "id": "기본", + "name": "기본", + "isVisible": true, + "isLocked": false + } + ] }, "산출근거": { "양식": "산출근거", diff --git a/resources/master_template/structure/od_cnt.json b/resources/master_template/structure/od_cnt.json index 2d01ffab..2e8b1c25 100644 --- a/resources/master_template/structure/od_cnt.json +++ b/resources/master_template/structure/od_cnt.json @@ -6,7 +6,15 @@ "도번": "구-18", "도면": { "format": 6, - "entities": [] + "entities": [], + "layers": [ + { + "id": "기본", + "name": "기본", + "isVisible": true, + "isLocked": false + } + ] }, "산출근거": { "양식": "산출근거", diff --git a/resources/master_template/structure/od_len.json b/resources/master_template/structure/od_len.json index 52ae094a..55d47902 100644 --- a/resources/master_template/structure/od_len.json +++ b/resources/master_template/structure/od_len.json @@ -6,7 +6,15 @@ "도번": "구-17", "도면": { "format": 6, - "entities": [] + "entities": [], + "layers": [ + { + "id": "기본", + "name": "기본", + "isVisible": true, + "isLocked": false + } + ] }, "산출근거": { "양식": "산출근거", diff --git a/resources/master_template/structure/pg_in.json b/resources/master_template/structure/pg_in.json index 7293a81e..c8db3f47 100644 --- a/resources/master_template/structure/pg_in.json +++ b/resources/master_template/structure/pg_in.json @@ -6,7 +6,15 @@ "도번": "구-11", "도면": { "format": 6, - "entities": [] + "entities": [], + "layers": [ + { + "id": "기본", + "name": "기본", + "isVisible": true, + "isLocked": false + } + ] }, "산출근거": { "양식": "산출근거", diff --git a/resources/master_template/structure/pp_cp.json b/resources/master_template/structure/pp_cp.json index 0bb30dfe..7dc39795 100644 --- a/resources/master_template/structure/pp_cp.json +++ b/resources/master_template/structure/pp_cp.json @@ -6,7 +6,15 @@ "도번": "구-10", "도면": { "format": 6, - "entities": [] + "entities": [], + "layers": [ + { + "id": "기본", + "name": "기본", + "isVisible": true, + "isLocked": false + } + ] }, "산출근거": { "양식": "산출근거", diff --git a/resources/master_template/structure/pp_len.json b/resources/master_template/structure/pp_len.json index c55eb833..63833fb9 100644 --- a/resources/master_template/structure/pp_len.json +++ b/resources/master_template/structure/pp_len.json @@ -6,7 +6,15 @@ "도번": "구-09", "도면": { "format": 6, - "entities": [] + "entities": [], + "layers": [ + { + "id": "기본", + "name": "기본", + "isVisible": true, + "isLocked": false + } + ] }, "산출근거": { "양식": "산출근거", diff --git a/resources/master_template/structure/ps.json b/resources/master_template/structure/ps.json index ceaafad7..6ae5bf4d 100644 --- a/resources/master_template/structure/ps.json +++ b/resources/master_template/structure/ps.json @@ -6,7 +6,15 @@ "도번": "구-34", "도면": { "format": 6, - "entities": [] + "entities": [], + "layers": [ + { + "id": "기본", + "name": "기본", + "isVisible": true, + "isLocked": false + } + ] }, "산출근거": { "양식": "산출근거", diff --git a/resources/master_template/structure/pv_a.json b/resources/master_template/structure/pv_a.json index edb9aed1..6d688784 100644 --- a/resources/master_template/structure/pv_a.json +++ b/resources/master_template/structure/pv_a.json @@ -6,7 +6,15 @@ "도번": "구-07", "도면": { "format": 6, - "entities": [] + "entities": [], + "layers": [ + { + "id": "기본", + "name": "기본", + "isVisible": true, + "isLocked": false + } + ] }, "산출근거": { "양식": "산출근거", diff --git a/resources/master_template/structure/pv_b.json b/resources/master_template/structure/pv_b.json index 04938563..379a96bb 100644 --- a/resources/master_template/structure/pv_b.json +++ b/resources/master_template/structure/pv_b.json @@ -6,7 +6,15 @@ "도번": "구-04", "도면": { "format": 6, - "entities": [] + "entities": [], + "layers": [ + { + "id": "기본", + "name": "기본", + "isVisible": true, + "isLocked": false + } + ] }, "산출근거": { "양식": "산출근거", diff --git a/resources/master_template/structure/pv_jt.json b/resources/master_template/structure/pv_jt.json index ee6a8e75..012c5a81 100644 --- a/resources/master_template/structure/pv_jt.json +++ b/resources/master_template/structure/pv_jt.json @@ -6,7 +6,15 @@ "도번": "구-08", "도면": { "format": 6, - "entities": [] + "entities": [], + "layers": [ + { + "id": "기본", + "name": "기본", + "isVisible": true, + "isLocked": false + } + ] }, "산출근거": { "양식": "산출근거", diff --git a/resources/master_template/structure/pv_l.json b/resources/master_template/structure/pv_l.json index 91980abd..f9505e6e 100644 --- a/resources/master_template/structure/pv_l.json +++ b/resources/master_template/structure/pv_l.json @@ -6,7 +6,15 @@ "도번": "구-05", "도면": { "format": 6, - "entities": [] + "entities": [], + "layers": [ + { + "id": "기본", + "name": "기본", + "isVisible": true, + "isLocked": false + } + ] }, "산출근거": { "양식": "산출근거", diff --git a/resources/master_template/structure/pv_w.json b/resources/master_template/structure/pv_w.json index 91a9fa8c..d54e44cd 100644 --- a/resources/master_template/structure/pv_w.json +++ b/resources/master_template/structure/pv_w.json @@ -6,7 +6,15 @@ "도번": "구-06", "도면": { "format": 6, - "entities": [] + "entities": [], + "layers": [ + { + "id": "기본", + "name": "기본", + "isVisible": true, + "isLocked": false + } + ] }, "산출근거": { "양식": "산출근거", diff --git a/resources/master_template/structure/rf.json b/resources/master_template/structure/rf.json index 50cf9500..150a7647 100644 --- a/resources/master_template/structure/rf.json +++ b/resources/master_template/structure/rf.json @@ -6,7 +6,15 @@ "도번": "구-26", "도면": { "format": 6, - "entities": [] + "entities": [], + "layers": [ + { + "id": "기본", + "name": "기본", + "isVisible": true, + "isLocked": false + } + ] }, "산출근거": { "양식": "산출근거", diff --git a/resources/master_template/structure/rv.json b/resources/master_template/structure/rv.json index 34378219..6dbfba2e 100644 --- a/resources/master_template/structure/rv.json +++ b/resources/master_template/structure/rv.json @@ -6,7 +6,15 @@ "도번": "구-03", "도면": { "format": 6, - "entities": [] + "entities": [], + "layers": [ + { + "id": "기본", + "name": "기본", + "isVisible": true, + "isLocked": false + } + ] }, "산출근거": { "양식": "산출근거", diff --git a/resources/master_template/structure/rw.json b/resources/master_template/structure/rw.json index be6470b2..d71048f5 100644 --- a/resources/master_template/structure/rw.json +++ b/resources/master_template/structure/rw.json @@ -6,7 +6,15 @@ "도번": "구-19", "도면": { "format": 6, - "entities": [] + "entities": [], + "layers": [ + { + "id": "기본", + "name": "기본", + "isVisible": true, + "isLocked": false + } + ] }, "산출근거": { "양식": "산출근거", diff --git a/resources/master_template/structure/sg.json b/resources/master_template/structure/sg.json index 1fa04f0c..3a34aee6 100644 --- a/resources/master_template/structure/sg.json +++ b/resources/master_template/structure/sg.json @@ -6,7 +6,15 @@ "도번": "구-21", "도면": { "format": 6, - "entities": [] + "entities": [], + "layers": [ + { + "id": "기본", + "name": "기본", + "isVisible": true, + "isLocked": false + } + ] }, "산출근거": { "양식": "산출근거", diff --git a/resources/master_template/structure/sta.json b/resources/master_template/structure/sta.json index 855f03db..d456334b 100644 --- a/resources/master_template/structure/sta.json +++ b/resources/master_template/structure/sta.json @@ -6,7 +6,15 @@ "도번": "구-02", "도면": { "format": 6, - "entities": [] + "entities": [], + "layers": [ + { + "id": "기본", + "name": "기본", + "isVisible": true, + "isLocked": false + } + ] }, "산출근거": { "양식": "산출근거", diff --git a/resources/master_template/structure/ta.json b/resources/master_template/structure/ta.json index 577c44a8..6d5fb9bb 100644 --- a/resources/master_template/structure/ta.json +++ b/resources/master_template/structure/ta.json @@ -6,7 +6,15 @@ "도번": "구-28", "도면": { "format": 6, - "entities": [] + "entities": [], + "layers": [ + { + "id": "기본", + "name": "기본", + "isVisible": true, + "isLocked": false + } + ] }, "산출근거": { "양식": "산출근거", diff --git a/resources/master_template/structure/wy.json b/resources/master_template/structure/wy.json index 1b33e090..f360037b 100644 --- a/resources/master_template/structure/wy.json +++ b/resources/master_template/structure/wy.json @@ -6,7 +6,15 @@ "도번": "구-27", "도면": { "format": 6, - "entities": [] + "entities": [], + "layers": [ + { + "id": "기본", + "name": "기본", + "isVisible": true, + "isLocked": false + } + ] }, "산출근거": { "양식": "산출근거", diff --git a/resources/tester/test_m02_structure.py b/resources/tester/test_m02_structure.py index 9876b26b..b5c03ea9 100644 --- a/resources/tester/test_m02_structure.py +++ b/resources/tester/test_m02_structure.py @@ -34,8 +34,10 @@ def test_새로_도번_자동_409_없는_열(client): "pp_len", "구-01", ) - # 도각 없는 전용 화면 — 그린 만큼이 설계 영역 - assert doc["도면"] == {"format": 6, "entities": []} + # 도각 없는 전용 화면 — 그린 만큼이 설계 영역 · 기본 도면층 하나(없으면 CAD 가 못 엶) + assert doc["도면"]["format"] == 6 + assert doc["도면"]["entities"] == [] + assert len(doc["도면"]["layers"]) == 1 basis = doc["산출근거"] assert [c["머리"][0] for c in basis["열"]] == ["공종", "규격", "산출 내역", "단위", "수량(m당)"] # 빈 줄 몇 개를 미리 둠 — 줄 더하기 안 눌러도 바로 입력