diff --git a/M02_MasterTemplete/M02_MasterTemplete_Store.py b/M02_MasterTemplete/M02_MasterTemplete_Store.py index 7879945c..670d664a 100644 --- a/M02_MasterTemplete/M02_MasterTemplete_Store.py +++ b/M02_MasterTemplete/M02_MasterTemplete_Store.py @@ -32,6 +32,10 @@ _BASIS_HEAD_STYLE = { } _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() @@ -158,7 +162,7 @@ def create_structure(column: str) -> dict[str, Any]: "판": 1, "열": column, "도번": f"구-{number:02d}", - "도면": {"format": 6, "entities": []}, + "도면": {"format": 6, "entities": [], "layers": [dict(_BLANK_LAYER)]}, } atomic_write_json(path, doc) ensure_basis(column) 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 aeee77e4..816e6161 100644 --- a/resources/master_template/structure/be.json +++ b/resources/master_template/structure/be.json @@ -6,6 +6,14 @@ "도번": "구-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 30aa8bf5..38da2c65 100644 --- a/resources/master_template/structure/bg.json +++ b/resources/master_template/structure/bg.json @@ -6,6 +6,14 @@ "도번": "구-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 9337dc2f..e967ce94 100644 --- a/resources/master_template/structure/bm_area.json +++ b/resources/master_template/structure/bm_area.json @@ -6,6 +6,14 @@ "도번": "구-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 88ef0ab3..2d58b811 100644 --- a/resources/master_template/structure/bm_len.json +++ b/resources/master_template/structure/bm_len.json @@ -6,6 +6,14 @@ "도번": "구-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 e4cb34ae..404132e7 100644 --- a/resources/master_template/structure/bx_len.json +++ b/resources/master_template/structure/bx_len.json @@ -6,6 +6,14 @@ "도번": "구-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 fb99203f..989810ec 100644 --- a/resources/master_template/structure/bx_wing.json +++ b/resources/master_template/structure/bx_wing.json @@ -6,6 +6,14 @@ "도번": "구-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 dd24845b..e94a7221 100644 --- a/resources/master_template/structure/cs.json +++ b/resources/master_template/structure/cs.json @@ -6,6 +6,14 @@ "도번": "구-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 e119aa89..6e5fc283 100644 --- a/resources/master_template/structure/ec.json +++ b/resources/master_template/structure/ec.json @@ -6,6 +6,14 @@ "도번": "구-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 c9c9af6f..aa34ef10 100644 --- a/resources/master_template/structure/etc.json +++ b/resources/master_template/structure/etc.json @@ -6,6 +6,14 @@ "도번": "구-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 5c7d0911..50a7f179 100644 --- a/resources/master_template/structure/fb.json +++ b/resources/master_template/structure/fb.json @@ -6,6 +6,14 @@ "도번": "구-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 69bb0bc6..216d0344 100644 --- a/resources/master_template/structure/fp_l.json +++ b/resources/master_template/structure/fp_l.json @@ -6,6 +6,14 @@ "도번": "구-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 89831d37..6b4ea5fa 100644 --- a/resources/master_template/structure/fp_w.json +++ b/resources/master_template/structure/fp_w.json @@ -6,6 +6,14 @@ "도번": "구-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 0d631708..a2a55ce9 100644 --- a/resources/master_template/structure/gr_curb.json +++ b/resources/master_template/structure/gr_curb.json @@ -6,6 +6,14 @@ "도번": "구-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 8c93aedc..f11eca4a 100644 --- a/resources/master_template/structure/gr_rail.json +++ b/resources/master_template/structure/gr_rail.json @@ -6,6 +6,14 @@ "도번": "구-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 c3afa1f7..1992f3fe 100644 --- a/resources/master_template/structure/gr_sign.json +++ b/resources/master_template/structure/gr_sign.json @@ -6,6 +6,14 @@ "도번": "구-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 c78994c2..e286404f 100644 --- a/resources/master_template/structure/h_break.json +++ b/resources/master_template/structure/h_break.json @@ -6,6 +6,14 @@ "도번": "구-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 5c7f9ff7..04ae088b 100644 --- a/resources/master_template/structure/h_ford_basin.json +++ b/resources/master_template/structure/h_ford_basin.json @@ -6,6 +6,14 @@ "도번": "구-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 0986d7da..c6fe90db 100644 --- a/resources/master_template/structure/h_intake.json +++ b/resources/master_template/structure/h_intake.json @@ -6,6 +6,14 @@ "도번": "구-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 ff3fc485..bff75d82 100644 --- a/resources/master_template/structure/h_pg_rail.json +++ b/resources/master_template/structure/h_pg_rail.json @@ -6,6 +6,14 @@ "도번": "구-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 be30d771..07592528 100644 --- a/resources/master_template/structure/h_pv_rail.json +++ b/resources/master_template/structure/h_pv_rail.json @@ -6,6 +6,14 @@ "도번": "구-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 b6bbd7b4..b119a7d6 100644 --- a/resources/master_template/structure/h_rip_c.json +++ b/resources/master_template/structure/h_rip_c.json @@ -6,6 +6,14 @@ "도번": "구-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 d6913c8d..57fcb5a2 100644 --- a/resources/master_template/structure/h_rip_m.json +++ b/resources/master_template/structure/h_rip_m.json @@ -6,6 +6,14 @@ "도번": "구-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 da684b1e..b6fa2417 100644 --- a/resources/master_template/structure/h_rockfall.json +++ b/resources/master_template/structure/h_rockfall.json @@ -6,6 +6,14 @@ "도번": "구-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 a906ae5b..643bca97 100644 --- a/resources/master_template/structure/h_soil_ditch.json +++ b/resources/master_template/structure/h_soil_ditch.json @@ -6,6 +6,14 @@ "도번": "구-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 bfb2b924..a1719680 100644 --- a/resources/master_template/structure/h_stone_bed.json +++ b/resources/master_template/structure/h_stone_bed.json @@ -6,6 +6,14 @@ "도번": "구-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 31e9ac8a..377d7206 100644 --- a/resources/master_template/structure/h_stone_ch.json +++ b/resources/master_template/structure/h_stone_ch.json @@ -6,6 +6,14 @@ "도번": "구-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 ccfff700..c89e4075 100644 --- a/resources/master_template/structure/h_waste.json +++ b/resources/master_template/structure/h_waste.json @@ -6,6 +6,14 @@ "도번": "구-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 51ebf6c0..84f694ac 100644 --- a/resources/master_template/structure/memo.json +++ b/resources/master_template/structure/memo.json @@ -6,6 +6,14 @@ "도번": "구-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 482a06df..d260d2a5 100644 --- a/resources/master_template/structure/mr.json +++ b/resources/master_template/structure/mr.json @@ -6,6 +6,14 @@ "도번": "구-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 8b828a33..c91f50ef 100644 --- a/resources/master_template/structure/ms.json +++ b/resources/master_template/structure/ms.json @@ -6,6 +6,14 @@ "도번": "구-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 ca136814..94d29720 100644 --- a/resources/master_template/structure/no.json +++ b/resources/master_template/structure/no.json @@ -6,6 +6,14 @@ "도번": "구-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 383d961a..ee4e3112 100644 --- a/resources/master_template/structure/od_cnt.json +++ b/resources/master_template/structure/od_cnt.json @@ -6,6 +6,14 @@ "도번": "구-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 29f1c329..4469b206 100644 --- a/resources/master_template/structure/od_len.json +++ b/resources/master_template/structure/od_len.json @@ -6,6 +6,14 @@ "도번": "구-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 7b5733fa..86bf15e2 100644 --- a/resources/master_template/structure/pg_in.json +++ b/resources/master_template/structure/pg_in.json @@ -6,6 +6,14 @@ "도번": "구-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 73186323..3d19815b 100644 --- a/resources/master_template/structure/pp_cp.json +++ b/resources/master_template/structure/pp_cp.json @@ -6,6 +6,14 @@ "도번": "구-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 eadad960..ea38b17c 100644 --- a/resources/master_template/structure/pp_len.json +++ b/resources/master_template/structure/pp_len.json @@ -6,6 +6,14 @@ "도번": "구-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 8ba9010c..e867c8e1 100644 --- a/resources/master_template/structure/ps.json +++ b/resources/master_template/structure/ps.json @@ -6,6 +6,14 @@ "도번": "구-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 30a22f89..0412d82f 100644 --- a/resources/master_template/structure/pv_a.json +++ b/resources/master_template/structure/pv_a.json @@ -6,6 +6,14 @@ "도번": "구-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 ba01319e..426eb421 100644 --- a/resources/master_template/structure/pv_b.json +++ b/resources/master_template/structure/pv_b.json @@ -6,6 +6,14 @@ "도번": "구-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 a0c6b376..3f488892 100644 --- a/resources/master_template/structure/pv_jt.json +++ b/resources/master_template/structure/pv_jt.json @@ -6,6 +6,14 @@ "도번": "구-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 363b41ec..8a9954e2 100644 --- a/resources/master_template/structure/pv_l.json +++ b/resources/master_template/structure/pv_l.json @@ -6,6 +6,14 @@ "도번": "구-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 73dcb13b..022c985f 100644 --- a/resources/master_template/structure/pv_w.json +++ b/resources/master_template/structure/pv_w.json @@ -6,6 +6,14 @@ "도번": "구-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 580123df..c54858b3 100644 --- a/resources/master_template/structure/rf.json +++ b/resources/master_template/structure/rf.json @@ -6,6 +6,14 @@ "도번": "구-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 01aa92db..6b51501d 100644 --- a/resources/master_template/structure/rv.json +++ b/resources/master_template/structure/rv.json @@ -6,6 +6,14 @@ "도번": "구-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 085121ea..20b14af2 100644 --- a/resources/master_template/structure/rw.json +++ b/resources/master_template/structure/rw.json @@ -6,6 +6,14 @@ "도번": "구-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 450dd30f..1cfb3d61 100644 --- a/resources/master_template/structure/sg.json +++ b/resources/master_template/structure/sg.json @@ -6,6 +6,14 @@ "도번": "구-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 da54464c..7d0ebe77 100644 --- a/resources/master_template/structure/sta.json +++ b/resources/master_template/structure/sta.json @@ -6,6 +6,14 @@ "도번": "구-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 64201388..ab34875a 100644 --- a/resources/master_template/structure/ta.json +++ b/resources/master_template/structure/ta.json @@ -6,6 +6,14 @@ "도번": "구-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 5eebbb98..39b4028a 100644 --- a/resources/master_template/structure/wy.json +++ b/resources/master_template/structure/wy.json @@ -6,6 +6,14 @@ "도번": "구-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 9fda2eba..6817c259 100644 --- a/resources/tester/test_m02_structure.py +++ b/resources/tester/test_m02_structure.py @@ -35,8 +35,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 # 산출근거는 구조물 문서 밖 — 같은 열 id 로 따로 한 통합문서 assert "산출근거" not in doc assert client.get("/api/m02/templates/basis/pp_len").json()["문서"]["종류"] == "통합문서"